PATH:
home
/
lab2454c
/
fcxpro.com
/
wp-content
/
plugins
/
webon-core
/
inc
/
shortcodes
/
tabs
<?php if ( ! function_exists( 'webon_core_add_tabs_child_shortcode' ) ) { /** * Function that add shortcode into shortcodes list for registration * * @param array $shortcodes * * @return array */ function webon_core_add_tabs_child_shortcode( $shortcodes ) { $shortcodes[] = 'WebOnCoreTabsChildShortcode'; return $shortcodes; } add_filter( 'webon_core_filter_register_shortcodes', 'webon_core_add_tabs_child_shortcode' ); } if ( class_exists( 'WebOnCoreShortcode' ) ) { class WebOnCoreTabsChildShortcode extends WebOnCoreShortcode { public function map_shortcode() { $this->set_shortcode_path( WEBON_CORE_SHORTCODES_URL_PATH . '/tabs' ); $this->set_base( 'webon_core_tabs_child' ); $this->set_name( esc_html__( 'Tabs Child', 'webon-core' ) ); $this->set_description( esc_html__( 'Shortcode that adds tab child to tabs holder', 'webon-core' ) ); $this->set_category( esc_html__( 'WebOn Core', 'webon-core' ) ); $this->set_is_child_shortcode( true ); $this->set_parent_elements( array( 'webon_core_tabs' ) ); $this->set_is_parent_shortcode( true ); $this->set_option( array( 'field_type' => 'text', 'name' => 'tab_title', 'title' => esc_html__( 'Title', 'webon-core' ), ) ); $this->set_option( array( 'field_type' => 'text', 'name' => 'layout', 'title' => esc_html__( 'Layout', 'webon-core' ), 'default_value' => '', 'visibility' => array('map_for_page_builder' => false) ) ); } public function render( $options, $content = null ) { parent::render( $options ); $atts = $this->get_atts(); $atts['tab_title'] = $atts['tab_title'] . '-' . wp_unique_id(); $atts['content'] = $content; return webon_core_get_template_part( 'shortcodes/tabs', 'variations/'.$atts['layout'].'/templates/child', '', $atts ); } } }
[+]
..
[+]
variations
[-] tab.php
[edit]
[-] tab-child.php
[edit]
[-] include.php
[edit]
[+]
assets
[-] tab-elementor.php
[edit]