Changeset 3745447
- Timestamp:
- 10/14/2026 06:15:46 AM (4 weeks ago)
- Location:
- trustie/tags/1.1.29
- Files:
-
- 2 added
- 7 edited
- 1 copied
-
. (copied) (copied from trustie/trunk )
-
assets/css/reviews.css (modified) (1 diff)
-
assets/js/review-anchor.js (added)
-
includes/class-trustie-display.php (modified) (2 diffs)
-
includes/class-trustie-requests.php (modified) (2 diffs)
-
includes/shared/assets/js/tracksies-nonce-refresh.js (modified) (1 diff)
-
includes/shared/class-tracksies-nonce-refresh.php (modified) (4 diffs)
-
includes/trustie-review-link.php (added)
-
readme.txt (modified) (3 diffs)
-
trustie.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trustie/tags/1.1.29/assets/css/reviews.css
r3677489 r3745447 719 719 position: fixed; 720 720 z-index: 99999; 721 font-family: var(--trustie-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); 721 /* The page's own font when Brand Hub has none to give. A system-font 722 fallback here showed Noble Ink signed-in visitors the wrong font 723 whenever Brand Hub wrote --tracksies-font-body: inherit (14 Oct 2026). */ 724 font-family: var(--trustie-font-body, inherit); 722 725 } 723 726 -
trustie/tags/1.1.29/includes/class-trustie-display.php
r3677489 r3745447 354 354 355 355 $this->enqueue_styles(); 356 357 // Email links and the stars point at #reviews, inside this tab. 358 if ( function_exists( 'trustie_free_enqueue_review_anchor_script' ) ) { 359 trustie_free_enqueue_review_anchor_script(); 360 } 356 361 357 362 $reviews = $this->get_product_reviews( $product->get_id(), array( … … 1703 1708 } 1704 1709 1710 // Links to #reviews reach this form's section - see review-anchor.js. 1711 if ( function_exists( 'trustie_free_enqueue_review_anchor_script' ) ) { 1712 trustie_free_enqueue_review_anchor_script(); 1713 } 1714 1705 1715 // Allow Pro to provide a custom form (form builder, UGC uploads, etc.). 1706 1716 // Form HTML is built internally by render_frontend_form() with proper escaping. -
trustie/tags/1.1.29/includes/class-trustie-requests.php
r3737502 r3745447 734 734 } 735 735 736 // Proof of purchase for the Verified badge: the link came from this 737 // order (trustie-review-link.php). Never a login. 738 if ( function_exists( 'trustie_free_set_review_link_cookie' ) ) { 739 trustie_free_set_review_link_cookie( $order_id, $email ); 740 } 741 736 742 // Get the product. 737 743 $product = wc_get_product( $product_id ); … … 740 746 } 741 747 742 // Straight to the review form, for everyone. Never log anyone in from748 // Straight to the reviews, for everyone. Never log anyone in from 743 749 // this link: it does not expire, can be used again, and reaches whoever 744 750 // holds the email, so signing in from it handed the account - a shop 745 751 // owner's included - to anyone the email was forwarded to. And guests 746 752 // are not sent away to log in, because the form takes guest reviews. 747 wp_safe_redirect( get_permalink( $product_id ) . '#respond' ); 753 // #reviews, where the stars link too (Sarah, 14 Oct 2026: "just point it 754 // at #reviews"). review-anchor.js opens the tab it sits in. 755 wp_safe_redirect( get_permalink( $product_id ) . '#reviews' ); 748 756 exit; 749 757 } -
trustie/tags/1.1.29/includes/shared/assets/js/tracksies-nonce-refresh.js
r3677489 r3745447 49 49 50 50 var url = cfg.endpoint + ( cfg.endpoint.indexOf( '?' ) === -1 ? '?' : '&' ) + 51 'action=' + encodeURIComponent( action ); 51 'action=' + encodeURIComponent( action ) + 52 // A URL no cache has seen. Page and REST caches (LiteSpeed's, at 53 // least) key on the URL and ignore no-store, and a cached answer 54 // hands everyone one stored nonce. 55 '&_tn=' + Date.now().toString( 36 ) + Math.random().toString( 36 ).slice( 2, 8 ); 56 57 var headers = { Accept: 'application/json' }; 58 // Signed in: without this WordPress runs the request as a logged-out 59 // visitor and hands back a nonce that fails for this session (403). 60 if ( cfg.restNonce ) { 61 headers[ 'X-WP-Nonce' ] = cfg.restNonce; 62 } 52 63 53 64 inflight[ action ] = fetch( url, { 54 65 credentials: 'same-origin', 55 headers: { Accept: 'application/json' },66 headers: headers, 56 67 cache: 'no-store' 57 68 } ) -
trustie/tags/1.1.29/includes/shared/class-tracksies-nonce-refresh.php
r3677489 r3745447 30 30 return; 31 31 } 32 define( 'TRACKSIES_NONCE_REFRESH_VERSION', '1.0. 0' );32 define( 'TRACKSIES_NONCE_REFRESH_VERSION', '1.0.2' ); 33 33 34 34 /** … … 220 220 // visitor the same stale token the page already had. 221 221 nocache_headers(); 222 // LiteSpeed's REST cache ignores the headers above (Noble Ink, 14 Oct 223 // 2026: X-LiteSpeed-Cache: hit on this URL) and handed every visitor, 224 // signed in or not, one stored logged-out nonce. Tell it directly. 225 do_action( 'litespeed_control_set_nocache', 'Tracksies nonce refresh' ); 222 226 223 227 $response = rest_ensure_response( … … 227 231 ); 228 232 $response->header( 'Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0' ); 233 $response->header( 'X-LiteSpeed-Cache-Control', 'no-cache' ); 229 234 230 235 return $response; … … 252 257 'tracksiesNonceRefresh', 253 258 array( 254 'endpoint' => rest_url( self::REST_NAMESPACE . '/nonce' ), 255 'actions' => $actions, 256 'globals' => (object) $this->get_refreshable_globals(), 259 'endpoint' => rest_url( self::REST_NAMESPACE . '/nonce' ), 260 'actions' => $actions, 261 'globals' => (object) $this->get_refreshable_globals(), 262 // A REST request carrying the login cookie but no X-WP-Nonce 263 // is run as a logged-OUT visitor (core rest_cookie_check_errors), 264 // so without this the endpoint minted a logged-out nonce and the 265 // script swapped it over the page's good one: every Trustie AJAX 266 // call a signed-in customer made after their first click got 403 267 // (found on a live store, 14 Oct 2026). Only signed-in pages need 268 // it, and those are never served from a shared page cache. 269 'restNonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : '', 257 270 ) 258 271 ); -
trustie/tags/1.1.29/readme.txt
r3737502 r3745447 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.1.2 87 Stable tag: 1.1.29 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 280 280 281 281 == Changelog == 282 283 = 1.1.29 = 284 * Reviews page and testimonial form fixed for signed-in customers. 285 * Floating reviews tab and panel font fixed. 286 * Verified badge fixed. A new review is verified when the reviewer is signed in and bought the product, or came from that order's review request email. 287 * Review email buttons, and the star rating on a product page, open the product's reviews, even when the Reviews tab starts closed. 282 288 283 289 = 1.1.28 = … … 431 437 == Upgrade Notice == 432 438 439 = 1.1.29 = 440 Fixes for the reviews page, the testimonial form, review email links and the Verified badge. 441 433 442 = 1.1.28 = 434 443 A security fix for the links in review request emails. Please update. -
trustie/tags/1.1.29/trustie.php
r3737502 r3745447 4 4 * Plugin URI: https://docs.tracksies.com/docs/trustie-free/ 5 5 * Description: Reviews, testimonials, and Google reviews for WordPress. Display star ratings, collect testimonials, show Google Business reviews, and add a floating reviews widget, with or without WooCommerce. 6 * Version: 1.1.2 86 * Version: 1.1.29 7 7 * Author: Tracksies 8 8 * Author URI: https://tracksies.com … … 40 40 */ 41 41 if ( ! defined( 'TRUSTIE_VERSION' ) ) { 42 define( 'TRUSTIE_VERSION', '1.1.2 8' );42 define( 'TRUSTIE_VERSION', '1.1.29' ); 43 43 } 44 44 if ( ! defined( 'TRUSTIE_PLUGIN_FILE' ) ) { … … 94 94 tracksies_register_shared( 'schema', '1.0.0', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-trustie-schema.php' ); 95 95 tracksies_register_shared( 'helpers', '1.0.1', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-tracksies-helpers.php' ); 96 tracksies_register_shared( 'nonce-refresh', '1.0. 0', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-tracksies-nonce-refresh.php' );96 tracksies_register_shared( 'nonce-refresh', '1.0.2', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-tracksies-nonce-refresh.php' ); 97 97 98 98 // Nonces baked into cached HTML expire long before the cache does, so every … … 129 129 // Loaded at file-load time so action hooks are registered before the features class fires them. 130 130 require_once TRUSTIE_PLUGIN_DIR . 'includes/trustie-free-features.php'; 131 132 // Who gets the Verified badge, and where review email links land. 133 require_once TRUSTIE_PLUGIN_DIR . 'includes/trustie-review-link.php'; 131 134 132 135 /**
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)