From f3430c6433c5fffdc5884ebeccbf7c4500ed2f34 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Wed, 12 Jul 2023 09:26:05 -0400 Subject: [PATCH 1/5] fix dev notes URL thanks Steven Lin --- CHANGES.md | 2 ++ src/WPBT/WP_Beta_Tester.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ffc84d9..a2cb48d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,7 @@ [unreleased] +* fix dev-notes URL + #### 3.5.1 / 2023-07-06 * add setting in `Extra Settings` to hide `Report a Bug` * add filter `wpbt_hide_report_a_bug` diff --git a/src/WPBT/WP_Beta_Tester.php b/src/WPBT/WP_Beta_Tester.php index 76dddeb..23100a2 100644 --- a/src/WPBT/WP_Beta_Tester.php +++ b/src/WPBT/WP_Beta_Tester.php @@ -413,7 +413,7 @@ private function add_dev_notes_field_guide_links( $milestone ) { $dev_note_link = sprintf( /* translators: %1$s Link to dev notes, %2$s: Link title */ '%2$s', - "https://make.wordpress.org/core/tag/dev-notes-$milestone_dash/", + "https://make.wordpress.org/core/tag/dev-notes+$milestone_dash/", /* translators: %s: Milestone version */ sprintf( __( 'WordPress %s Dev Notes', 'wordpress-beta-tester' ), $milestone ) ); From 50a8fdef6c6e74b40f06965856ec5a9bf676e9c3 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Wed, 12 Jul 2023 09:26:19 -0400 Subject: [PATCH 2/5] release --- CHANGES.md | 1 + readme.txt | 5 ++++- wp-beta-tester.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a2cb48d..9380d3e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ [unreleased] +#### 3.5.2 / 2023-07-12 * fix dev-notes URL #### 3.5.1 / 2023-07-06 diff --git a/readme.txt b/readme.txt index 5d14e76..7a8e05c 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ License URI: https://www.opensource.org/licenses/GPL-2.0 Requires at least: 3.1 Requires PHP: 5.6 Tested up to: 6.3 -Stable Tag: 3.5.1 +Stable Tag: 3.5.2 Allows you to easily upgrade for testing the next versions of WordPress. @@ -40,6 +40,9 @@ PRs are welcome on [GitHub](https://github.com/afragen/wordpress-beta-tester). ## Changelog +#### 3.5.2 / 2023-07-12 +* fix dev-notes URL + #### 3.5.1 / 2023-07-06 * add setting in `Extra Settings` to hide `Report a Bug` * add filter `wpbt_hide_report_a_bug` diff --git a/wp-beta-tester.php b/wp-beta-tester.php index 58cdc28..b9dc09c 100644 --- a/wp-beta-tester.php +++ b/wp-beta-tester.php @@ -13,7 +13,7 @@ * Plugin URI: https://wordpress.org/plugins/wordpress-beta-tester/ * Description: Allows you to easily upgrade to Beta releases. * Author: WordPress Upgrade/Install Team - * Version: 3.5.1 + * Version: 3.5.2 * Network: true * Author URI: https://make.wordpress.org/core/components/upgrade-install/ * Text Domain: wordpress-beta-tester From 7b6bf1c8d1a26b297fa2b3f998bd74b46e894ea7 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Thu, 20 Jul 2023 12:34:02 -0700 Subject: [PATCH 3/5] set default $report_url and update if WP Test Reports active --- CHANGES.md | 1 + src/WPBT/WP_Beta_Tester.php | 29 ++++++++++------------------- wp-beta-tester.php | 2 +- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9380d3e..c5743de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,5 @@ [unreleased] +* update for changed standalone afragen/test-reports plugin #### 3.5.2 / 2023-07-12 * fix dev-notes URL diff --git a/src/WPBT/WP_Beta_Tester.php b/src/WPBT/WP_Beta_Tester.php index 23100a2..72db4b6 100644 --- a/src/WPBT/WP_Beta_Tester.php +++ b/src/WPBT/WP_Beta_Tester.php @@ -308,18 +308,18 @@ public function beta_tester_dashboard() { $update_version = ( new WPBT_Core( $this, self::$options ) )->get_next_version( $preferred->version ); $report_url = ''; - if ( ! apply_filters( 'wpbt_hide_report_a_bug', false ) ) { - $report_url = add_query_arg( - array( - 'page' => 'wp-beta-tester', - 'tab' => 'wp_beta_tester_bug_report', - ), - is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'tools.php' ) - ); - } elseif ( is_plugin_active( 'report-a-bug/report-a-bug.php' ) ) { + $report_url = add_query_arg( + array( + 'page' => 'wp-beta-tester', + 'tab' => 'wp_beta_tester_bug_report', + ), + is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'tools.php' ) + ); + + if ( is_plugin_active( 'test-reports/wp-test-reports.php' ) ) { $report_url = add_query_arg( array( - 'page' => 'report-a-bug', + 'page' => 'wp-test-reports', ), is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'tools.php' ) ); @@ -334,15 +334,6 @@ public function beta_tester_dashboard() { /* translators: %1: link to closed and reopened trac tickets on current milestone */ printf( wp_kses_post( '

' . __( 'Here are the commits for the milestone.', 'wordpress-beta-tester' ) . '

' ), esc_url( "https://core.trac.wordpress.org/query?status=closed&status=reopened&milestone=$milestone" ) ); - if ( empty( $report_url ) ) { - $report_url = add_query_arg( - array( - 'page' => 'wp-beta-tester', - 'tab' => 'wp_beta_tester_extras', - ), - is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'tools.php' ) - ); - } /* translators: %s: link to Report a Bug tab */ printf( wp_kses_post( '

' . " $bug " . __( 'Found a bug? Report it!', 'wordpress-beta-tester' ) . '

' ), esc_url( $report_url ) ); diff --git a/wp-beta-tester.php b/wp-beta-tester.php index b9dc09c..2baf50d 100644 --- a/wp-beta-tester.php +++ b/wp-beta-tester.php @@ -13,7 +13,7 @@ * Plugin URI: https://wordpress.org/plugins/wordpress-beta-tester/ * Description: Allows you to easily upgrade to Beta releases. * Author: WordPress Upgrade/Install Team - * Version: 3.5.2 + * Version: 3.5.2.1 * Network: true * Author URI: https://make.wordpress.org/core/components/upgrade-install/ * Text Domain: wordpress-beta-tester From 3770deb998bc3a0c46d84d6a14636ef0f72b03b0 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Fri, 28 Jul 2023 19:27:27 -0700 Subject: [PATCH 4/5] set actual next beta/RC in messaging --- CHANGES.md | 1 + src/WPBT/WPBT_Core.php | 20 ++++++++++++++++---- wp-beta-tester.php | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c5743de..ba1fe77 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ [unreleased] * update for changed standalone afragen/test-reports plugin +* set actual next beta/RC in messaging #### 3.5.2 / 2023-07-12 * fix dev-notes URL diff --git a/src/WPBT/WPBT_Core.php b/src/WPBT/WPBT_Core.php index c00861c..53480d8 100644 --- a/src/WPBT/WPBT_Core.php +++ b/src/WPBT/WPBT_Core.php @@ -372,6 +372,15 @@ public function get_next_version( $preferred_version ) { $beta_rc = ! empty( self::$options['stream-option'] ); $next_version = $this->calculate_next_versions(); + // Try to set actual next beta/RC. + if ( ( isset( $next_version['beta'] ) && version_compare( $next_version['preferred'], $next_version['beta'], '<' ) ) + || ( isset( $next_version['rc'] ) && version_compare( $next_version['preferred'], $next_version['rc'], '<' ) ) + ) { + unset( $next_version['preferred'] ); + } else { + unset( $next_version['beta'], $next_version['rc'] ); + } + // Site is not on a beta/RC stream so use the preferred version. if ( ! $beta_rc && ! empty( $next_version ) && ! self::$core_update_stream_constant ) { /* translators: %s: version number */ @@ -405,6 +414,7 @@ public function calculate_next_versions() { $current_release = $this->wp_beta_tester->get_current_wp_release(); $next_release = array_map( 'intval', explode( '.', $current_release ) ); $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version ); + $preferred = $this->wp_beta_tester->get_preferred_from_update_core(); // User on a current release. if ( ! $is_development_version ) { @@ -448,11 +458,13 @@ public function calculate_next_versions() { } $next_versions = array( - 'point' => $next_point, - 'beta' => $exploded_version[0] . '-beta' . $next_beta, - 'rc' => $exploded_version[0] . '-RC' . $next_rc, - 'release' => $exploded_version[0], + 'point' => $next_point, + 'beta' => $exploded_version[0] . '-beta' . $next_beta, + 'rc' => $exploded_version[0] . '-RC' . $next_rc, + 'preferred' => isset( $preferred->version ) ? $preferred->version : 0, + 'release' => $exploded_version[0], ); + if ( ! $next_versions['beta'] || 'rc' === self::$options['stream-option'] || 'rc' === self::$core_update_stream_constant || 1 < $next_rc ) { diff --git a/wp-beta-tester.php b/wp-beta-tester.php index 2baf50d..b7b863b 100644 --- a/wp-beta-tester.php +++ b/wp-beta-tester.php @@ -13,7 +13,7 @@ * Plugin URI: https://wordpress.org/plugins/wordpress-beta-tester/ * Description: Allows you to easily upgrade to Beta releases. * Author: WordPress Upgrade/Install Team - * Version: 3.5.2.1 + * Version: 3.5.2.2 * Network: true * Author URI: https://make.wordpress.org/core/components/upgrade-install/ * Text Domain: wordpress-beta-tester From 32b4cbb4e7e3ea860914d8abab5d15f8912eae64 Mon Sep 17 00:00:00 2001 From: Andy Fragen Date: Thu, 10 Aug 2023 18:02:15 -0700 Subject: [PATCH 5/5] release --- CHANGES.md | 2 ++ languages/wordpress-beta-tester.pot | 56 +++++++++++++++-------------- readme.txt | 6 +++- vendor/composer/installed.php | 4 +-- wp-beta-tester.php | 2 +- 5 files changed, 40 insertions(+), 30 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ba1fe77..18e9433 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,6 @@ [unreleased] + +#### 3.5.3 / 2023-08-10 * update for changed standalone afragen/test-reports plugin * set actual next beta/RC in messaging diff --git a/languages/wordpress-beta-tester.pot b/languages/wordpress-beta-tester.pot index b200413..521459a 100644 --- a/languages/wordpress-beta-tester.pot +++ b/languages/wordpress-beta-tester.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: WordPress Beta Tester 3.5.0\n" +"Project-Id-Version: WordPress Beta Tester 3.5.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wordpress-beta-tester\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2023-06-30T15:05:35+00:00\n" +"POT-Creation-Date: 2023-08-11T01:01:28+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.8.1\n" "X-Domain: wordpress-beta-tester\n" @@ -207,51 +207,55 @@ msgid "This is for the Release Candidate releases only of the selected channel." msgstr "" #. translators: %s: version number -#: src/WPBT/WPBT_Core.php:378 +#: src/WPBT/WPBT_Core.php:387 msgid "version %s" msgstr "" -#: src/WPBT/WPBT_Core.php:384 +#: src/WPBT/WPBT_Core.php:393 msgid "next development version" msgstr "" #. translators: %l: next version numbers -#: src/WPBT/WPBT_Core.php:389 +#: src/WPBT/WPBT_Core.php:398 msgid "version %l" msgstr "" #. translators: %l: next version numbers -#: src/WPBT/WPBT_Core.php:389 +#: src/WPBT/WPBT_Core.php:398 msgid "whichever is released first" msgstr "" #. translators: Used to join items in a list with more than 2 items. -#: src/WPBT/WPBT_Core.php:480 +#: src/WPBT/WPBT_Core.php:492 msgid "%1$s, %2$s" msgstr "" #. translators: Used to join last two items in a list with more than 2 times. -#: src/WPBT/WPBT_Core.php:482 +#: src/WPBT/WPBT_Core.php:494 msgid "%1$s, or %2$s" msgstr "" #. translators: Used to join items in a list with only 2 items. -#: src/WPBT/WPBT_Core.php:484 +#: src/WPBT/WPBT_Core.php:496 msgid "%1$s or %2$s" msgstr "" -#: src/WPBT/WPBT_Extras.php:74 +#: src/WPBT/WPBT_Extras.php:60 msgid "Extra Settings" msgstr "" -#: src/WPBT/WPBT_Extras.php:104 +#: src/WPBT/WPBT_Extras.php:90 msgid "Skip successful autoupdate emails." msgstr "" -#: src/WPBT/WPBT_Extras.php:105 +#: src/WPBT/WPBT_Extras.php:91 msgid "Disable sending emails to the admin user for successful autoupdates. Only emails indicating failures of the autoupdate process are sent." msgstr "" +#: src/WPBT/WPBT_Extras.php:103 +msgid "Hide Report a Bug feature." +msgstr "" + #: src/WPBT/WPBT_Help.php:37 msgid "Beta Testing" msgstr "" @@ -285,25 +289,25 @@ msgstr "" msgid "A dashboard widget is displayed when the plugin is active. It will contain links to milestone commits and filing a bug report. It may contain links to Dev Notes, the Field Guide, and beta/RC release posts." msgstr "" -#: src/WPBT/WPBT_Settings.php:82 -#: src/WPBT/WPBT_Settings.php:260 +#: src/WPBT/WPBT_Settings.php:90 +#: src/WPBT/WPBT_Settings.php:268 msgid "Beta Testing WordPress" msgstr "" -#: src/WPBT/WPBT_Settings.php:83 +#: src/WPBT/WPBT_Settings.php:91 msgctxt "Menu item" msgid "Beta Testing" msgstr "" -#: src/WPBT/WPBT_Settings.php:228 +#: src/WPBT/WPBT_Settings.php:236 msgid "Saved." msgstr "" -#: src/WPBT/WPBT_Settings.php:229 +#: src/WPBT/WPBT_Settings.php:237 msgid "Perhaps you should head on over and upgrade now." msgstr "" -#: src/WPBT/WPBT_Settings.php:263 +#: src/WPBT/WPBT_Settings.php:271 msgid "Please note: Once you have switched your website to one of these beta versions of software, it will not always be possible to downgrade as the database structure may be updated during the development of a major release." msgstr "" @@ -312,41 +316,41 @@ msgstr "" msgid "Warning: Your current WordPress Beta Tester plugin configuration will downgrade your installation to a previous version - please reconfigure it." msgstr "" -#: src/WPBT/WP_Beta_Tester.php:346 +#: src/WPBT/WP_Beta_Tester.php:290 msgid "WordPress Beta Testing" msgstr "" #. translators: %s: WordPress version -#: src/WPBT/WP_Beta_Tester.php:374 +#: src/WPBT/WP_Beta_Tester.php:329 msgid "Please help test WordPress %s." msgstr "" #. translators: %1: link to closed and reopened trac tickets on current milestone -#: src/WPBT/WP_Beta_Tester.php:380 +#: src/WPBT/WP_Beta_Tester.php:335 msgid "Here are the commits for the milestone." msgstr "" #. translators: %s: link to Report a Bug tab -#: src/WPBT/WP_Beta_Tester.php:383 +#: src/WPBT/WP_Beta_Tester.php:338 msgid "Found a bug? Report it!" msgstr "" #. translators: %s: update version -#: src/WPBT/WP_Beta_Tester.php:392 +#: src/WPBT/WP_Beta_Tester.php:347 msgid "Currently your site is set to update to %s." msgstr "" #. translators: %s: WP Beta Tester settings URL -#: src/WPBT/WP_Beta_Tester.php:398 +#: src/WPBT/WP_Beta_Tester.php:353 msgid "Head over to your WordPress Beta Tester Settings and make sure the beta/RC stream is selected." msgstr "" #. translators: %s: Milestone version -#: src/WPBT/WP_Beta_Tester.php:454 +#: src/WPBT/WP_Beta_Tester.php:409 msgid "WordPress %s Dev Notes" msgstr "" #. translators: %s: Milestone version -#: src/WPBT/WP_Beta_Tester.php:464 +#: src/WPBT/WP_Beta_Tester.php:419 msgid "WordPress %s Field Guide" msgstr "" diff --git a/readme.txt b/readme.txt index 7a8e05c..61922ea 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ License URI: https://www.opensource.org/licenses/GPL-2.0 Requires at least: 3.1 Requires PHP: 5.6 Tested up to: 6.3 -Stable Tag: 3.5.2 +Stable Tag: 3.5.3 Allows you to easily upgrade for testing the next versions of WordPress. @@ -40,6 +40,10 @@ PRs are welcome on [GitHub](https://github.com/afragen/wordpress-beta-tester). ## Changelog +#### 3.5.3 / 2023-08-10 +* update for changed standalone afragen/test-reports plugin +* set actual next beta/RC in messaging + #### 3.5.2 / 2023-07-12 * fix dev-notes URL diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 6fbf75f..77c56ef 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'afragen/wordpress-beta-tester', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '280222ba2eaa1bc48ecd92f3670b7c65b3514683', + 'reference' => '3770deb998bc3a0c46d84d6a14636ef0f72b03b0', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ 'afragen/wordpress-beta-tester' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '280222ba2eaa1bc48ecd92f3670b7c65b3514683', + 'reference' => '3770deb998bc3a0c46d84d6a14636ef0f72b03b0', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/wp-beta-tester.php b/wp-beta-tester.php index b7b863b..a1e8b46 100644 --- a/wp-beta-tester.php +++ b/wp-beta-tester.php @@ -13,7 +13,7 @@ * Plugin URI: https://wordpress.org/plugins/wordpress-beta-tester/ * Description: Allows you to easily upgrade to Beta releases. * Author: WordPress Upgrade/Install Team - * Version: 3.5.2.2 + * Version: 3.5.3 * Network: true * Author URI: https://make.wordpress.org/core/components/upgrade-install/ * Text Domain: wordpress-beta-tester