Plugin Directory

Changeset 3142588


Ignore:
Timestamp:
08/28/2024 05:09:51 AM (19 months ago)
Author:
eurisko
Message:

Update to 2.4.1

Location:
reviews-sorted
Files:
84 added
11 edited

Legend:

Unmodified
Added
Removed
  • reviews-sorted/trunk/README.txt

    r3075737 r3142588  
    11=== Reviews Sorted ===
    2 
    3 Contributors: eurisko, worldweb
     2Contributors: eurisko
    43Tags: review, schema.org, rating, schema, user rating, google rating, star rating, product review
    54Requires at least: 5.6
     
    1413== Description ==
    1514
    16 **Online Reviews, Reputation Management & Customer Referrals Sorted!**
     15Thank you for installing the Review Management Plugin by Reviews Sorted. Once you install the plugin you’ll be able to send customers to your new reviews page /submit-a-review.
     16To display your review testimonials and score sliders on your site, you can paste the following shortcodes:
    1717
    18 Happy, satisfied clients are your most powerful promoters. Why not invite them to share their feedback?
     18Review Form - [reviews-form]
    1919
    20 Automate a tailored email to every client post-purchase, simplifying the review process like never before!
     20Review Testimonials Only
     21Option 1 – Using Stars: [reviews-testimonials layout=1]
     22Option 2 – Using Symbols: [reviews-testimonials layout=2]
     23Option 3 – Plain Style [reviews-testimonials layout=3]
    2124
    22 Increase engagement, build loyalty, improve SEO, and get more sales with social proof.
     25Reviews Average Only
     26Option 1 – Using Stars: [reviews-average layout=1]
     27Option 2 – Using Symbols: [reviews-average layout=2]
     28Option 3 – Plain Style [reviews-average layout=3]
    2329
    24 **Main Features**
     30Reviews Testimonial & Average Combined Slider
     31Option 1 – Using Stars: [reviews-slider layout=1]
     32Option 2 – Using Symbols: [reviews-slider layout=2]
     33Option 3 – Plain Style [reviews-slider layout=3]
    2534
    26 * Easily collect and display customer reviews on your website.
    27 * Identify brand ambassadors who will refer new business to you.
    28 * Connect and easily manage your Google Business reviews and Facebook Recommends from one simple dashboard.
    29 * Automate & send emails or SMSs to your customers following each interaction.
    30 * Promote offers or discounts in exchange for reviews & referrals.
    31 * Display either star ratings, testimonials, or both on your website.
    32 * Collect and address negative reviews before they are posted to other channels.
    33 * Promote 5-star reviews to your social media pages.
    34 
    35 **Shortcode**
    36 
    37 `[reviews-form]`
    38 
    39 `[reviews-slider layout="1" space="20" speed="500" loop="true" autoplay="true" delay="5000" desktop="2" tablet="1" mobile="1" arrows="true" dots="false" equalHeight="true"]`
    40 
    41 `[reviews-carousel space="20" speed="500" loop="true" autoplay="true" delay="5000" desktop="1" tablet="1" mobile="1" arrows="true" dots="false" equalHeight="false"]`
    42 
    43 `[reviews-grid column="4" space="10"]`
    44 
    45 `[reviews-list space="20"]`
    46 
    47 `[reviews-masonry space="20"]`
    48 
    49 `[reviews-testimonials layout="1" space="20"]`
    50 
    51 `[reviews-average layout="1"]`
    52 
    53 
    54 Reviews are like a trusted handshake for your site. If you want to convert your browsers into new leads or new customers then you need to get your Reviews Sorted!
    55 
    56 You can find information about ReviewsSorted.com's terms, privacy, and data protection policies on our website.
    57 
    58 == Screenshots ==
    59 1. Frontend view of using the [reviews-form] shortcode
    60 2. Frontend view of using the [reviews-slider layout=1] shortcode
    61 3. Frontend view of using the [reviews-carousel] shortcode
    62 4. Frontend view of using the [reviews-grid] shortcode
    63 5. Frontend view of using the [reviews-list] shortcode
    64 6. Frontend view of using the [reviews-masonry] shortcode
    65 7. Frontend view of using the [reviews-testimonials layout=1] shortcode
    66 8. Frontend view of using the [reviews-average layout=1] shortcode
    67 9. Reviews List Settings
    68 10. Local Business Details Settings
    69 11. Review Settings
    70 12. Form Settings
    71 13. Email Notifications Settings
    72 
     35If you have any question’s please email support@reviewssorted.com
    7336
    7437== Installation ==
    75 
    76 Thank you for installing the Review Management Plugin by Reviews Sorted.
    7738
    7839To install this plugin:
    7940
    80411. Install the plugin through the WordPress admin interface, or upload the plugin folder to /wp-content/plugins/ using ftp.
    81 2. Activate the plugin through the 'Plugins' screen in WordPress.
    82 3. Go to WordPress Admin > Reviews Sorted
     422. Activate the plugin through the 'Plugins' screen in WordPress. 
     433. Go to WordPress Admin > Reviews Sorted 
    8344
    84 
    85 Once you install the plugin you'll be able to send customers to your new reviews page /submit-a-review.
    86 
    87 To display your review testimonials and score sliders on your site, you can paste the following shortcodes:
    88 
    89 Review Testimonials Only
    90 Option 1 - Using Stars: [reviews-testimonials layout=1]
    91 Option 2 - Using Symbols: [reviews-testimonials layout=2]
    92 Option 3 - Plain Style [reviews-testimonials layout=3]
    93 
    94 Reviews Average Only
    95 Option 1 - Using Stars: [reviews-average layout=1]
    96 Option 2 - Using Symbols: [reviews-average layout=2]
    97 Option 3 - Plain Style [reviews-average layout=3]
    98 
    99 Reviews Testimonial & Average Combined Slider
    100 Option 1 - Using Stars: [reviews-slider layout=1]
    101 Option 2 - Using Symbols: [reviews-slider layout=2]
    102 Option 3 - Plain Style [reviews-slider layout=3]
    103 
    104 If you have any questions please email support@reviewssorted.com
     45== Screenshots ==
    10546
    10647
    10748== Changelog ==
     49= v2.2 (May 25, 2022) =
     50* Official plugin release.
    10851
    109 = v2.4.1 (Apr 23, 2024) =
    110 * Resolved Activation Key Issues on Premium Plan Activation
     52= v2.3.1 (Sept 06, 2022) =
     53* removed schema microdata from indvidual reviews
     54
     55= v2.3.2 (Oct 31, 2023) =
     56* Added Latest WordPress Combability.
     57
     58= v2.3.3 (Nov 06, 2023) =
     59* Remove the decimal point to show review percentage.
     60
     61= v2.3.4 (Nov 27, 2023) =
     62* Added admin notice.
     63
     64= v2.3.5 (Nov 29, 2023) =
     65* Resolved slider issue, slider navigation was not working.
     66* Added changes for the admin notice.
     67
     68= v2.3.6 (Nov 30, 2023) =
     69* Resolve the code level issues on slider shortcode
     70
     71= v2.3.7 (Jan 23, 2024) =
     72* Resolved issues and incorporated suggestions.
     73
     74= v2.3.8 (Feb 23, 2024) =
     75* Resolved issues on rating percentage calculation based on backend settings.
     76
     77= v2.3.9 (Mar 20, 2024) =
     78* Improved form flexibility & Enhanced Business controls.
    11179
    11280= v2.4.0 (Apr 19, 2024) =
    11381* Verified compatibility with WordPress version 6.5.2.
    11482
    115 = v2.3.10 (Mar 22, 2024) =
    116 * "Hide/Show" functionality in the review form has been modified.
    117 
    118 = v2.3.9 (Mar 20, 2024) =
    119 * Improved form flexibility & Enhanced Business controls.
    120 
    121 = v2.3.8 (Feb 23, 2024) =
    122 * Resolved issues on rating percentage calculation based on backend settings.
    123 
    124 = v2.3.7 (Jan 23, 2024) =
    125 * Resolved issues and incorporated suggestions.
    126 
    127 = v2.3.6 (Nov 30, 2023) =
    128 * Resolve the code level issues on slider shortcode
    129 
    130 = v2.3.5 (Nov 29, 2023) =
    131 * Resolved slider issue, slider navigation was not working.
    132 * Added changes for the admin notice.
    133 
    134 = v2.3.4 (Nov 27, 2023) =
    135 * Added admin notice.
    136 
    137 = v2.3.3 (Nov 06, 2023) =
    138 * Remove the decimal point to show review percentage.
    139 
    140 = v2.3.2 (Oct 31, 2023) =
    141 * Added Latest WordPress Combability.
    142 
    143 = v2.3.1 (Sept 06, 2022) =
    144 * removed schema microdata from indvidual reviews
    145 
    146 = v2.2 (May 25, 2022) =
    147 * Official plugin release.
     83= v2.4.1 (Aug 28, 2024) =
     84* Fixed bug on /submit-a-review page form not saving
  • reviews-sorted/trunk/public/frontend-scripts.js

    r2907544 r3142588  
    11const reviewForm = document.getElementById('rs-form_enquiry-form') || false;
    22if (reviewForm) {
     3    document.querySelector('.reviews-sorted_form form input[type="hidden"][name="timestamp"]').value = Date.now();
    34    reviewForm.addEventListener('submit', (e) => {
    45        e.preventDefault();
  • reviews-sorted/trunk/reviews-sorted.php

    r3075737 r3142588  
    66 * Author: Reviews Sorted
    77 * Author URI: https://reviewssorted.com/
    8  * Version: 2.4.1
     8 * Version: 2.4.0
    99 * Text Domain: reviews-sorted
    1010 * Domain Path: /languages
    1111 * License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    1212 */
    13 
     13 
    1414// Exit if accessed directly
    1515if ( ! defined( 'ABSPATH' ) ) exit;
     
    7171        }
    7272    }
     73 
    7374}
    7475add_action( 'admin_init', 'review_sorted_void_check_installation_time' );
     76
    7577
    7678/**
     
    8991
    9092}
    91 
    9293// remove the notice for the user if review already done or if the user does not want to
    9394function review_sorted_void_spare_me(){   
     
    142143        }
    143144    }
     145
     146
    144147}
    145148add_action( 'admin_init', 'review_sorted_void_spare_me', 5 );
     
    154157    }
    155158}
    156 
    157 /**
    158 * Check if the website has collected 10 reviews and display notice in Dashboard
    159 **/
    160 function review_sorted_check_ten_reviews_collected() {
    161 
    162     global $pagenow;
    163     if ( $pagenow == 'index.php' ) {
    164 
    165         $RS_Review = new ReviewsSortedFeedback();
    166        
    167         $data    = $RS_Review->get_total();
    168        
    169         $reviews_count = isset( $data['totalReviews'] ) ? $data['totalReviews'] : 0;
    170         $noshow = get_option('rs_void_notice');
    171        
    172         if(!$noshow && $reviews_count >= 10 ) {
    173             add_action( 'admin_notices', 'review_sorted_ten_reviews_admin_notice' );
    174         }
    175     }
    176 }
    177 add_action( 'admin_init', 'review_sorted_check_ten_reviews_collected', 999 );
    178 
    179 /**
    180 * Display Admin Notice after the website has collected 10 reviews
    181 **/
    182 function review_sorted_ten_reviews_admin_notice() {
    183 
    184     $current_user = wp_get_current_user();
    185     if( !empty( $current_user->user_firstname ) || !empty( $current_user->user_lastname ) ){
    186         $firstname = !empty( $current_user->user_firstname ) ? $current_user->user_firstname : '';
    187         $lastname .= !empty( $current_user->user_lastname ) ? $current_user->user_lastname : '';
    188         $name = trim( $firstname." ".$lastname );
    189     } else if ( !empty( $current_user->display_name ) ){
    190         $name = trim( $current_user->display_name );
    191     } else {
    192         $name = trim( $current_user->user_login );
    193     }
    194     $review_sorted_logo = REVIEWS_SORTED_PLUGIN_URL.'assets/logo.png';
    195     $reviewurl = esc_url( 'https://wordpress.org/support/plugin/reviews-sorted/reviews/' );
    196 
    197     $ignore = esc_url( get_admin_url() . '?rs-plugin-ignore-notice=1' );
    198     printf( __( "<div class='notice notice-success is-dismissible review-sorted-ten-reviews-notice'><div class='review-notice-content'><div class='review-sorted-logo'><img src='%s' /></div><p>Hi<b> %s </b><br>Congratulations on collecting 10 reviews,<br>We hope our plugin has been helpful. If you're enjoying this plugin, please help us by leaving a positive review on the WordPress plugin repository.  It helps us to grow and continue to create a better platform.<br>Thanks - Mike</p></div><div class='void-review-btn' style='margin-bottom: 10px;'><a href='%s' target='_blank' style='margin-right: 15px;'>Leave a Review</a> <a href='%s' class='dismiss-ten-review-notice' style='margin-right: 15px;'>Maybe Later</a> <a href='%s' class='dismiss-ten-review-notice'>All Done</a></div></div>", "reviews-sorted" ), $review_sorted_logo, $name, $reviewurl, $ignore, $ignore );
    199 }
    200 
    201 function rs_plugin_notice_ignore() {
    202    
    203     global $current_user;
    204    
    205     if (isset($_GET['rs-plugin-ignore-notice'])) {
    206        
    207         update_option( 'rs_void_notice' , TRUE );
    208        
    209     }
    210    
    211 }
    212 add_action('admin_init', 'rs_plugin_notice_ignore',5);
    213 
    214 add_action('admin_head', 'review_sorted_ten_reviews_notice_css');
    215 function review_sorted_ten_reviews_notice_css() {
    216   echo '<style>
    217     .review-sorted-ten-reviews-notice .review-notice-content {
    218         display: flex;
    219         align-items: center;
    220         margin: 10px 0;
    221     }
    222     .review-sorted-ten-reviews-notice .review-notice-content .review-sorted-logo {
    223         width: 150px;
    224         object-fit: contain;
    225         padding: 10px;
    226         display: flex;
    227         align-items: center;
    228         justify-content: center;
    229         border: 1px solid #000;
    230         box-sizing: border-box;
    231     }
    232     .review-sorted-ten-reviews-notice .review-notice-content .review-sorted-logo img {
    233         width: 100%;
    234         object-fit: cover;
    235     }
    236     .review-sorted-ten-reviews-notice .review-notice-content p {
    237         width: calc(100% - 150px);
    238         padding: 0;
    239         padding-left: 20px;
    240         margin: 0;
    241     }
    242     </style>';
    243 }
  • reviews-sorted/trunk/templates/admin/reviews-sorted.php

    r2986785 r3142588  
    77    <div style="clear: both;"></div>
    88    <hr class="wp-header-end">
    9     <h2>Welcome</h2>
    10 
    11        
     9    <h2>Welcome</h2>   
    1210    <p>Thank you for installing the Reviews Sorted Review Management plugin. Our automated approach to collecting real reviews from your customers will save you valuable time while helping you to win new customers thanks to the power of social proof.</p>
    1311    <p>Once activated, you’ll be able to start sending your customers to your new reviews page /submit-a-review/.</p>
  • reviews-sorted/trunk/templates/admin/testimonial-settings.php

    r2907544 r3142588  
    2828                                __('6 Months', 'reviews-sorted'),
    2929                                __('1 Year',   'reviews-sorted'),
     30                                __('All',   'reviews-sorted'),
    3031                            ];
    3132                        ?>
  • reviews-sorted/trunk/templates/reviews-average.php

    r2996967 r3142588  
    11<?php
    2 
    3     if( !isset($reviews) || !is_array($reviews) ){
    4         return;
    5     }
    6 
    72    if(!isset($data['totalRatings']) || !isset($data['totalReviews'])){
    83        return;
     
    149    $is_layout_two= (isset($atts) && (isset($atts['layout']) && $atts['layout'] == 2)) ? true : false;
    1510    $average = intval($data['totalRatings']) / intval($data['totalReviews']);
    16 
    17 
    18 
    19 $FiveStarCount = 0;
    20 
    21 foreach ($reviews as $review) {
    22   if ($review->rating == '5.0') {
    23     $FiveStarCount++;
    24   }
    25 }
    26 $FiveStarCount;
    27     // foreach($reviews as $review):
    28     //      echo $review->rating;
    29 
    30     // endforeach;
    31 
    32 $FiveStarPercentage = (100*$FiveStarCount)/$data['totalReviews'];
    33 $FiveStarPer = number_format($FiveStarPercentage , 0);
    34 
    3511    $average = number_format($average, 1);
    3612?>
     
    7955               
    8056                <div class="content">
    81                 <?php
     57                 <?php
     58               $months = strtolower($settings['rating_month_label']);
     59                if ($months == 'all') {
     60                     _e( sprintf('<p>Based on <strong>%s</strong> %s reviews, including %s 5 star reviews </p>',
     61                            esc_html($data['totalReviews']),
     62                            esc_html(strtolower($settings['rating_month_label'])),
     63                            esc_html($FiveStarPer.'%')
     64                           
     65                        ),
     66                        'reviews-sorted'
     67                    );
     68                }else{
    8269                    _e( sprintf('<p>Based on <strong>%s</strong> reviews over the last %s, including %s 5 star reviews </p>',
    8370                            esc_html($data['totalReviews']),
     
    8875                        'reviews-sorted'
    8976                    );
     77                }
    9078                ?>
    9179                    <div class="tooltip">
  • reviews-sorted/trunk/templates/reviews-form.php

    r3056702 r3142588  
    110110   </div>
    111111
     112   <input type="hidden" name="timestamp" value="<?php echo time(); ?>">
    112113   <input type="hidden" name="action" value="rs_reviews_submit">
    113114   <input type="hidden" name="redirect" value="<?php esc_attr_e($form_redirect_page); ?>">
  • reviews-sorted/trunk/templates/reviews-slider-1.php

    r3003574 r3142588  
    55
    66    $slideOptions = [
    7         'slidesPerView' => $options['desktop'],
    8         'pagination' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : ['el' => ".swiper-pagination", 'dynamicBullets' => false, 'clickable' => true ],
    9         'paginationClickable' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : true,
    10         'spaceBetween'  => intval( $options['space'] ),
    11         'speed'         => intval( $options['speed'] ),
    12         'loop'          => intval( $options['loop'] ),
    13         'autoplay'      => filter_var( $options['autoplay'], FILTER_VALIDATE_BOOLEAN ) === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
     7        'slidesPerView' => $options['mobile'],
     8        'spaceBetween'  => $options['space'],
     9        'speed'         => $options['speed'],
     10        'loop'          => $options['loop'],
     11        'autoplay'      => $options['autoplay'] === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
    1412        'breakpoints'   => [
    15             '1024' => [
    16                 'slidesPerView' => $options['desktop'],
    17             ],
    1813            '768' => [
    1914                'slidesPerView' => $options['tablet'],
    2015            ],
    21             '425' => [
    22                 'slidesPerView' => $options['mobile'],
    23             ],
    24             '375' => [
    25                 'slidesPerView' => $options['mobile'],
    26             ],
    27             '320' => [
    28                 'slidesPerView' => $options['mobile'],
     16            '1024' => [
     17              'slidesPerView' => $options['desktop'],
    2918            ]
    3019        ]
     
    7261            <?php endforeach; ?>
    7362        </div><!-- .swiper-wrapper -->
    74         <div class="swiper-pagination"></div>
     63
    7564        <!-- navigation buttons -->
    7665        <?php if($options['arrows'] == 1): ?>
  • reviews-sorted/trunk/templates/reviews-slider-2.php

    r3003574 r3142588  
    44    }
    55    $slideOptions = [
    6         'slidesPerView' => $options['desktop'],
    7         'pagination' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : ['el' => ".swiper-pagination", 'dynamicBullets' => false, 'clickable' => true ],
    8         'paginationClickable' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : true,
    9         'spaceBetween'  => intval( $options['space'] ),
    10         'speed'         => intval( $options['speed'] ),
    11         'loop'          => intval( $options['loop'] ),
    12         'autoplay'      => filter_var( $options['autoplay'], FILTER_VALIDATE_BOOLEAN ) === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
     6        'slidesPerView' => $options['mobile'],
     7        'spaceBetween'  => $options['space'],
     8        'speed'         => $options['speed'],
     9        'loop'          => $options['loop'],
     10        'autoplay'      => $options['autoplay'] === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
    1311        'breakpoints'   => [
    14             '1024' => [
    15                 'slidesPerView' => $options['desktop'],
    16             ],
    1712            '768' => [
    1813                'slidesPerView' => $options['tablet'],
    1914            ],
    20             '425' => [
    21                 'slidesPerView' => $options['mobile'],
    22             ],
    23             '375' => [
    24                 'slidesPerView' => $options['mobile'],
    25             ],
    26             '320' => [
    27                 'slidesPerView' => $options['mobile'],
     15            '1024' => [
     16              'slidesPerView' => $options['desktop'],
    2817            ]
    2918        ]
    3019    ];
    31 
    32     if($options['arrows'] == 1) {
    33         $slideOptions['navigation'] = [
    34             'nextEl' => '.swiper-button-next',
    35             'prevEl' => '.swiper-button-prev',
    36         ];
    37     }
    38    
    3920    $wraperClass = 'reviews-swiper-wrapper';
    4021    $options['equalHeight'] ? $wraperClass .= ' item-height_equal ' : '';
     
    5031                            $created = date("F d, Y", strtotime($review->created_at)); 
    5132                        ?>
    52  
     33                       
     34
     35                       
    5336                        <div class="rs-rating-wrapper">
    5437                            <div class="rs-rating rs-custom-icons"
     
    9073           
    9174        </div><!-- .swiper-wrapper -->
    92          <div class="swiper-pagination"></div>
     75
    9376        <!-- navigation buttons -->
    94         <?php if($options['arrows'] == 1): ?>
    95             <div class="swiper-button-prev"></div>
    96             <div class="swiper-button-next"></div>
    97         <?php endif; ?>
     77        <div class="swiper-button-prev"></div>
     78        <div class="swiper-button-next"></div>
    9879    </div><!-- .swiper -->
    9980</div>
  • reviews-sorted/trunk/templates/reviews-slider-3.php

    r3003574 r3142588  
    44    }
    55    $slideOptions = [
    6         'slidesPerView' => $options['desktop'],
    7         'pagination' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : ['el' => ".swiper-pagination", 'dynamicBullets' => false, 'clickable' => true ],
    8         'paginationClickable' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : true,
    9         'spaceBetween'  => intval( $options['space'] ),
    10         'speed'         => intval( $options['speed'] ),
    11         'loop'          => intval( $options['loop'] ),
    12         'autoplay'      => filter_var( $options['autoplay'], FILTER_VALIDATE_BOOLEAN ) === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
     6        'slidesPerView' => $options['mobile'],
     7        'spaceBetween'  => $options['space'],
     8        'speed'         => $options['speed'],
     9        'loop'          => $options['loop'],
     10        'autoplay'      => $options['autoplay'] === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
    1311        'breakpoints'   => [
    14             '1024' => [
    15                 'slidesPerView' => $options['desktop'],
    16             ],
    1712            '768' => [
    1813                'slidesPerView' => $options['tablet'],
    1914            ],
    20             '425' => [
    21                 'slidesPerView' => $options['mobile'],
    22             ],
    23             '375' => [
    24                 'slidesPerView' => $options['mobile'],
    25             ],
    26             '320' => [
    27                 'slidesPerView' => $options['mobile'],
     15            '1024' => [
     16              'slidesPerView' => $options['desktop'],
    2817            ]
    2918        ]
    3019    ];
    31 
    32     if($options['arrows'] == 1) {
    33         $slideOptions['navigation'] = [
    34             'nextEl' => '.swiper-button-next',
    35             'prevEl' => '.swiper-button-prev',
    36         ];
    37     }
    38    
    3920    $wraperClass = 'reviews-swiper-wrapper';
    4021    $options['equalHeight'] ? $wraperClass .= ' item-height_equal ' : '';
     
    8061        </div><!-- .swiper-wrapper -->
    8162
    82         <div class="swiper-pagination"></div>
    8363        <!-- navigation buttons -->
    84         <?php if($options['arrows'] == 1): ?>
    85             <div class="swiper-button-prev"></div>
    86             <div class="swiper-button-next"></div>
    87         <?php endif; ?>
     64        <div class="swiper-button-prev"></div>
     65        <div class="swiper-button-next"></div>
    8866    </div><!-- .swiper -->
    8967</div>
  • reviews-sorted/trunk/templates/reviews-slider.php

    r3040128 r3142588  
    11<?php
    2     if( !isset($reviews) || !is_array($reviews) ){
    3         return;
    4     }
    5     $slideOptions = [
    6         'slidesPerView' => $options['desktop'],
    7         'pagination' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : ['el' => ".swiper-pagination", 'dynamicBullets' => false, 'clickable' => true ],
    8         'paginationClickable' => filter_var( $options['dots'], FILTER_VALIDATE_BOOLEAN ) === false ? false : true,
    9         'spaceBetween'  => intval( $options['space'] ),
    10         'speed'         => intval( $options['speed'] ),
    11         'loop'          => intval( $options['loop'] ),
    12         'autoplay'      => filter_var( $options['autoplay'], FILTER_VALIDATE_BOOLEAN ) === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
    13         'breakpoints'   => [
    14             '1024' => [
    15                 'slidesPerView' => $options['desktop'],
    16             ],
    17             '768' => [
    18                 'slidesPerView' => $options['tablet'],
    19             ],
    20             '425' => [
    21                 'slidesPerView' => $options['mobile'],
    22             ],
    23             '375' => [
    24                 'slidesPerView' => $options['mobile'],
    25             ],
    26             '320' => [
    27                 'slidesPerView' => $options['mobile'],
    28             ]
    29         ]
    30     ];
    31     if($options['arrows'] == 1) {
    32         $slideOptions['navigation'] = [
    33             'nextEl' => '.swiper-button-next',
    34             'prevEl' => '.swiper-button-prev',
    35         ];
    36     }
    37     $wraperClass = 'reviews-swiper-wrapper';
    38     $options['equalHeight'] ? $wraperClass .= ' item-height_equal ' : '';
     2if( !isset($reviews) || !is_array($reviews) ){
     3    return;
     4}
     5$slideOptions = [
     6    'slidesPerView' => $options['mobile'],
     7    'spaceBetween'  => $options['space'],
     8    'speed'         => $options['speed'],
     9    'loop'          => $options['loop'],
     10    'autoplay'      => $options['autoplay'] === false ? false : [ 'delay' => $options['delay'], 'disableOnInteraction' => false ],
     11    'breakpoints'   => [
     12        '768' => [
     13            'slidesPerView' => $options['tablet'],
     14        ],
     15        '1024' => [
     16          'slidesPerView' => $options['desktop'],
     17      ]
     18  ]
     19];
     20$wraperClass = 'reviews-swiper-wrapper';
     21$options['equalHeight'] ? $wraperClass .= ' item-height_equal ' : '';
    3922?>
    4023<div class="<?php esc_attr_e($wraperClass) ?>" style="<?php echo sprintf('--gap: %spx', $options['space']); ?>">
     
    4528            <!-- Slides -->
    4629            <?php foreach($reviews as $review): ?>
    47                 <?php if($review->status == 'Published'){ ?>
     30               <?php if($review->status == 'Published'){ ?>
    4831                <div class="swiper-slide">
    4932                    <div class="inner">
    5033
    5134                        <div class="swipe-content">
    52                        
     35                           
    5336                            <div class="reviewBody">
    5437                                <?php echo wpautop(wp_kses_data(stripslashes($review->content))); ?>
     
    5841                        <div class="swipe-footer">
    5942                            <?php
    60                                 $created = date("F d, Y", strtotime($review->created_at)); 
     43                            $created = date("F d, Y", strtotime($review->created_at)); 
    6144                            ?>
    6245                           
     
    7255
    7356                    </div>
    74                 </div><!-- .swiper-slide -->
    75                 <?php } ?>
    76             <?php endforeach; ?>
    77         </div><!-- .swiper-wrapper -->
    78        
     57                </div>
     58            <?php } ?>
     59            <!-- .swiper-slide -->
     60        <?php endforeach; ?>
     61    </div><!-- .swiper-wrapper -->
     62   
     63    <!-- navigation buttons -->
     64    <?php if ( $options['arrows'] ) : ?>
     65        <div class="swiper-button-prev"></div>
     66        <div class="swiper-button-next"></div>
     67    <?php endif ?>
     68
     69    <!-- pagination -->
     70    <?php if ( $options['dots'] ) : ?>
    7971        <div class="swiper-pagination"></div>
    80         <!-- navigation buttons -->
    81         <?php if ( $options['arrows'] ) : ?>
    82             <div class="swiper-button-prev"></div>
    83             <div class="swiper-button-next"></div>
    84         <?php endif ?>
     72    <?php endif ?>
    8573
    86         <!-- pagination -->
    87         <?php if ( $options['dots'] ) : ?>
    88             <div class="swiper-pagination"></div>
    89         <?php endif ?>
    90 
    91     </div><!-- .swiper -->
     74</div><!-- .swiper -->
    9275
    9376</div>
Note: See TracChangeset for help on using the changeset viewer.