Changeset 2809054
- Timestamp:
- 11/01/2022 07:07:18 PM (3 years ago)
- Location:
- wp-customer-reviews/trunk
- Files:
-
- 3 edited
-
changelog.txt (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wp-customer-reviews-3.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-customer-reviews/trunk/changelog.txt
r2791146 r2809054 1 = 3.6.5 = 2 * 11/01/2022 3 * [Update] Compatibility with WP 6.1 4 * [Bugfix] Prevent division by zero error. 5 1 6 = 3.6.4 = 2 7 * 09/27/2022 -
wp-customer-reviews/trunk/readme.txt
r2791146 r2809054 4 4 Tags: business, google, hcard, schema.org, hproduct, hreview, microformat, microformats, mu, places, plugin, product, rating, ratings, rdfa, review, review box, review widget, reviews, seo, service, snippet, snippets, testimonial, testimonials, widget, wordpressmu, wpmu 5 5 Requires at least: 3.0.0 6 Tested up to: 6. 07 Stable tag: 3.6. 46 Tested up to: 6.1 7 Stable tag: 3.6.5 8 8 License: MIT 9 9 License URI: http://opensource.org/licenses/MIT … … 63 63 == Changelog == 64 64 65 = 3.6.5 = 66 * 11/01/2022 67 * [Update] Compatibility with WP 6.1 68 * [Bugfix] Prevent division by zero error. 69 65 70 = 3.6.4 = 66 71 * 09/27/2022 -
wp-customer-reviews/trunk/wp-customer-reviews-3.php
r2791146 r2809054 4 4 * Plugin URI: https://wordpress.org/plugins/wp-customer-reviews/ 5 5 * Description: Allows your visitors to leave business / product reviews. Testimonials are in Microdata / Microformat and may display star ratings in search results. 6 * Version: 3.6. 46 * Version: 3.6.5 7 7 * Author: Aaron Queen 8 8 * Author URI: https://wordpress.org/plugins/wp-customer-reviews/ … … 10 10 * License: MIT 11 11 * 12 * Copyright (c) 202 1Aaron Queen12 * Copyright (c) 2022 Aaron Queen 13 13 * 14 14 * Permission is hereby granted, free of charge, to any person obtaining a copy … … 422 422 } 423 423 424 function iso8601($time=false) {425 if ($time === false) { $time = time(); }426 $date = date('Y-m-d\TH:i:sO', $time);427 return (substr($date, 0, strlen($date) - 2) . ':' . substr($date, -2));428 }429 430 function pagination($opts, $thispage, $total_results) {431 $rtn = false;424 function iso8601($time=false) { 425 if ($time === false) { $time = time(); } 426 $date = date('Y-m-d\TH:i:sO', $time); 427 return (substr($date, 0, strlen($date) - 2) . ':' . substr($date, -2)); 428 } 429 430 function pagination($opts, $thispage, $total_results) { 431 $rtn = false; 432 432 $thispage = intval($thispage); 433 if ($thispage == 0) { $thispage = 1; }434 $pages = intval(ceil($total_results / $opts->perpage));435 436 if ($pages > 1) {433 if ($thispage == 0) { $thispage = 1; } 434 $pages = intval(ceil($total_results / $opts->perpage)); 435 436 if ($pages > 1) { 437 437 $rtn = array(); 438 438 $rtn['pageOpts'] = htmlspecialchars(json_encode($opts), ENT_QUOTES); … … 447 447 448 448 $rtn['hasPrev'] = false; 449 if ($thispage !== 1) {450 $rtn['hasPrev'] = true;451 }452 453 for ($i = 1; $i <= $pages; $i++) {454 if ($i === $thispage) {449 if ($thispage !== 1) { 450 $rtn['hasPrev'] = true; 451 } 452 453 for ($i = 1; $i <= $pages; $i++) { 454 if ($i === $thispage) { 455 455 $tmp = array(); 456 456 $tmp['pageNum'] = $i; 457 457 $tmp['current'] = true; 458 458 $rtn['pages'][] = $tmp; 459 } else if (!($i >= ($thispage + $range + 1) || $i <= ($thispage - $range - 1)) || $pages <= $showitems) {460 $tmp = array();461 $tmp['pageNum'] = $i;462 $tmp['current'] = false;463 $rtn['pages'][] = $tmp;464 }465 }466 459 } else if (!($i >= ($thispage + $range + 1) || $i <= ($thispage - $range - 1)) || $pages <= $showitems) { 460 $tmp = array(); 461 $tmp['pageNum'] = $i; 462 $tmp['current'] = false; 463 $rtn['pages'][] = $tmp; 464 } 465 } 466 467 467 $rtn['hasNext'] = false; 468 if ($thispage !== $pages) {469 $rtn['hasNext'] = true;470 }471 }472 468 if ($thispage !== $pages) { 469 $rtn['hasNext'] = true; 470 } 471 } 472 473 473 return $rtn; 474 }474 } 475 475 476 476 function get_meta_or_default($metaArr, $key, $default) { … … 566 566 if ($opts->thispage < 1) { $opts->thispage = 1; } 567 567 if ($opts->perpage < 1) { $opts->perpage = intval($this->options['reviews_per_page']); } 568 if ($opts->perpage < 1) { $opts->perpage = 10; } 568 569 569 570 $postid = $opts->postid; 570 $thispage = $opts->thispage;571 $thispage = $opts->thispage; 571 572 572 573 if ($opts->num > 0 && $opts->num < $opts->perpage) {
Note: See TracChangeset
for help on using the changeset viewer.