Changeset 3455323
- Timestamp:
- 02/06/2026 11:47:26 AM (2 weeks ago)
- Location:
- plausible-analytics
- Files:
-
- 10 edited
- 1 copied
-
tags/2.5.3 (copied) (copied from plausible-analytics/trunk)
-
tags/2.5.3/languages/plausible-analytics.pot (modified) (3 diffs)
-
tags/2.5.3/plausible-analytics.php (modified) (1 diff)
-
tags/2.5.3/readme.txt (modified) (2 diffs)
-
tags/2.5.3/src/Admin/Upgrades.php (modified) (2 diffs)
-
tags/2.5.3/src/Client.php (modified) (1 diff)
-
trunk/languages/plausible-analytics.pot (modified) (3 diffs)
-
trunk/plausible-analytics.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Admin/Upgrades.php (modified) (2 diffs)
-
trunk/src/Client.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plausible-analytics/tags/2.5.3/languages/plausible-analytics.pot
r3454869 r3455323 8 8 "Content-Transfer-Encoding: 8bit\n" 9 9 "Language-Team: Plausible Analytics Team <[email protected]>\n" 10 "POT-Creation-Date: 2026-02-0 5 18:00+0000\n"10 "POT-Creation-Date: 2026-02-06 11:46+0000\n" 11 11 "Report-Msgid-Bugs-To: https://github.com/plausible/wordpress/issues/new\n" 12 12 "X-Poedit-Basepath: ..\n" … … 57 57 msgstr "" 58 58 59 #: src/Client.php:2 2759 #: src/Client.php:232 60 60 msgid "Something went wrong while updating tracker script configuration: %s" 61 61 msgstr "" 62 62 63 #: src/Client.php:25 263 #: src/Client.php:257 64 64 msgid "Something went wrong, try again later." 65 65 msgstr "" 66 66 67 #: src/Client.php: 29867 #: src/Client.php:303 68 68 msgid "Something went wrong while creating Shared Link: %s" 69 69 msgstr "" 70 70 71 #: src/Client.php:3 3671 #: src/Client.php:341 72 72 msgid "Something went wrong while creating Custom Event Goal: %s" 73 73 msgstr "" 74 74 75 #: src/Client.php:35 375 #: src/Client.php:358 76 76 msgid "Something went wrong while creating Funnel: %s" 77 77 msgstr "" 78 78 79 #: src/Client.php:37 079 #: src/Client.php:375 80 80 msgid "Something went wrong while deleting a Custom Event Goal: %s" 81 81 msgstr "" 82 82 83 #: src/Client.php:39 383 #: src/Client.php:398 84 84 msgid "Something went wrong while enabling Pageview Properties: %s" 85 85 msgstr "" … … 142 142 msgstr "" 143 143 144 #: src/Admin/Upgrades.php:383 145 msgid "An API token for Plausible Analytics is required. Please create one from the <a href=\"%s\">Settings screen</a> and upgrade Plausible CE if necessary." 146 msgstr "" 147 144 148 #: src/Integrations/EDD.php:37, src/Integrations/WooCommerce.php:40 145 149 msgid "Visit %s*" -
plausible-analytics/tags/2.5.3/plausible-analytics.php
r3454869 r3455323 6 6 * Author: Plausible.io 7 7 * Author URI: https://plausible.io 8 * Version: 2.5. 28 * Version: 2.5.3 9 9 * Text Domain: plausible-analytics 10 10 * Domain Path: /languages -
plausible-analytics/tags/2.5.3/readme.txt
r3454869 r3455323 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.2 8 Stable tag: 2.5. 28 Stable tag: 2.5.3 9 9 License: Massachusetts Institute of Technology (MIT) license 10 10 License URI: https://opensource.org/licenses/MIT … … 157 157 == Changelog == 158 158 159 = 2.5.3 = 160 * Fixed: display a notice to CE users that haven't entered an API token yet. 161 * Fixed: a critical error would occur if the entered API token was invalid. 162 159 163 = 2.5.2 = 160 164 * Fixed: CE users still using a self-hosted version without Plugins API support would get a critical error after updating to 2.5.1. -
plausible-analytics/tags/2.5.3/src/Admin/Upgrades.php
r3454684 r3455323 95 95 } 96 96 97 if ( version_compare( $plausible_analytics_version, '2.5.3', '<' ) ) { 98 $this->upgrade_to_253(); 99 } 100 97 101 // Add required upgrade routines for future versions here. 98 102 } … … 347 351 update_option( 'plausible_analytics_version', '2.5.1' ); 348 352 } 353 354 /** 355 * Show an admin-wide notice to CE users that haven't entered an API token yet. 356 * 357 * @return void 358 */ 359 public function upgrade_to_253() { 360 $self_hosted_domain = Helpers::get_settings()['self_hosted_domain']; 361 $api_token = Helpers::get_settings()['api_token']; 362 363 // Not a CE user or a CE user already using the Plugins API. 364 if ( empty( $self_hosted_domain ) || ! empty( $api_token ) ) { 365 update_option( 'plausible_analytics_version', '2.5.3' ); 366 367 return; 368 } 369 370 add_action( 'admin_notices', [ $this, 'show_api_token_notice' ] ); 371 } 372 373 /** 374 * Display a notice to CE users that haven't entered an API token yet. 375 * 376 * @return void 377 */ 378 public function show_api_token_notice() { 379 $url = admin_url( 'options-general.php?page=plausible_analytics' ); 380 381 ?> 382 <div class="notice notice-warning"> 383 <p><?php echo sprintf( __( 'An API token for Plausible Analytics is required. Please create one from the <a href="%s">Settings screen</a> and upgrade Plausible CE if necessary.', 384 'plausible-analytics' ) 385 , $url ); ?></p> 386 </div> 387 <?php 388 } 349 389 } -
plausible-analytics/tags/2.5.3/src/Client.php
r3454684 r3455323 185 185 if ( ! $id ) { 186 186 $tracker_configuration = $this->get_configuration(); 187 $id = $tracker_configuration->getId(); 187 188 if ( ! $tracker_configuration instanceof Client\Model\TrackerScriptConfigurationTrackerScriptConfiguration ) { 189 return ''; 190 } 191 192 $id = $tracker_configuration->getId(); 188 193 189 194 update_option( 'plausible_analytics_tracker_id', $id ); -
plausible-analytics/trunk/languages/plausible-analytics.pot
r3454869 r3455323 8 8 "Content-Transfer-Encoding: 8bit\n" 9 9 "Language-Team: Plausible Analytics Team <[email protected]>\n" 10 "POT-Creation-Date: 2026-02-0 5 18:00+0000\n"10 "POT-Creation-Date: 2026-02-06 11:46+0000\n" 11 11 "Report-Msgid-Bugs-To: https://github.com/plausible/wordpress/issues/new\n" 12 12 "X-Poedit-Basepath: ..\n" … … 57 57 msgstr "" 58 58 59 #: src/Client.php:2 2759 #: src/Client.php:232 60 60 msgid "Something went wrong while updating tracker script configuration: %s" 61 61 msgstr "" 62 62 63 #: src/Client.php:25 263 #: src/Client.php:257 64 64 msgid "Something went wrong, try again later." 65 65 msgstr "" 66 66 67 #: src/Client.php: 29867 #: src/Client.php:303 68 68 msgid "Something went wrong while creating Shared Link: %s" 69 69 msgstr "" 70 70 71 #: src/Client.php:3 3671 #: src/Client.php:341 72 72 msgid "Something went wrong while creating Custom Event Goal: %s" 73 73 msgstr "" 74 74 75 #: src/Client.php:35 375 #: src/Client.php:358 76 76 msgid "Something went wrong while creating Funnel: %s" 77 77 msgstr "" 78 78 79 #: src/Client.php:37 079 #: src/Client.php:375 80 80 msgid "Something went wrong while deleting a Custom Event Goal: %s" 81 81 msgstr "" 82 82 83 #: src/Client.php:39 383 #: src/Client.php:398 84 84 msgid "Something went wrong while enabling Pageview Properties: %s" 85 85 msgstr "" … … 142 142 msgstr "" 143 143 144 #: src/Admin/Upgrades.php:383 145 msgid "An API token for Plausible Analytics is required. Please create one from the <a href=\"%s\">Settings screen</a> and upgrade Plausible CE if necessary." 146 msgstr "" 147 144 148 #: src/Integrations/EDD.php:37, src/Integrations/WooCommerce.php:40 145 149 msgid "Visit %s*" -
plausible-analytics/trunk/plausible-analytics.php
r3454869 r3455323 6 6 * Author: Plausible.io 7 7 * Author URI: https://plausible.io 8 * Version: 2.5. 28 * Version: 2.5.3 9 9 * Text Domain: plausible-analytics 10 10 * Domain Path: /languages -
plausible-analytics/trunk/readme.txt
r3454869 r3455323 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.2 8 Stable tag: 2.5. 28 Stable tag: 2.5.3 9 9 License: Massachusetts Institute of Technology (MIT) license 10 10 License URI: https://opensource.org/licenses/MIT … … 157 157 == Changelog == 158 158 159 = 2.5.3 = 160 * Fixed: display a notice to CE users that haven't entered an API token yet. 161 * Fixed: a critical error would occur if the entered API token was invalid. 162 159 163 = 2.5.2 = 160 164 * Fixed: CE users still using a self-hosted version without Plugins API support would get a critical error after updating to 2.5.1. -
plausible-analytics/trunk/src/Admin/Upgrades.php
r3454684 r3455323 95 95 } 96 96 97 if ( version_compare( $plausible_analytics_version, '2.5.3', '<' ) ) { 98 $this->upgrade_to_253(); 99 } 100 97 101 // Add required upgrade routines for future versions here. 98 102 } … … 347 351 update_option( 'plausible_analytics_version', '2.5.1' ); 348 352 } 353 354 /** 355 * Show an admin-wide notice to CE users that haven't entered an API token yet. 356 * 357 * @return void 358 */ 359 public function upgrade_to_253() { 360 $self_hosted_domain = Helpers::get_settings()['self_hosted_domain']; 361 $api_token = Helpers::get_settings()['api_token']; 362 363 // Not a CE user or a CE user already using the Plugins API. 364 if ( empty( $self_hosted_domain ) || ! empty( $api_token ) ) { 365 update_option( 'plausible_analytics_version', '2.5.3' ); 366 367 return; 368 } 369 370 add_action( 'admin_notices', [ $this, 'show_api_token_notice' ] ); 371 } 372 373 /** 374 * Display a notice to CE users that haven't entered an API token yet. 375 * 376 * @return void 377 */ 378 public function show_api_token_notice() { 379 $url = admin_url( 'options-general.php?page=plausible_analytics' ); 380 381 ?> 382 <div class="notice notice-warning"> 383 <p><?php echo sprintf( __( 'An API token for Plausible Analytics is required. Please create one from the <a href="%s">Settings screen</a> and upgrade Plausible CE if necessary.', 384 'plausible-analytics' ) 385 , $url ); ?></p> 386 </div> 387 <?php 388 } 349 389 } -
plausible-analytics/trunk/src/Client.php
r3454684 r3455323 185 185 if ( ! $id ) { 186 186 $tracker_configuration = $this->get_configuration(); 187 $id = $tracker_configuration->getId(); 187 188 if ( ! $tracker_configuration instanceof Client\Model\TrackerScriptConfigurationTrackerScriptConfiguration ) { 189 return ''; 190 } 191 192 $id = $tracker_configuration->getId(); 188 193 189 194 update_option( 'plausible_analytics_tracker_id', $id );
Note: See TracChangeset
for help on using the changeset viewer.