PATH:
home
/
lab2454c
/
fcxpro.com
/
wp-content
/
plugins
/
webon-core
/
inc
/
shortcodes
/
vertical-split-slider
<?php if ( ! function_exists( 'webon_core_add_vertical_split_slider_shortcode' ) ) { /** * Function that add shortcode into shortcodes list for registration * * @param array $shortcodes * * @return array */ function webon_core_add_vertical_split_slider_shortcode( $shortcodes ) { $shortcodes[] = 'WebOnVerticalSplitSliderShortcode'; return $shortcodes; } add_filter( 'webon_core_filter_register_shortcodes', 'webon_core_add_vertical_split_slider_shortcode' ); } if ( class_exists( 'WebOnCoreShortcode' ) ) { class WebOnVerticalSplitSliderShortcode extends WebOnCoreShortcode { public function map_shortcode() { $this->set_shortcode_path( WEBON_CORE_SHORTCODES_URL_PATH . '/vertical-split-slider' ); $this->set_base( 'webon_vertical_split_slider' ); $this->set_name( esc_html__( 'Vertical Split Slider', 'webon-core' ) ); $this->set_description( esc_html__( 'Shortcode that adds vertical split slider holder', 'webon-core' ) ); $this->set_category( esc_html__( 'WebOn Core', 'webon-core' ) ); $this->set_scripts( array( 'jquery-effects-core' => array( 'registered' => true ), 'multiscroll' => array( 'registered' => false, 'url' => WEBON_CORE_SHORTCODES_URL_PATH . '/vertical-split-slider/assets/js/plugins/jquery.multiscroll.min.js', 'dependency' => array( 'jquery', 'jquery-effects-core' ) ) ) ); $this->set_necessary_styles( array( 'multiscroll' => array( 'registered' => false, 'url' => WEBON_CORE_SHORTCODES_URL_PATH . '/vertical-split-slider/assets/css/plugins/jquery.multiscroll.css' ) ) ); $this->set_option( array( 'field_type' => 'text', 'name' => 'custom_class', 'title' => esc_html__( 'Custom Class', 'webon-core' ), ) ); $this->set_option( array( 'field_type' => 'select', 'name' => 'disable_breakpoint', 'title' => esc_html__( 'Disable on smaller screens', 'webon-core' ), 'options' => array( '1024' => esc_html__( 'Below 1024px', 'webon-core' ), '768' => esc_html__( 'Below 768px', 'webon-core' ), ), 'default_value' => '1024' ) ); $this->set_option( array( 'field_type' => 'repeater', 'name' => 'children', 'title' => esc_html__( 'Slide Items', 'webon-core' ), 'items' => array( array( 'field_type' => 'select', 'name' => 'slide_header_style', 'title' => esc_html__( 'Header/Bullets Style', 'webon-core' ), 'options' => array( '' => esc_html__( 'Default', 'webon-core' ), 'light' => esc_html__( 'Light', 'webon-core' ), 'dark' => esc_html__( 'Dark', 'webon-core' ), ) ), array( 'field_type' => 'select', 'name' => 'slide_layout', 'title' => esc_html__( 'Slide Layout', 'webon-core' ), 'options' => array( 'image-left' => esc_html__( 'Image On Left', 'webon-core' ), 'image-right' => esc_html__( 'Image On Right', 'webon-core' ) ), ), array( 'field_type' => 'image', 'name' => 'slide_image', 'title' => esc_html__( 'Image', 'webon-core' ) ), array( 'field_type' => 'image', 'name' => 'slide_corner_image', 'title' => esc_html__( 'Corner Image', 'webon-core' ) ), array( 'field_type' => 'text', 'name' => 'slide_corner_image_link', 'title' => esc_html__( 'Corner Image Link', 'webon-core' ), ), array( 'field_type' => 'text', 'name' => 'slide_content_title', 'title' => esc_html__( 'Title', 'webon-core' ), ), array( 'field_type' => 'select', 'name' => 'slide_content_title_tag', 'title' => esc_html__( 'Title Tag', 'webon-core' ), 'options' => webon_core_get_select_type_options_pool( 'title_tag', false ), 'default_value' => 'h2', ), array( 'field_type' => 'color', 'name' => 'slide_content_title_color', 'title' => esc_html__( 'Title Color', 'webon-core' ), ), array( 'field_type' => 'textarea', 'name' => 'slide_content_text', 'title' => esc_html__( 'Text', 'webon-core' ), ), array( 'field_type' => 'image', 'name' => 'slide_content_image', 'title' => esc_html__( 'Content Image', 'webon-core' ) ), array( 'field_type' => 'image', 'name' => 'slide_content_corner_image', 'title' => esc_html__( 'Content Corner Image', 'webon-core' ) ), array( 'field_type' => 'text', 'name' => 'slide_content_corner_image_link', 'title' => esc_html__( 'Content Corner Image Link', 'webon-core' ), ), array( 'field_type' => 'text', 'name' => 'slide_content_button_link', 'title' => esc_html__( 'Button Link', 'webon-core' ), ), array( 'field_type' => 'text', 'name' => 'slide_content_button_text', 'title' => esc_html__( 'Button Text', 'webon-core' ), ), array( 'field_type' => 'select', 'name' => 'slide_content_button_target', 'title' => esc_html__( 'Button Target', 'webon-core' ), 'options' => webon_core_get_select_type_options_pool( 'link_target', false ) ), ) ) ); } public function load_assets() { wp_enqueue_script( 'jquery-effects-core' ); wp_enqueue_script( 'multiscroll'); wp_enqueue_style( 'multiscroll' ); } public function render( $options, $content = null ) { parent::render( $options ); $atts = $this->get_atts(); $atts['holder_classes'] = $this->get_holder_classes( $atts ); $atts['this_object'] = $this; $atts['items'] = $this->parse_repeater_items( $atts['children'] ); return webon_core_get_template_part( 'shortcodes/vertical-split-slider', 'templates/vertical-split-slider', '', $atts ); } private function get_holder_classes( $atts ) { $holder_classes = $this->init_holder_classes(); $holder_classes[] = 'qodef-vertical-split-slider qodef-m'; $holder_classes[] = ! empty ( $atts['disable_breakpoint'] ) ? 'qodef-disable-below--' . $atts['disable_breakpoint'] : ''; return implode( ' ', $holder_classes ); } public function get_slide_image_styles( $slide_atts ) { $styles = array(); $styles[] = ! empty( $slide_atts['slide_image'] ) ? 'background-image: url(' . wp_get_attachment_url( $slide_atts['slide_image'] ) . ')' : ''; return $styles; } public function get_slide_title_styles( $slide_atts ) { $styles = array(); $styles[] = ! empty( $slide_atts['slide_content_title_color'] ) ? 'color: ' . $slide_atts['slide_content_title_color'] : ''; return $styles; } public function get_slide_data( $slide_atts ) { $data = array(); $data['data-header-skin'] = ! empty( $slide_atts['slide_header_style'] ) ? $slide_atts['slide_header_style'] : ''; return $data; } } }
[-] vertical-split-slider-elementor.php
[edit]
[+]
..
[+]
templates
[-] include.php
[edit]
[+]
assets
[-] vertical-split-slider.php
[edit]