PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
visualcomposer
/
shortcodes
<?php $tab_content_id_1 = time() . '-1-' . rand( 0, 100 ); $tab_content_id_2 = time() . '-2-' . rand( 0, 100 ); vc_map( array( 'name' => esc_html__('Content Carousel',"deep"), 'base' => 'content_carousel', 'category' => esc_html__('Webnus Shortcodes','deep'), 'description' => esc_html__('Create Content Carousel','deep'), 'class' => 'wn-content-carousel', 'is_container' => true, 'weight' => - 5, 'html_template' => get_template_directory() . '/vc_templates/content_carousel.php', 'admin_enqueue_css' => preg_replace( '/\s/', '%20', get_template_directory_uri() . '/inc/visualcomposer/assets/content_carousel.css'), 'js_view' => 'DeepCarouselTab', 'icon' => 'webnus-content-carousel', 'params' => array( array( 'heading' => esc_html__( 'Content Carousel Items', 'deep' ), 'type' => 'textfield', 'param_name' => 'item_num', 'value' => '', 'admin_label' => true, 'description' => esc_html__( 'Number of items want to show in content carousel', 'deep' ), 'group' => esc_html__( 'General', 'deep' ), ), array( 'heading' => esc_html__( 'Item margin', 'deep' ), 'type' => 'textfield', 'param_name' => 'item_margin', 'value' => '', 'description' => esc_html__( 'Content carousel items margin right ( For example: 50 )', 'deep' ), 'group' => esc_html__( 'General', 'deep' ), ), array( 'heading' => esc_html__( 'Items stage padding', 'deep' ), 'type' => 'textfield', 'param_name' => 'items_stage_padding', 'value' => '', 'description' => esc_html__( 'Content carousel padding left and right on stage ( For example: 30 )', 'deep' ), 'group' => esc_html__( 'General', 'deep' ), ), array( 'heading' => esc_html__( 'Custom Padding for carousel container' , 'deep' ), 'type' => 'checkbox', 'param_name' => 'carousel_padding', 'value' => array( esc_html__( 'Enable' , 'deep' ) => 'true' ), 'description' => esc_html__( 'Content Carousel padding left and right, for Example 30px' , 'deep' ), 'group' => esc_html__( 'General', 'deep' ), ), array( 'heading' => esc_html__( 'Carousel padding Value' , 'deep' ), 'type' => 'textfield', 'param_name' => 'carousel_paddin_val', 'value' => '', 'description' => esc_html__( 'Padding left and right, for Example 30px' , 'deep' ), 'dependency' => array( 'element' => 'carousel_padding', 'not_empty' => true, ), 'group' => esc_html__( 'General', 'deep' ), ), array( 'heading' => esc_html__( 'RTL' , 'deep' ), 'type' => 'checkbox', 'param_name' => 'carousel_rtl', 'value' => array( esc_html__( 'Enable' , 'deep' ) => 'true' ), 'group' => esc_html__( 'General', 'deep' ), ), array( 'heading' => esc_html__( 'Bullets Navigation' , 'deep' ), 'type' => 'checkbox', 'param_name' => 'dots', 'value' => array( esc_html__( 'Enable' , 'deep' ) => 'true' ), 'group' => esc_html__( 'Navigation', 'deep' ), ), array( 'heading' => esc_html__( 'Navigation Arrows' , 'deep' ), 'type' => 'checkbox', 'param_name' => 'navigation', 'value' => array( esc_html__( 'Enable' , 'deep' ) => 'true' ), 'group' => esc_html__( 'Navigation', 'deep' ), ), array( 'heading' => esc_html__( 'Locate the navigation arrows on the content carousel' , 'deep' ), 'type' => 'dropdown', 'param_name' => 'nav_location', 'value' => array( esc_html__( 'Bottom ' , 'deep' ) => 'bottom_nav', esc_html__( 'Sidebar' , 'deep' ) => 'sidebar_nav', ), 'group' => esc_html__( 'Navigation', 'deep' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Extra Class', 'deep' ), 'param_name' => 'shortcodeclass', 'value' => '', 'group' => esc_html__( 'Class & ID', 'deep' ), ), array( 'type' => 'textfield', 'heading' => esc_html__( 'Custom ID', 'deep' ), 'param_name' => 'shortcodeid', 'value' => '', 'group' => esc_html__( 'Class & ID', 'deep' ), ), ), 'custom_markup' => '<div class="wpb_tabs_holder wpb_holder vc_container_for_children"> <ul class="content_slides"></ul>%content%</div>', 'default_content' => '[content_carousel_tab title="' . esc_html__( 'Content 1', 'deep' ) . '" tab_id="' . $tab_content_id_1 . ' ][/content_carousel_tab][content_carousel_tab title="' . esc_html__( 'Content 2', 'deep' ) . '" tab_id="' . $tab_content_id_2 . ' ][/content_carousel_tab]', ) ); class WPBakeryShortCode_CONTENT_CAROUSEL extends WPBakeryShortCode { static $filter_added = false; protected $controls_css_settings = 'out-tc vc_controls-content-widget'; protected $controls_list = array('edit', 'clone', 'delete'); public function contentAdmin( $atts, $content = null ) { $width = $custom_markup = ''; $shortcode_attributes = array( 'width' => '1/1' ); foreach ( $this->settings['params'] as $param ) { if ( $param['param_name'] != 'content' ) { if ( isset( $param['value'] ) && is_string( $param['value'] ) ) { $shortcode_attributes[$param['param_name']] = esc_html__( $param['value'], "deep" ); } elseif ( isset( $param['value'] ) ) { $shortcode_attributes[$param['param_name']] = $param['value']; } } else if ( $param['param_name'] == 'content' && $content == NULL ) { //$content = $param['value']; $content = esc_html__( $param['value'], "deep" ); } } extract( shortcode_atts( $shortcode_attributes, $atts ) ); preg_match_all( '/vc_tab title="([^\"]+)"(\stab_id\=\"([^\"]+)\"){0,1}/i', $content, $matches, PREG_OFFSET_CAPTURE ); $output = ''; $inner = ''; $element = $this->getElementHolder( $width ); foreach ( $this->settings['params'] as $param ) { $custom_markup = ''; $param_value = isset( $param['param_name'] ) ? $param['param_name'] : ''; if ( is_array( $param_value ) ) { reset( $param_value ); $first_key = key( $param_value ); $param_value = $param_value[$first_key]; } $inner .= $this->singleParamHtmlHolder( $param, $param_value ); } if ( isset( $this->settings["custom_markup"] ) && $this->settings["custom_markup"] != '' ) { if ( $content != '' ) { $custom_markup = str_ireplace( "%content%", $tmp . $content, $this->settings["custom_markup"] ); } else if ( $content == '' && isset( $this->settings["default_content_in_template"] ) && $this->settings["default_content_in_template"] != '' ) { $custom_markup = str_ireplace( "%content%", $this->settings["default_content_in_template"], $this->settings["custom_markup"] ); } else { $custom_markup = str_ireplace( "%content%", '', $this->settings["custom_markup"] ); } $inner .= do_shortcode( $custom_markup ); } $element = str_ireplace( '%wpb_element_content%', $inner, $element ); $output = $element; return $output; } } add_action( 'admin_print_scripts', 'deep_tabs_admin3',999 ); function deep_tabs_admin3() { $screen = get_current_screen(); $screen_id = $screen->base; if($screen_id !== 'post') return false; wp_register_script('admin_content_carousel_tab', get_template_directory_uri() . '/inc/visualcomposer/assets/js/admin_carousel.js',array( 'jquery'),false,true); wp_register_script('admin_content_carousel_single', get_template_directory_uri() . '/inc/visualcomposer/assets/js/tab_single_carousel.js',array( 'jquery'),false,true); wp_enqueue_script('admin_content_carousel_tab'); wp_enqueue_script('admin_content_carousel_single'); }
[+]
..
[-] 01-speakers.php
[edit]
[-] 01-slider.php
[edit]
[-] 01-singlecause.php
[edit]
[-] 06-ourclients.php
[edit]
[-] 04-latestblogs.php
[edit]
[-] 48-line.php
[edit]
[-] 03-collection.php
[edit]
[-] 16-teaserbox.php
[edit]
[-] 17-reservation.php
[edit]
[-] 01-special-offers.php
[edit]
[-] 46-alert.php
[edit]
[-] 57-gallery.php
[edit]
[-] 01-buy-process.php
[edit]
[-] 01-review-form.php
[edit]
[-] 55-vcw.php
[edit]
[-] 08-content-carousel.php
[edit]
[-] 16-login.php
[edit]
[-] 17-food-menu.php
[edit]
[-] 10-callout.php
[edit]
[-] 34-quote.php
[edit]
[-] 01-pricing-tables.php
[edit]
[-] 04-postfromblog.php
[edit]
[-] 01-sermon-category.php
[edit]
[-] 40-latest-tweets.php
[edit]
[-] 01-socials.php
[edit]
[-] 17-recipes.php
[edit]
[-] 01-pricing-plan.php
[edit]
[-] 01-domain-checker.php
[edit]
[-] 01-prayerwall-items.php
[edit]
[-] 21-service-carousel.php
[edit]
[-] 08-content-carousel-tab.php
[edit]
[-] 50-tabs.php
[edit]
[-] 30-googlemap.php
[edit]
[-] 19-process-carousel.php
[edit]
[-] 04-blog.php
[edit]
[-] 03-like-view-share.php
[edit]
[-] 01-sermons.php
[edit]
[-] 01-portfolio-carousel.php
[edit]
[-] 20-maxcounter.php
[edit]
[-] 45-dropcap.php
[edit]
[-] 25-list.php
[edit]
[-] 02-before-after-image.php
[edit]
[-] 01-causes.php
[edit]
[-] 04-magazine.php
[edit]
[-] 29-icondivider.php
[edit]
[-] 06-ourteam.php
[edit]
[-] 01-w-title.php
[edit]
[-] 08-testimonial-carousel.php
[edit]
[-] 07-button.php
[edit]
[-] 08-testimonial-single-tab.php
[edit]
[-] 08-testimonial.php
[edit]
[-] 52-tooltip.php
[edit]
[-] 08-testimonial-tab.php
[edit]
[-] 01-prayerwall-form.php
[edit]
[-] 07-donate.php
[edit]
[-] 12-video-teaser.php
[edit]
[-] 02-wp-hotel-booking.php
[edit]
[-] 01-singlesermon.php
[edit]
[-] 01-instagram.php
[edit]
[-] 04-postslider.php
[edit]
[-] 01-slider-item.php
[edit]
[-] 35-link.php
[edit]
[-] 34-block-quote.php
[edit]
[-] 51-row.php
[edit]
[-] 03-tablepress.php
[edit]
[-] 56-roadmap.php
[edit]
[-] 01-custom-menu.php
[edit]
[-] 01-w-svg.php
[edit]
[-] 11-infobox.php
[edit]
[-] 01-shop-products.php
[edit]
[-] 54-imagecarousel.php
[edit]
[-] 01-iconbox.php
[edit]
[-] 04-rooms.php
[edit]
[-] 02-distance.php
[edit]
[-] 01-icon.php
[edit]
[-] 19-our-process.php
[edit]
[-] 04-category-tab.php
[edit]
[-] 08-testimonialslider.php
[edit]
[-] 01-review-items.php
[edit]
[-] 01-subscribe.php
[edit]
[-] 20-countdown.php
[edit]
[-] 12-videoplay.php
[edit]
[-] 01-image-hotspot.php
[edit]
[-] 21-toggle-box.php
[edit]
[-] 56-schedule.php
[edit]