Changeset 3446824
- Timestamp:
- 01/26/2026 05:26:39 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
easy-slider-revolution/trunk/front/easy-slider-frontend.php
r3154975 r3446824 2 2 /** 3 3 * ##################################################################### 4 * ### EASY SLIDER REVOLUTIONPLUGIN - PHP FUNCTIONS FOR WordPress FRONT-END ###4 * ### EASY SLIDER PLUGIN - PHP FUNCTIONS FOR WordPress FRONT-END ### 5 5 * ##################################################################### 6 6 * 7 7 * @package easy_slider_revolution 8 8 * @author Trident Technolabs 9 * @copyright https://tridenttechnolabs.com 9 * @copyright https://tridenttechnolabs.com 10 10 * @license GPLv2 or later 11 * Version: 1.1. 111 * Version: 1.1.3 12 12 */ 13 14 add_shortcode( 'easy-slider-revolution', 'e asy_slider_revolution_shortcode' );13 if ( ! defined( 'ABSPATH' ) ) exit; // EXIT IF ACCESSED DIRECTLY. 14 add_shortcode( 'easy-slider-revolution', 'esr_shortcode_callback' ); 15 15 16 16 /** … … 19 19 * @param array $atts Shortcode attributes. 20 20 */ 21 if(!function_exists('easy_slider_revolution_shortcode')){ 22 function easy_slider_revolution_shortcode( $atts ) { 21 if(!function_exists('esr_shortcode_callback')){ 22 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound 23 function esr_shortcode_callback( $atts ) { 23 24 wp_enqueue_script( 'jquery' ); 24 25 wp_register_script( 'owl_carousel_js', ESRCPT_PLUGIN_PATH . 'owl-carousel/owl.carousel.min.js', array( 'jquery' ), '2.2.1', true ); … … 702 703 } 703 704 } 704 705 705 706 if ( 'true' === $slide_data['vert_center'] ) { 706 707 // vertically center content within each slide. 707 708 // (we do this by wrapping slide content in a '<div>' wrapper. 708 709 $slide_content = "<div class='sa_vert_center'>" . $slide_content . "</div>"; 709 710 710 711 } 711 712 $output .= "<style>.SliderButton".$i."{background:".$slide_data[ 'slide' . $i . '_button_background' ]." !important;color:".$slide_data[ 'slide' . $i . '_button_color' ]." !important}.SliderButton".$i.":hover{background:".$slide_data[ 'slide' . $i . '_button_color' ]."!important;color:".$slide_data[ 'slide' . $i . '_button_background' ]."!important}</style>"; 712 $output .= "<div class='textContainer'>". $slide_content . "</div><div><a href=' javascript:void(0)' type='button' target='".$slide_data[ 'slide' .$i. '_link_target']."' class='btn SliderButton".$i."'>" . $slide_data[ 'slide' . $i . '_link_text' ]."</a></div></div>\n"; // .sa_hover_container713 $output .= "<div class='textContainer'>". $slide_content . "</div><div><a href=' ".esc_url($slide_data[ 'slide' . $i . '_link_url' ])."' type='button' target='".$slide_data[ 'slide' .$i. '_link_target']."' class='btn SliderButton".$i."'>" . $slide_data[ 'slide' . $i . '_link_text' ]."</a></div></div>\n"; // .sa_hover_container 713 714 } 714 715 $output .= "</div>\n"; // .owl-carousel … … 857 858 $items_width6 = intval( $slide_data['items_width6'] ); 858 859 $single_item = 1; 859 860 860 861 $output .= "<script type='text/javascript'>\n"; 861 862 if ( '1' === $slide_data['sa_window_onload'] ) { … … 869 870 if ( 1 === $single_item ) { 870 871 $output .= " items : 1,\n"; 871 872 872 873 $output .= ' smartSpeed : ' . esc_attr( $slide_data['slide_transition'] ) . ",\n"; 873 874 } else { … … 982 983 $output .= " }\n"; 983 984 984 985 985 986 // set the slide 'min-height' css value. 986 987 $output .= " jQuery('#" . esc_attr( $slide_data['css_id'] ) . " .owl-item .sa_hover_container').css('min-height', slide_height);\n";
Note: See TracChangeset
for help on using the changeset viewer.