Plugin Directory

Changeset 3446824


Ignore:
Timestamp:
01/26/2026 05:26:39 AM (6 weeks ago)
Author:
tridenttechnolabs
Message:

frontend file update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • easy-slider-revolution/trunk/front/easy-slider-frontend.php

    r3154975 r3446824  
    22/**
    33 * #####################################################################
    4  * ### EASY SLIDER REVOLUTION PLUGIN - PHP FUNCTIONS FOR WordPress FRONT-END ###
     4 * ### EASY SLIDER PLUGIN - PHP FUNCTIONS FOR WordPress FRONT-END ###
    55 * #####################################################################
    66 *
    77 * @package     easy_slider_revolution
    88 * @author      Trident Technolabs
    9  * @copyright   https://tridenttechnolabs.com 
     9 * @copyright   https://tridenttechnolabs.com
    1010 * @license     GPLv2 or later
    11  * Version: 1.1.1
     11 * Version: 1.1.3
    1212 */
    13 
    14 add_shortcode( 'easy-slider-revolution', 'easy_slider_revolution_shortcode' );
     13if ( ! defined( 'ABSPATH' ) ) exit; // EXIT IF ACCESSED DIRECTLY.
     14add_shortcode( 'easy-slider-revolution', 'esr_shortcode_callback' );
    1515
    1616/**
     
    1919 * @param array $atts Shortcode attributes.
    2020 */
    21 if(!function_exists('easy_slider_revolution_shortcode')){
    22 function easy_slider_revolution_shortcode( $atts ) {
     21if(!function_exists('esr_shortcode_callback')){
     22    // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
     23function esr_shortcode_callback( $atts ) {
    2324    wp_enqueue_script( 'jquery' );
    2425    wp_register_script( 'owl_carousel_js', ESRCPT_PLUGIN_PATH . 'owl-carousel/owl.carousel.min.js', array( 'jquery' ), '2.2.1', true );
     
    702703                    }
    703704                }
    704                
     705
    705706                if ( 'true' === $slide_data['vert_center'] ) {
    706707                    // vertically center content within each slide.
    707708                    // (we do this by wrapping slide content in a '<div>' wrapper.
    708709                    $slide_content = "<div class='sa_vert_center'>" . $slide_content . "</div>";
    709                    
     710
    710711                }
    711712                $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_container
     713                $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
    713714            }
    714715            $output .= "</div>\n"; // .owl-carousel
     
    857858            $items_width6 = intval( $slide_data['items_width6'] );
    858859            $single_item = 1;
    859    
     860
    860861            $output .= "<script type='text/javascript'>\n";
    861862            if ( '1' === $slide_data['sa_window_onload'] ) {
     
    869870            if ( 1 === $single_item ) {
    870871                $output .= "            items : 1,\n";
    871                
     872
    872873                $output .= '            smartSpeed : ' . esc_attr( $slide_data['slide_transition'] ) . ",\n";
    873874            } else {
     
    982983                    $output .= "            }\n";
    983984
    984                    
     985
    985986                                                // set the slide 'min-height' css value.
    986987                    $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.