PATH:
home
/
letacommog
/
lenazen
/
wp-content
/
plugins
/
fusion-builder
/
shortcodes
<?php if ( fusion_is_element_enabled( 'fusion_one_page_text_link' ) ) { if ( ! class_exists( 'FusionSC_OnePageTextLink' ) ) { /** * Shortcode class. * * @package fusion-builder * @since 1.0 */ class FusionSC_OnePageTextLink extends Fusion_Element { /** * An array of the shortcode arguments. * * @access protected * @since 1.0 * @var array */ protected $args; /** * Constructor. * * @access public * @since 1.0 */ public function __construct() { parent::__construct(); add_filter( 'fusion_attr_one-page-text-link-shortcode', array( $this, 'attr' ) ); add_shortcode( 'fusion_one_page_text_link', array( $this, 'render' ) ); } /** * Render the shortcode * * @access public * @since 1.0 * @param array $args Shortcode parameters. * @param string $content Content between shortcode. * @return string HTML output. */ public function render( $args, $content = '' ) { $defaults = FusionBuilder::set_shortcode_defaults( array( 'class' => '', 'id' => '', 'link' => '', ), $args, 'fusion_one_page_text_link' ); extract( $defaults ); $this->args = $defaults; return '<a ' . FusionBuilder::attributes( 'one-page-text-link-shortcode' ) . '>' . do_shortcode( $content ) . '</a>'; } /** * Builds the attributes array. * * @access public * @since 1.0 * @return array */ public function attr() { $attr = array( 'class' => 'fusion-one-page-text-link', ); if ( $this->args['class'] ) { $attr['class'] .= ' ' . $this->args['class']; } if ( $this->args['id'] ) { $attr['id'] = $this->args['id']; } $attr['href'] = $this->args['link']; return $attr; } } } new FusionSC_OnePageTextLink(); } /** * Map shortcode to Fusion Builder */ function fusion_element_one_page_text_link() { fusion_builder_map( array( 'name' => esc_attr__( 'One Page Text Link', 'fusion-builder' ), 'shortcode' => 'fusion_one_page_text_link', 'generator_only' => true, 'icon' => 'fusiona-external-link', 'params' => array( array( 'type' => 'textfield', 'heading' => esc_attr__( 'Name Of Anchor', 'fusion-builder' ), 'description' => esc_attr__( 'Unique identifier of the anchor to scroll to on click. Anchor names need to be prefixed with a hastag, ex: #anchorname.', 'fusion-builder' ), 'param_name' => 'link', 'value' => '', ), array( 'type' => 'textarea', 'heading' => esc_attr__( 'Text or HTML code', 'fusion-builder' ), 'description' => esc_attr__( 'Insert text or HTML code here (e.g: HTML for image). This content will be used to trigger the scrolling to the anchor.', 'fusion-builder' ), 'param_name' => 'element_content', 'value' => '', ), array( 'type' => 'textfield', 'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ), 'param_name' => 'class', 'value' => '', 'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ), ), array( 'type' => 'textfield', 'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ), 'param_name' => 'id', 'value' => '', 'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ), ), ), ) ); } add_action( 'fusion_builder_before_init', 'fusion_element_one_page_text_link' );
[+]
..
[-] fusion-social-links.php
[edit]
[-] fusion-section-separator.php
[edit]
[-] fusion-sharingbox.php
[edit]
[-] fusion-column-inner.php
[edit]
[-] fusion-soundcloud.php
[edit]
[-] fusion-highlight.php
[edit]
[-] fusion-image-carousel.php
[edit]
[-] fusion-image.php
[edit]
[-] fusion-menu-anchor.php
[edit]
[-] fusion-woo-featured-products-slider.php
[edit]
[+]
js
[-] fusion-revolution-slider.php
[edit]
[-] fusion-slider.php
[edit]
[-] fusion-pricing-table.php
[edit]
[-] fusion-row-inner.php
[edit]
[-] fusion-tagline.php
[edit]
[-] fusion-one-page-link.php
[edit]
[-] fusion-separator.php
[edit]
[-] fusion-dropcap.php
[edit]
[-] fusion-image-before-after.php
[edit]
[-] fusion-woo-shortcodes.php
[edit]
[-] fusion-table.php
[edit]
[-] fusion-modal.php
[edit]
[-] fusion-fontawesome.php
[edit]
[-] fusion-woo-product-slider.php
[edit]
[-] fusion-layer-slider.php
[edit]
[-] fusion-youtube.php
[edit]
[-] fusion-blank-page.php
[edit]
[-] fusion-counters-box.php
[edit]
[-] fusion-gallery.php
[edit]
[-] fusion-tooltip.php
[edit]
[-] fusion-progress.php
[edit]
[-] fusion-countdown.php
[edit]
[-] fusion-recent-posts.php
[edit]
[-] fusion-blog.php
[edit]
[-] fusion-tabs.php
[edit]
[-] fusion-title.php
[edit]
[-] fusion-flip-boxes.php
[edit]
[-] fusion-row.php
[edit]
[-] fusion-button.php
[edit]
[-] fusion-alert.php
[edit]
[-] fusion-nextpage.php
[edit]
[-] fusion-code-block.php
[edit]
[-] fusion-chart.php
[edit]
[-] fusion-syntax-highlighter.php
[edit]
[-] fusion-container.php
[edit]
[-] fusion-content-boxes.php
[edit]
[-] fusion-lightbox.php
[edit]
[-] fusion-global.php
[edit]
[-] fusion-text.php
[edit]
[-] fusion-events.php
[edit]
[-] fusion-convertplus.php
[edit]
[-] fusion-testimonials.php
[edit]
[-] fusion-google-map.php
[edit]
[-] fusion-column.php
[edit]
[-] fusion-popover.php
[edit]
[-] fusion-checklist.php
[edit]
[-] fusion-toggle.php
[edit]
[-] fusion-vimeo.php
[edit]
[-] fusion-post-slider.php
[edit]
[-] fusion-user-login.php
[edit]
[-] fusion-person.php
[edit]
[-] fusion-counters-circle.php
[edit]
[-] fusion-widget-area.php
[edit]