Changeset 3142588
- Timestamp:
- 08/28/2024 05:09:51 AM (19 months ago)
- Location:
- reviews-sorted
- Files:
-
- 84 added
- 11 edited
-
tags/2.4.0 (added)
-
tags/2.4.0/README.txt (added)
-
tags/2.4.0/admin (added)
-
tags/2.4.0/admin/admin-ui-render.php (added)
-
tags/2.4.0/admin/admin-ui-setup.php (added)
-
tags/2.4.0/admin/basic-setup.php (added)
-
tags/2.4.0/admin/index.php (added)
-
tags/2.4.0/assets (added)
-
tags/2.4.0/assets/images (added)
-
tags/2.4.0/assets/images/quote-icon.png (added)
-
tags/2.4.0/assets/images/rs-icon-1-1.png (added)
-
tags/2.4.0/assets/images/rs-icon-2-1.png (added)
-
tags/2.4.0/assets/images/rs-icon-3-1.png (added)
-
tags/2.4.0/assets/images/rs-icon-4-1.png (added)
-
tags/2.4.0/assets/images/rs-icon-5-1.png (added)
-
tags/2.4.0/assets/images/star.png (added)
-
tags/2.4.0/assets/images/stars-active.png (added)
-
tags/2.4.0/assets/images/stars-inactive.png (added)
-
tags/2.4.0/assets/images/stars-inactive_2.png (added)
-
tags/2.4.0/assets/logo.png (added)
-
tags/2.4.0/assets/star.png (added)
-
tags/2.4.0/functions (added)
-
tags/2.4.0/functions/api.php (added)
-
tags/2.4.0/functions/common.php (added)
-
tags/2.4.0/functions/do.php (added)
-
tags/2.4.0/functions/index.php (added)
-
tags/2.4.0/functions/review.php (added)
-
tags/2.4.0/includes (added)
-
tags/2.4.0/includes/index.php (added)
-
tags/2.4.0/includes/swiper (added)
-
tags/2.4.0/includes/swiper/swiper-bundle.esm.browser.js.map (added)
-
tags/2.4.0/includes/swiper/swiper-bundle.esm.browser.min.js.map (added)
-
tags/2.4.0/includes/swiper/swiper-bundle.min.css (added)
-
tags/2.4.0/includes/swiper/swiper-bundle.min.js (added)
-
tags/2.4.0/includes/swiper/swiper-bundle.min.js.map (added)
-
tags/2.4.0/index.php (added)
-
tags/2.4.0/languages (added)
-
tags/2.4.0/languages/index.php (added)
-
tags/2.4.0/languages/reviews-sorted.pot (added)
-
tags/2.4.0/license.txt (added)
-
tags/2.4.0/loader.php (added)
-
tags/2.4.0/public (added)
-
tags/2.4.0/public/HelveticaNowDisplay-ExtraBold.ttf (added)
-
tags/2.4.0/public/HelveticaNowDisplay-ExtraBold.woff2 (added)
-
tags/2.4.0/public/HelveticaNowDisplay-RegIta.ttf (added)
-
tags/2.4.0/public/HelveticaNowDisplay-RegIta.woff2 (added)
-
tags/2.4.0/public/HelveticaNowDisplay-Regular.ttf (added)
-
tags/2.4.0/public/HelveticaNowDisplay-Regular.woff2 (added)
-
tags/2.4.0/public/frontend-scripts.js (added)
-
tags/2.4.0/public/frontend-styles.css (added)
-
tags/2.4.0/public/images (added)
-
tags/2.4.0/public/images/loading.svg (added)
-
tags/2.4.0/public/index.php (added)
-
tags/2.4.0/reviews-sorted.php (added)
-
tags/2.4.0/templates (added)
-
tags/2.4.0/templates/admin (added)
-
tags/2.4.0/templates/admin/business-details.php (added)
-
tags/2.4.0/templates/admin/email-templates.php (added)
-
tags/2.4.0/templates/admin/form-settings.php (added)
-
tags/2.4.0/templates/admin/premium-version.php (added)
-
tags/2.4.0/templates/admin/review-edit.php (added)
-
tags/2.4.0/templates/admin/reviews-list.php (added)
-
tags/2.4.0/templates/admin/reviews-sorted.php (added)
-
tags/2.4.0/templates/admin/testimonial-settings.php (added)
-
tags/2.4.0/templates/emails (added)
-
tags/2.4.0/templates/emails/plain (added)
-
tags/2.4.0/templates/emails/plain/1_star_review.txt (added)
-
tags/2.4.0/templates/emails/plain/admin.txt (added)
-
tags/2.4.0/templates/emails/plain/thank_you.txt (added)
-
tags/2.4.0/templates/reviews-average.php (added)
-
tags/2.4.0/templates/reviews-carousel.php (added)
-
tags/2.4.0/templates/reviews-form.php (added)
-
tags/2.4.0/templates/reviews-grid.php (added)
-
tags/2.4.0/templates/reviews-list.php (added)
-
tags/2.4.0/templates/reviews-masonry.php (added)
-
tags/2.4.0/templates/reviews-slider-1.php (added)
-
tags/2.4.0/templates/reviews-slider-2.php (added)
-
tags/2.4.0/templates/reviews-slider-3.php (added)
-
tags/2.4.0/templates/reviews-slider.php (added)
-
tags/2.4.0/templates/reviews-testimonials-1.php (added)
-
tags/2.4.0/templates/reviews-testimonials-2.php (added)
-
tags/2.4.0/templates/reviews-testimonials-3.php (added)
-
tags/2.4.0/templates/reviews-testimonials.php (added)
-
tags/2.4.0/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/public/frontend-scripts.js (modified) (1 diff)
-
trunk/reviews-sorted.php (modified) (5 diffs)
-
trunk/templates/admin/reviews-sorted.php (modified) (1 diff)
-
trunk/templates/admin/testimonial-settings.php (modified) (1 diff)
-
trunk/templates/reviews-average.php (modified) (4 diffs)
-
trunk/templates/reviews-form.php (modified) (1 diff)
-
trunk/templates/reviews-slider-1.php (modified) (2 diffs)
-
trunk/templates/reviews-slider-2.php (modified) (3 diffs)
-
trunk/templates/reviews-slider-3.php (modified) (2 diffs)
-
trunk/templates/reviews-slider.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reviews-sorted/trunk/README.txt
r3075737 r3142588 1 1 === Reviews Sorted === 2 3 Contributors: eurisko, worldweb 2 Contributors: eurisko 4 3 Tags: review, schema.org, rating, schema, user rating, google rating, star rating, product review 5 4 Requires at least: 5.6 … … 14 13 == Description == 15 14 16 **Online Reviews, Reputation Management & Customer Referrals Sorted!** 15 Thank 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. 16 To display your review testimonials and score sliders on your site, you can paste the following shortcodes: 17 17 18 Happy, satisfied clients are your most powerful promoters. Why not invite them to share their feedback? 18 Review Form - [reviews-form] 19 19 20 Automate a tailored email to every client post-purchase, simplifying the review process like never before! 20 Review Testimonials Only 21 Option 1 – Using Stars: [reviews-testimonials layout=1] 22 Option 2 – Using Symbols: [reviews-testimonials layout=2] 23 Option 3 – Plain Style [reviews-testimonials layout=3] 21 24 22 Increase engagement, build loyalty, improve SEO, and get more sales with social proof. 25 Reviews Average Only 26 Option 1 – Using Stars: [reviews-average layout=1] 27 Option 2 – Using Symbols: [reviews-average layout=2] 28 Option 3 – Plain Style [reviews-average layout=3] 23 29 24 **Main Features** 30 Reviews Testimonial & Average Combined Slider 31 Option 1 – Using Stars: [reviews-slider layout=1] 32 Option 2 – Using Symbols: [reviews-slider layout=2] 33 Option 3 – Plain Style [reviews-slider layout=3] 25 34 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 35 If you have any question’s please email support@reviewssorted.com 73 36 74 37 == Installation == 75 76 Thank you for installing the Review Management Plugin by Reviews Sorted.77 38 78 39 To install this plugin: 79 40 80 41 1. 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 42 2. Activate the plugin through the 'Plugins' screen in WordPress. 43 3. Go to WordPress Admin > Reviews Sorted 83 44 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 == 105 46 106 47 107 48 == Changelog == 49 = v2.2 (May 25, 2022) = 50 * Official plugin release. 108 51 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. 111 79 112 80 = v2.4.0 (Apr 19, 2024) = 113 81 * Verified compatibility with WordPress version 6.5.2. 114 82 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 1 1 const reviewForm = document.getElementById('rs-form_enquiry-form') || false; 2 2 if (reviewForm) { 3 document.querySelector('.reviews-sorted_form form input[type="hidden"][name="timestamp"]').value = Date.now(); 3 4 reviewForm.addEventListener('submit', (e) => { 4 5 e.preventDefault(); -
reviews-sorted/trunk/reviews-sorted.php
r3075737 r3142588 6 6 * Author: Reviews Sorted 7 7 * Author URI: https://reviewssorted.com/ 8 * Version: 2.4. 18 * Version: 2.4.0 9 9 * Text Domain: reviews-sorted 10 10 * Domain Path: /languages 11 11 * License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 12 */ 13 13 14 14 // Exit if accessed directly 15 15 if ( ! defined( 'ABSPATH' ) ) exit; … … 71 71 } 72 72 } 73 73 74 } 74 75 add_action( 'admin_init', 'review_sorted_void_check_installation_time' ); 76 75 77 76 78 /** … … 89 91 90 92 } 91 92 93 // remove the notice for the user if review already done or if the user does not want to 93 94 function review_sorted_void_spare_me(){ … … 142 143 } 143 144 } 145 146 144 147 } 145 148 add_action( 'admin_init', 'review_sorted_void_spare_me', 5 ); … … 154 157 } 155 158 } 156 157 /**158 * Check if the website has collected 10 reviews and display notice in Dashboard159 **/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 reviews181 **/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 7 7 <div style="clear: both;"></div> 8 8 <hr class="wp-header-end"> 9 <h2>Welcome</h2> 10 11 9 <h2>Welcome</h2> 12 10 <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> 13 11 <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 28 28 __('6 Months', 'reviews-sorted'), 29 29 __('1 Year', 'reviews-sorted'), 30 __('All', 'reviews-sorted'), 30 31 ]; 31 32 ?> -
reviews-sorted/trunk/templates/reviews-average.php
r2996967 r3142588 1 1 <?php 2 3 if( !isset($reviews) || !is_array($reviews) ){4 return;5 }6 7 2 if(!isset($data['totalRatings']) || !isset($data['totalReviews'])){ 8 3 return; … … 14 9 $is_layout_two= (isset($atts) && (isset($atts['layout']) && $atts['layout'] == 2)) ? true : false; 15 10 $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 35 11 $average = number_format($average, 1); 36 12 ?> … … 79 55 80 56 <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{ 82 69 _e( sprintf('<p>Based on <strong>%s</strong> reviews over the last %s, including %s 5 star reviews </p>', 83 70 esc_html($data['totalReviews']), … … 88 75 'reviews-sorted' 89 76 ); 77 } 90 78 ?> 91 79 <div class="tooltip"> -
reviews-sorted/trunk/templates/reviews-form.php
r3056702 r3142588 110 110 </div> 111 111 112 <input type="hidden" name="timestamp" value="<?php echo time(); ?>"> 112 113 <input type="hidden" name="action" value="rs_reviews_submit"> 113 114 <input type="hidden" name="redirect" value="<?php esc_attr_e($form_redirect_page); ?>"> -
reviews-sorted/trunk/templates/reviews-slider-1.php
r3003574 r3142588 5 5 6 6 $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 ], 14 12 'breakpoints' => [ 15 '1024' => [16 'slidesPerView' => $options['desktop'],17 ],18 13 '768' => [ 19 14 'slidesPerView' => $options['tablet'], 20 15 ], 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'], 29 18 ] 30 19 ] … … 72 61 <?php endforeach; ?> 73 62 </div><!-- .swiper-wrapper --> 74 <div class="swiper-pagination"></div> 63 75 64 <!-- navigation buttons --> 76 65 <?php if($options['arrows'] == 1): ?> -
reviews-sorted/trunk/templates/reviews-slider-2.php
r3003574 r3142588 4 4 } 5 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 ], 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 ], 13 11 'breakpoints' => [ 14 '1024' => [15 'slidesPerView' => $options['desktop'],16 ],17 12 '768' => [ 18 13 'slidesPerView' => $options['tablet'], 19 14 ], 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'], 28 17 ] 29 18 ] 30 19 ]; 31 32 if($options['arrows'] == 1) {33 $slideOptions['navigation'] = [34 'nextEl' => '.swiper-button-next',35 'prevEl' => '.swiper-button-prev',36 ];37 }38 39 20 $wraperClass = 'reviews-swiper-wrapper'; 40 21 $options['equalHeight'] ? $wraperClass .= ' item-height_equal ' : ''; … … 50 31 $created = date("F d, Y", strtotime($review->created_at)); 51 32 ?> 52 33 34 35 53 36 <div class="rs-rating-wrapper"> 54 37 <div class="rs-rating rs-custom-icons" … … 90 73 91 74 </div><!-- .swiper-wrapper --> 92 <div class="swiper-pagination"></div> 75 93 76 <!-- 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> 98 79 </div><!-- .swiper --> 99 80 </div> -
reviews-sorted/trunk/templates/reviews-slider-3.php
r3003574 r3142588 4 4 } 5 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 ], 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 ], 13 11 'breakpoints' => [ 14 '1024' => [15 'slidesPerView' => $options['desktop'],16 ],17 12 '768' => [ 18 13 'slidesPerView' => $options['tablet'], 19 14 ], 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'], 28 17 ] 29 18 ] 30 19 ]; 31 32 if($options['arrows'] == 1) {33 $slideOptions['navigation'] = [34 'nextEl' => '.swiper-button-next',35 'prevEl' => '.swiper-button-prev',36 ];37 }38 39 20 $wraperClass = 'reviews-swiper-wrapper'; 40 21 $options['equalHeight'] ? $wraperClass .= ' item-height_equal ' : ''; … … 80 61 </div><!-- .swiper-wrapper --> 81 62 82 <div class="swiper-pagination"></div>83 63 <!-- 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> 88 66 </div><!-- .swiper --> 89 67 </div> -
reviews-sorted/trunk/templates/reviews-slider.php
r3040128 r3142588 1 1 <?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 ' : ''; 2 if( !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 ' : ''; 39 22 ?> 40 23 <div class="<?php esc_attr_e($wraperClass) ?>" style="<?php echo sprintf('--gap: %spx', $options['space']); ?>"> … … 45 28 <!-- Slides --> 46 29 <?php foreach($reviews as $review): ?> 47 <?php if($review->status == 'Published'){ ?>30 <?php if($review->status == 'Published'){ ?> 48 31 <div class="swiper-slide"> 49 32 <div class="inner"> 50 33 51 34 <div class="swipe-content"> 52 35 53 36 <div class="reviewBody"> 54 37 <?php echo wpautop(wp_kses_data(stripslashes($review->content))); ?> … … 58 41 <div class="swipe-footer"> 59 42 <?php 60 $created = date("F d, Y", strtotime($review->created_at));43 $created = date("F d, Y", strtotime($review->created_at)); 61 44 ?> 62 45 … … 72 55 73 56 </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'] ) : ?> 79 71 <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 ?> 85 73 86 <!-- pagination --> 87 <?php if ( $options['dots'] ) : ?> 88 <div class="swiper-pagination"></div> 89 <?php endif ?> 90 91 </div><!-- .swiper --> 74 </div><!-- .swiper --> 92 75 93 76 </div>
Note: See TracChangeset
for help on using the changeset viewer.