Changeset 3450927
- Timestamp:
- 01/31/2026 10:16:00 AM (2 months ago)
- Location:
- sfr-book-review-showcase/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
sfr-book-review-showcase.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sfr-book-review-showcase/trunk/readme.txt
r3450905 r3450927 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.3. 17 Stable tag: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 122 122 == Changelog == 123 123 124 = 1.3.3 = 125 * Enhancement: Contact Us submenu always visible (Freemius contact form) – added contact => true and is_submenu_visible for contact. 126 * Fix: Trial/upgrade links for non-registered users now go to Connect page instead of blank pricing page (pricing_url filter). 127 * Fix: Freemius filters (pricing, contact visibility, trial redirect) now applied on init so they run every load regardless of load order. 128 * Note: Users must connect or skip to see Pricing/Contact; trial links send non-registered users to connect first so trial can complete and email is sent. 129 130 = 1.3.2 = 131 * Fix: Ensured Freemius menu and trial behaviour apply reliably (init hook for filter registration). 132 124 133 = 1.3.1 = 125 134 * Enhancement: Freemius trial methodology aligned with SFR Directory Analytics – SDK-only trial (no hardcoded trial URLs) … … 386 395 == Upgrade Notice == 387 396 397 = 1.3.3 = 398 Contact Us menu restored; trial links no longer show blank page for non-registered users (redirect to Connect). Safe to update - no action required. 399 400 = 1.3.2 = 401 Freemius filters applied on init for reliable menu and trial behaviour. Safe to update - no action required. 402 388 403 = 1.3.1 = 389 404 Freemius trial flow aligned with SDK: trial CTAs and Free Trial link only when trial is available. Account page enabled for Pro download after trial. Safe to update - no action required. -
sfr-book-review-showcase/trunk/sfr-book-review-showcase.php
r3450905 r3450927 4 4 * Plugin URI: https://supportfromrichard.co.uk/plugins/sfr-book-review-showcase 5 5 * Description: Showcase book reviews from Amazon on your WordPress site with customisable layouts, easy imports, and built-in analytics. 6 * Version: 1.3. 16 * Version: 1.3.3 7 7 * Author: Support From Richard 8 8 * Author URI: https://supportfromrichard.co.uk … … 18 18 19 19 if ( ! defined( 'SFRBRS_VERSION' ) ) { 20 define( 'SFRBRS_VERSION', '1.3. 1' );20 define( 'SFRBRS_VERSION', '1.3.3' ); 21 21 } 22 22 … … 70 70 'account' => true, 71 71 'support' => false, 72 'contact' => true, 72 73 'pricing' => true, 73 74 ), … … 118 119 $fs->add_filter( 'is_pricing_page_visible', '__return_true' ); 119 120 $fs->add_filter( 'is_submenu_visible', function( $visible, $menu_id ) { 120 if ( 'pricing' === $menu_id) {121 if ( in_array( $menu_id, array( 'pricing', 'contact' ), true ) ) { 121 122 return true; 122 123 } … … 125 126 // Ensure has_paid_plan returns true 126 127 $fs->add_filter( 'has_paid_plans', '__return_true' ); 127 128 129 // When user is not registered (never connected or skipped), trial/pricing can show blank or fail to start trial. 130 // Send trial/upgrade links to connect first so they register; then they can start trial from Pricing and get email. 131 $fs->add_filter( 'pricing_url', function( $url ) use ( $fs ) { 132 if ( ! $fs->is_registered() && method_exists( $fs, 'get_connect_url' ) ) { 133 return $fs->get_connect_url(); 134 } 135 return $url; 136 }, 10, 1 ); 137 128 138 // Customize deactivation feedback reasons - add "Upgraded to Pro plugin" option 129 139 $fs->add_filter( 'uninstall_reasons', function( $reasons ) { … … 153 163 } 154 164 165 /** 166 * Apply Freemius menu/visibility and trial URL filters. 167 * Runs on init so filters are always applied when the free plugin is loaded (not only on first-definition path). 168 */ 169 function sfrbrs_apply_freemius_filters() { 170 if ( ! function_exists( 'sfrbrs_fs' ) ) { 171 return; 172 } 173 $fs = sfrbrs_fs(); 174 if ( ! $fs || ! is_object( $fs ) ) { 175 return; 176 } 177 // Only apply for the free plugin instance (check slug). 178 if ( method_exists( $fs, 'get_slug' ) && $fs->get_slug() !== 'sfr-book-review-showcase' ) { 179 return; 180 } 181 182 $plugin_admin_url = admin_url( 'admin.php?page=sfrbrs-settings' ); 183 $fs->add_filter( 'is_pricing_page_visible', '__return_true' ); 184 $fs->add_filter( 'has_paid_plans', '__return_true' ); 185 $fs->add_filter( 'is_submenu_visible', function( $visible, $menu_id ) { 186 if ( in_array( $menu_id, array( 'pricing', 'contact' ), true ) ) { 187 return true; 188 } 189 return $visible; 190 }, 10, 2 ); 191 $fs->add_filter( 'pricing_url', function( $url ) use ( $fs ) { 192 if ( ! $fs->is_registered() && method_exists( $fs, 'get_connect_url' ) ) { 193 return $fs->get_connect_url(); 194 } 195 return $url; 196 }, 10, 1 ); 197 } 198 199 add_action( 'init', 'sfrbrs_apply_freemius_filters', 1 ); 200 155 201 require_once SFRBRS_PLUGIN_DIR . 'includes/class-sfrbrs-loader.php'; 156 202 require_once SFRBRS_PLUGIN_DIR . 'includes/class-sfrbrs-activator.php';
Note: See TracChangeset
for help on using the changeset viewer.