Plugin Directory

Changeset 3391813


Ignore:
Timestamp:
11/07/2025 03:26:50 PM (2 months ago)
Author:
afragen
Message:

Update to version 4.0.0 from GitHub

Location:
wordpress-beta-tester
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wordpress-beta-tester/tags/4.0.0/CHANGES.md

    r3369865 r3391813  
    11[unreleased]
     2
     3#### 4.0.0 / 2025-11-07
     4* refactor to use `core_version_check_query_args` filter for simplicity and compatibility
     5* remove checks on `WP_AUTO_UPDATE_CORE`
     6* update to require WordPress 4.9
    27
    38#### 3.6.5 / 2025-09-29
  • wordpress-beta-tester/tags/4.0.0/README.md

    r3326069 r3391813  
    44* License: GPLv2
    55* License URI: https://www.opensource.org/licenses/GPL-2.0
    6 * Requires at least: 3.1
     6* Requires at least: 4.9
    77* Requires PHP: 5.6
    88* Stable Tag: master
     
    2727There is a setting to **Skip successful autoupdate emails**. It functions to disable sending emails to the admin user for successful autoupdates. Only emails indicating failures of the autoupdate process are sent.
    2828
     29There is a setting to **Skip bundled plugins and themes**. It functions to disable the installation of any plugins or themes that are bundled with the Core update.
     30
    2931PRs are welcome on [GitHub](https://github.com/afragen/wordpress-beta-tester).
  • wordpress-beta-tester/tags/4.0.0/languages/wordpress-beta-tester.pot

    r3369865 r3391813  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WordPress Beta Tester 3.6.5\n"
     5"Project-Id-Version: WordPress Beta Tester 4.0.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/afragen/wordpress-beta-tester/issues\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-09-29T16:02:36+00:00\n"
     12"POT-Creation-Date: 2025-11-07T01:38:42+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    4444msgstr ""
    4545
    46 #: src/WPBT/WPBT_Core.php:76
     46#: src/WPBT/WPBT_Core.php:60
    4747msgid "WP Beta Tester Settings"
    4848msgstr ""
    4949
     50#: src/WPBT/WPBT_Core.php:77
     51msgid "Core Settings"
     52msgstr ""
     53
     54#: src/WPBT/WPBT_Core.php:84
     55msgid "Select the update channel you would like this website to use:"
     56msgstr ""
     57
    5058#: src/WPBT/WPBT_Core.php:93
    51 msgid "Core Settings"
    52 msgstr ""
    53 
    54 #: src/WPBT/WPBT_Core.php:100
    55 msgid "Select the update channel you would like this website to use:"
    56 msgstr ""
    57 
    58 #: src/WPBT/WPBT_Core.php:109
    5959msgid "Select one of the stream options below:"
    6060msgstr ""
    6161
    62 #: src/WPBT/WPBT_Core.php:168
    63 msgid "<strong>Please note:</strong> There are no development builds available for the beta stream you have chosen, so you will receive normal update notifications."
     62#: src/WPBT/WPBT_Core.php:150
     63msgid "<strong>Warning:</strong> The `WP_AUTO_UPDATE_CORE` constant is set. WordPress Beta Tester settings will be overridden."
    6464msgstr ""
    6565
    6666#. translators: 1: link to backing up database, 2: link to make.wp.org/core, 3: link to beta support forum
    67 #: src/WPBT/WPBT_Core.php:177
     67#: src/WPBT/WPBT_Core.php:159
    6868#, php-format
    6969msgid "By their nature, these releases are unstable and should not be used anyplace where your data is important. So please <a href=\"%1$s\">back up your database</a> before upgrading to a test release. In order to hear about the latest beta releases, your best bet is to watch the <a href=\"%2$s\">development blog</a> and the <a href=\"%3$s\">beta forum</a>."
    7070msgstr ""
    7171
    72 #: src/WPBT/WPBT_Core.php:178
     72#: src/WPBT/WPBT_Core.php:160
    7373#: src/WPBT/WPBT_Help.php:48
    7474msgctxt "URL to database backup instructions on HelpHub"
     
    7676msgstr ""
    7777
    78 #: src/WPBT/WPBT_Core.php:180
     78#: src/WPBT/WPBT_Core.php:162
    7979#: src/WPBT/WPBT_Help.php:50
    8080msgctxt "URL to beta support forum"
     
    8383
    8484#. translators: %s: link to new trac ticket
    85 #: src/WPBT/WPBT_Core.php:185
     85#: src/WPBT/WPBT_Core.php:167
    8686#, php-format
    8787msgid "Thank you for helping test WordPress. Please <a href=\"%s\">report any bugs you find</a>."
    8888msgstr ""
    8989
    90 #: src/WPBT/WPBT_Core.php:189
     90#: src/WPBT/WPBT_Core.php:171
    9191msgid "By default, your WordPress installation uses the stable update channel. To return to this, please deactivate this plugin and re-install from the <a href=\"update-core.php\">WordPress Updates</a> page."
    9292msgstr ""
    9393
    9494#. translators: %s: update version
    95 #: src/WPBT/WPBT_Core.php:193
     95#: src/WPBT/WPBT_Core.php:175
    9696#, php-format
    9797msgid "Currently your site is set to update to %s."
    9898msgstr ""
    9999
    100 #: src/WPBT/WPBT_Core.php:209
     100#: src/WPBT/WPBT_Core.php:191
    101101msgid "Save after switching"
    102102msgstr ""
    103103
    104 #: src/WPBT/WPBT_Core.php:219
    105 msgid "Channel options are overridden by the `WP_AUTO_UPDATE_CORE` constant."
    106 msgstr ""
    107 
    108 #. translators: %s: WP_AUTO_UPDATE_CORE setting
    109 #: src/WPBT/WPBT_Core.php:223
    110 #: src/WPBT/WPBT_Core.php:274
    111 #, php-format
    112 msgid "`WP_AUTO_UPDATE_CORE` is defined as `%s`."
    113 msgstr ""
    114 
    115 #: src/WPBT/WPBT_Core.php:236
     104#: src/WPBT/WPBT_Core.php:198
    116105msgid "Point release"
    117106msgstr ""
    118107
    119108#. translators: %s: Current WordPress version base, eg 5.5
    120 #: src/WPBT/WPBT_Core.php:242
     109#: src/WPBT/WPBT_Core.php:204
    121110#, php-format
    122111msgid "This contains the work that is occurring on a branch in preparation for a %s point release. This should also be fairly stable but will be available before the branch is ready for release."
    123112msgstr ""
    124113
    125 #: src/WPBT/WPBT_Core.php:250
     114#: src/WPBT/WPBT_Core.php:212
    126115msgid "Bleeding edge"
    127116msgstr ""
    128117
    129 #: src/WPBT/WPBT_Core.php:252
     118#: src/WPBT/WPBT_Core.php:214
    130119msgid "This is the bleeding edge development code from `trunk` which may be unstable at times. <em>Only use this if you really know what you are doing</em>."
    131120msgstr ""
    132121
    133 #: src/WPBT/WPBT_Core.php:270
    134 msgid "Stream options are overridden by the `WP_AUTO_UPDATE_CORE` constant."
    135 msgstr ""
    136 
    137 #: src/WPBT/WPBT_Core.php:287
     122#: src/WPBT/WPBT_Core.php:230
    138123msgid "Nightlies"
    139124msgstr ""
    140125
    141 #: src/WPBT/WPBT_Core.php:289
     126#: src/WPBT/WPBT_Core.php:232
    142127msgid "Latest daily updates."
    143128msgstr ""
    144129
    145 #: src/WPBT/WPBT_Core.php:294
    146 #: src/WPBT/WPBT_Core.php:308
     130#: src/WPBT/WPBT_Core.php:237
     131#: src/WPBT/WPBT_Core.php:251
    147132msgid "Beta/RC Only"
    148133msgstr ""
    149134
    150 #: src/WPBT/WPBT_Core.php:296
    151 #: src/WPBT/WPBT_Core.php:310
     135#: src/WPBT/WPBT_Core.php:239
     136#: src/WPBT/WPBT_Core.php:253
    152137msgid "This is for the Beta/RC releases only of the selected channel."
    153138msgstr ""
    154139
    155 #: src/WPBT/WPBT_Core.php:300
    156 #: src/WPBT/WPBT_Core.php:314
     140#: src/WPBT/WPBT_Core.php:243
     141#: src/WPBT/WPBT_Core.php:257
    157142msgid "Release Candidates Only"
    158143msgstr ""
    159144
    160 #: src/WPBT/WPBT_Core.php:302
    161 #: src/WPBT/WPBT_Core.php:316
     145#: src/WPBT/WPBT_Core.php:245
     146#: src/WPBT/WPBT_Core.php:259
    162147msgid "This is for the Release Candidate releases only of the selected channel."
    163148msgstr ""
    164149
    165150#. translators: %s: version number
    166 #: src/WPBT/WPBT_Core.php:387
     151#: src/WPBT/WPBT_Core.php:329
    167152#, php-format
    168153msgid "version %s"
    169154msgstr ""
    170155
    171 #: src/WPBT/WPBT_Core.php:393
     156#: src/WPBT/WPBT_Core.php:335
    172157msgid "next development version"
    173158msgstr ""
    174159
    175160#. translators: %l: next version numbers
    176 #: src/WPBT/WPBT_Core.php:398
     161#: src/WPBT/WPBT_Core.php:340
    177162msgid "version %l, whichever is released first"
    178163msgstr ""
    179164
    180165#. translators: Used to join items in a list with more than 2 items.
    181 #: src/WPBT/WPBT_Core.php:492
     166#: src/WPBT/WPBT_Core.php:432
    182167#, php-format
    183168msgid "%1$s, %2$s"
     
    185170
    186171#. translators: Used to join last two items in a list with more than 2 times.
    187 #: src/WPBT/WPBT_Core.php:494
     172#: src/WPBT/WPBT_Core.php:434
    188173#, php-format
    189174msgid "%1$s, or %2$s"
     
    191176
    192177#. translators: Used to join items in a list with only 2 items.
    193 #: src/WPBT/WPBT_Core.php:496
     178#: src/WPBT/WPBT_Core.php:436
    194179#, php-format
    195180msgid "%1$s or %2$s"
     
    281266
    282267#. translators: %s: WordPress Beta Tester Settings page URL
    283 #: src/WPBT/WP_Beta_Tester.php:126
     268#: src/WPBT/WP_Beta_Tester.php:125
    284269#, php-format
    285270msgid "<strong>Warning:</strong> Your current <a href=\"%s\">WordPress Beta Tester plugin configuration</a> will downgrade your installation to a previous version - please reconfigure it."
    286271msgstr ""
    287272
    288 #: src/WPBT/WP_Beta_Tester.php:299
     273#: src/WPBT/WP_Beta_Tester.php:249
    289274msgid "WordPress Beta Testing"
    290275msgstr ""
    291276
    292277#. translators: %s: WordPress version
    293 #: src/WPBT/WP_Beta_Tester.php:319
     278#: src/WPBT/WP_Beta_Tester.php:269
    294279#, php-format
    295280msgid "Please help test <strong>WordPress %s</strong>."
     
    297282
    298283#. translators: %1: link to closed and reopened trac tickets on current milestone
    299 #: src/WPBT/WP_Beta_Tester.php:325
     284#: src/WPBT/WP_Beta_Tester.php:275
    300285#, php-format
    301286msgid "Here are the <a href=\"%s\" target=\"_blank\">commits for the milestone</a>."
     
    303288
    304289#. translators: %s: update version
    305 #: src/WPBT/WP_Beta_Tester.php:334
     290#: src/WPBT/WP_Beta_Tester.php:284
    306291#, php-format
    307292msgid "Currently your site is set to update to <strong>%s</strong>."
     
    309294
    310295#. translators: %s: WP Beta Tester settings URL
    311 #: src/WPBT/WP_Beta_Tester.php:340
     296#: src/WPBT/WP_Beta_Tester.php:290
    312297#, php-format
    313298msgid "Head over to your <a href=\"%s\">WordPress Beta Tester Settings</a> and make sure the <strong>beta/RC</strong> stream is selected."
     
    315300
    316301#. translators: %s: Milestone version
    317 #: src/WPBT/WP_Beta_Tester.php:399
     302#: src/WPBT/WP_Beta_Tester.php:350
    318303#, php-format
    319304msgid "WordPress %s Dev Notes"
     
    321306
    322307#. translators: %s: Milestone version
    323 #: src/WPBT/WP_Beta_Tester.php:409
     308#: src/WPBT/WP_Beta_Tester.php:360
    324309#, php-format
    325310msgid "WordPress %s Field Guide"
  • wordpress-beta-tester/tags/4.0.0/readme.txt

    r3369865 r3391813  
    55License: GPLv2
    66License URI: https://www.opensource.org/licenses/GPL-2.0
    7 Requires at least: 3.1
     7Requires at least: 4.9
    88Requires PHP: 5.6
    99Tested up to: 6.9
    10 Stable Tag: 3.6.5
     10Stable Tag: 4.0.0
    1111
    1212Allows you to easily upgrade for testing the next versions of WordPress.
     
    2929There is a setting to **Skip successful autoupdate emails**.  It functions to disable sending emails to the admin user for successful autoupdates. Only emails indicating failures of the autoupdate process are sent.
    3030
     31There is a setting to **Skip bundled plugins and themes**. It functions to disable the installation of any plugins or themes that are bundled with the Core update.
     32
     33
    3134PRs are welcome on [GitHub](https://github.com/afragen/wordpress-beta-tester).
    3235
    3336## Changelog
     37
     38#### 4.0.0 / 2025-11-07
     39* refactor to use `core_version_check_query_args` filter for simplicity and compatibility
     40* remove checks on `WP_AUTO_UPDATE_CORE`
     41* update to require WordPress 4.9
    3442
    3543#### 3.6.4 / 2025-07-10
     
    366374## Screenshots
    367375
    368 1. This shows the main administration page for the plugin
    369 2. This shows the Extra Settings page for the plugin
    370 3. This shows the Dashboard callout
     3761. Main Settings page
     3772. Extra Settings page
     3783. Dashboard widget
  • wordpress-beta-tester/tags/4.0.0/src/WPBT/WPBT_Core.php

    r3201160 r3391813  
    2828
    2929    /**
    30      * Holds $core_update_stream_constant from WP_Beta_Tester.
    31      *
    32      * @var string|bool
    33      */
    34     protected static $core_update_stream_constant;
    35 
    36     /**
    37      * Holds $core_update_channel_constant from WP_Beta_Tester.
    38      *
    39      * @var string|bool
    40      */
    41     protected static $core_update_channel_constant;
    42 
    43     /**
    4430     * Constructor.
    4531     *
     
    4935     */
    5036    public function __construct( WP_Beta_Tester $wp_beta_tester, $options ) {
    51         self::$options                      = $options;
    52         $this->wp_beta_tester               = $wp_beta_tester;
    53         self::$core_update_stream_constant  = $wp_beta_tester::$core_update_stream_constant;
    54         self::$core_update_channel_constant = $wp_beta_tester::$core_update_channel_constant;
     37        self::$options        = $options;
     38        $this->wp_beta_tester = $wp_beta_tester;
    5539    }
    5640
     
    11195            'wp_beta_tester_core',
    11296            'wp_beta_tester_core',
    113             array(
    114                 'class' => 'wpbt-settings-title' . ( ! self::$core_update_channel_constant ? '' : 'hidden' ),
    115             )
     97            array( 'class' => 'wpbt-settings-title' )
    11698        );
    11799    }
     
    164146        $this->wp_beta_tester->action_admin_head_plugins_php(); // Check configuration.
    165147        $preferred = $this->wp_beta_tester->get_preferred_from_update_core();
    166         if ( 'development' !== $preferred->response ) {
    167             echo '<div class="updated fade">';
    168             echo '<p>' . wp_kses_post( __( '<strong>Please note:</strong> There are no development builds available for the beta stream you have chosen, so you will receive normal update notifications.', 'wordpress-beta-tester' ) ) . '</p>';
    169             echo '</div>';
     148        if ( defined( 'WP_AUTO_UPDATE_CORE' ) && WP_AUTO_UPDATE_CORE ) {
     149            echo '<div class="notice notice-warning fade"><p>';
     150            echo wp_kses_post( __( '<strong>Warning:</strong> The `WP_AUTO_UPDATE_CORE` constant is set. WordPress Beta Tester settings will be overridden.', 'wordpress-beta-tester' ) );
     151            echo '</p></div>';
    170152        }
    171153
     
    211193            </tr>
    212194        </fieldset>
    213         <?php
    214         if ( self::$core_update_channel_constant ) {
    215             ?>
    216             <fieldset>
    217             <tr>
    218                 <th><label></label></th>
    219                 <td><?php esc_html_e( 'Channel options are overridden by the `WP_AUTO_UPDATE_CORE` constant.', 'wordpress-beta-tester' ); ?><p>
    220                 <?php
    221                 printf(
    222                     /* translators: %s: WP_AUTO_UPDATE_CORE setting */
    223                     esc_html__( '`WP_AUTO_UPDATE_CORE` is defined as `%s`.', 'wordpress-beta-tester' ),
    224                     esc_attr( self::$core_update_channel_constant )
    225                 );
    226                 ?>
    227                 </p></td>
    228             </tr>
    229             </fieldset>
    230             <?php
    231         } else {
    232             ?>
    233             <fieldset>
     195        <fieldset>
    234196            <tr>
    235197                <th><label><input name="wp-beta-tester" id="update-stream-point-nightlies" type="radio" value="branch-development" class="tog" <?php checked( 'branch-development', self::$options['channel'] ); ?> />
     
    238200                <td>
    239201                <?php
    240                 printf(
    241                     /* translators: %s: Current WordPress version base, eg 5.5 */
    242                     esc_html__( 'This contains the work that is occurring on a branch in preparation for a %s point release. This should also be fairly stable but will be available before the branch is ready for release.', 'wordpress-beta-tester' ),
    243                     esc_attr( $next_versions['point'] )
    244                 );
     202                    printf(
     203                        /* translators: %s: Current WordPress version base, eg 5.5 */
     204                        esc_html__( 'This contains the work that is occurring on a branch in preparation for a %s point release. This should also be fairly stable but will be available before the branch is ready for release.', 'wordpress-beta-tester' ),
     205                        esc_attr( $next_versions['point'] )
     206                    );
    245207                ?>
    246208                </td>
     
    250212                <?php esc_html_e( 'Bleeding edge', 'wordpress-beta-tester' ); ?>
    251213                </label></th>
    252                 <td><?php echo wp_kses_post( __( 'This is the bleeding edge development code from `trunk` which may be unstable at times. <em>Only use this if you really know what you are doing</em>.', 'wordpress-beta-tester' ) ); ?></td>
    253             </tr>
    254             </fieldset>
    255             <?php
    256         }
     214                    <td><?php echo wp_kses_post( __( 'This is the bleeding edge development code from `trunk` which may be unstable at times. <em>Only use this if you really know what you are doing</em>.', 'wordpress-beta-tester' ) ); ?></td>
     215            </tr>
     216        </fieldset>
     217        <?php
    257218    }
    258219
     
    263224     */
    264225    public function stream_radio_group() {
    265         if ( self::$core_update_stream_constant ) {
    266             ?>
    267             <fieldset>
    268             <tr>
    269                 <th><label></label></th>
    270                 <td><?php esc_html_e( 'Stream options are overridden by the `WP_AUTO_UPDATE_CORE` constant.', 'wordpress-beta-tester' ); ?><p>
    271                 <?php
    272                 printf(
    273                     /* translators: %s: WP_AUTO_UPDATE_CORE setting */
    274                     esc_html__( '`WP_AUTO_UPDATE_CORE` is defined as `%s`.', 'wordpress-beta-tester' ),
    275                     esc_attr( self::$core_update_stream_constant )
    276                 );
    277                 ?>
    278                 </p></td>
    279             </tr>
    280             </fieldset>
    281             <?php
    282         } else {
    283             ?>
    284             <fieldset>
     226        ?>
     227        <fieldset>
    285228            <tr>
    286229                <th><label><input name="wp-beta-tester-beta-rc" id="update-stream-beta" type="radio" value="" class="tog" <?php checked( false, self::$options['stream-option'] ); ?> />
     
    317260            </tr>
    318261            <?php endif; ?>
    319             </fieldset>
    320             <?php
    321         }
     262        </fieldset>
     263        <?php
    322264    }
    323265
     
    332274        ?>
    333275        <div>
    334             <?php if ( 'wp_beta_tester_core' === $tab ) : ?>
     276        <?php if ( 'wp_beta_tester_core' === $tab ) : ?>
    335277            <form method="post" action="<?php echo esc_attr( $action ); ?>">
    336278                <?php settings_fields( 'wp_beta_tester_core' ); ?>
     
    345287                let $bleedingEdgeStream = $( '.bleeding-edge-stream' );
    346288
    347                 <?php if ( 'development' !== self::$options['channel'] ) : // Time to do our basic JS magic :). ?>
     289            <?php if ( 'development' !== self::$options['channel'] ) : // Time to do our basic JS magic :). ?>
    348290                    $bleedingEdgeStream.hide();
    349291                <?php endif; ?>
     
    383325
    384326        // Site is not on a beta/RC stream so use the preferred version.
    385         if ( ! $beta_rc && ! empty( $next_version ) && ! self::$core_update_stream_constant ) {
     327        if ( ! $beta_rc && ! empty( $next_version ) ) {
    386328            /* translators: %s: version number */
    387329            return sprintf( __( 'version %s', 'wordpress-beta-tester' ), $preferred_version );
     
    466408        );
    467409
    468         if ( ! $next_versions['beta'] || 'rc' === self::$options['stream-option']
    469             || 'rc' === self::$core_update_stream_constant || 1 < $next_rc
    470         ) {
     410        if ( ! $next_versions['beta'] || 'rc' === self::$options['stream-option'] || 1 < $next_rc ) {
    471411            unset( $next_versions['beta'] );
    472412        }
  • wordpress-beta-tester/tags/4.0.0/src/WPBT/WPBT_Settings.php

    r3261736 r3391813  
    285285            <h1><?php esc_html_e( 'Beta Testing WordPress', 'wordpress-beta-tester' ); ?></h1>
    286286            <?php $this->options_tabs(); ?>
    287             <div class="updated fade">
     287            <div class="notice notice-info fade">
    288288                <p><?php echo wp_kses_post( __( '<strong>Please note:</strong> 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.', 'wordpress-beta-tester' ) ); ?></p>
    289289            </div>
  • wordpress-beta-tester/tags/4.0.0/src/WPBT/WP_Beta_Tester.php

    r3369865 r3391813  
    2828
    2929    /**
    30      * Holds WP_AUTO_UPDATE_CORE if set.
    31      *
    32      * @var string|bool
    33      */
    34     public static $core_update_stream_constant;
    35 
    36     /**
    37      * Holds WP_AUTO_UPDATE_CORE if set.
    38      *
    39      * @var string|bool
    40      */
    41     public static $core_update_channel_constant;
    42 
    43     /**
    4430     * Constructor.
    4531     *
     
    4935     */
    5036    public function __construct( $file, $options ) {
    51         $this->file                         = $file;
    52         self::$options                      = $options;
    53         self::$core_update_stream_constant  = defined( 'WP_AUTO_UPDATE_CORE' ) && in_array( \WP_AUTO_UPDATE_CORE, array( 'beta', 'rc' ), true ) ? \WP_AUTO_UPDATE_CORE : false;
    54         self::$core_update_channel_constant = defined( 'WP_AUTO_UPDATE_CORE' ) && in_array( \WP_AUTO_UPDATE_CORE, array( 'development', 'branch-development' ), true ) ? \WP_AUTO_UPDATE_CORE : false;
     37        $this->file    = $file;
     38        self::$options = $options;
    5539    }
    5640
     
    7862            )
    7963        );
    80         add_filter( 'pre_http_request', array( $this, 'filter_http_request' ), 10, 3 );
     64
     65        // Set channel query arg for core version check.
     66        add_filter( 'core_version_check_query_args', array( $this, 'set_core_update_channel_constant' ), 10, 1 );
     67
     68        /* // phpcs:ignore Squiz.PHP.CommentedOutCode.Found
     69         * For testing pretend we're on another release.
     70         * $url = add_query_arg( 'pretend_releases', array( '5.6-beta2' ), $url );
     71        add_filter(
     72            'core_version_check_query_args',
     73            function ( $query_args ) {
     74                return array_merge( $query_args, array( 'pretend_releases' => array( '5.6-beta2' ) ) );
     75            },
     76            10,
     77            1
     78        );
     79        */
    8180
    8281        // Fixed in https://core.trac.wordpress.org/changeset/49708.
     
    132131
    133132    /**
    134      * Filter 'pre_http_request' to add beta-tester API check.
    135      *
    136      * @param  mixed  $result $result from filter.
    137      * @param  array  $args   Array of filter args.
    138      * @param  string $url    URL from filter.
    139      * @return stdClass Output from wp_remote_get().
    140      */
    141     public function filter_http_request( $result, $args, $url ) {
    142         if ( $result || isset( $args['_beta_tester'] ) ) {
    143             return $result;
    144         }
    145         if ( false === strpos( $url, '//api.wordpress.org/core/version-check/' ) ) {
    146             return $result;
    147         }
    148 
    149         // It's a core-update request.
    150         $args['_beta_tester'] = true;
    151 
    152         $url = empty( self::$options['stream-option'] )
    153             ? add_query_arg( 'channel', self::$options['channel'], $url )
    154             : add_query_arg( 'channel', self::$options['stream-option'], $url );
    155 
    156         // Use WP_AUTO_UPDATE_CORE if set.
    157         $url = self::$core_update_stream_constant ? add_query_arg( 'channel', self::$core_update_stream_constant, $url ) : $url;
    158         $url = self::$core_update_channel_constant ? add_query_arg( 'channel', self::$core_update_channel_constant, $url ) : $url;
    159 
    160         // Make adjustments for switching between channels.
    161         $url = $this->channel_switching_modification( $url );
    162 
    163         // phpcs:ignore Squiz.PHP.CommentedOutCode.Found
    164         // $url = add_query_arg( 'pretend_releases', array( '5.6-beta2' ), $url );
    165         // pretend_releases[]=5.6-beta2 query arg example.
    166 
    167         return wp_remote_get( $url, $args );
    168     }
    169 
    170     /**
    171      * Modify URL to version check to return expected API response.
    172      *
    173      * @param string $url Version check URL.
    174      *
    175      * @return string $url
    176      */
    177     private function channel_switching_modification( $url ) {
    178         $next_versions = ( new WPBT_Core( $this, static::$options ) )->calculate_next_versions();
    179         $wp_version    = get_bloginfo( 'version' );
    180         $channel       = self::$core_update_channel_constant ? self::$core_update_channel_constant : self::$options['channel'];
    181 
    182         if ( false !== strpos( $channel, 'development' )
    183             && version_compare( $wp_version, $next_versions['point'], '<' )
    184         ) {
    185             return $url;
    186         }
    187 
    188         switch ( $channel ) {
    189             case 'branch-development':
    190                 $url = add_query_arg( 'version', $next_versions['point'] . '-alpha', $url );
    191                 break;
    192             case 'development':
    193                 if ( false !== strpos( $wp_version, $next_versions['point'] )
    194                     || version_compare( $wp_version, $next_versions['point'], '<' )
    195                 ) {
    196                     $url = add_query_arg( 'version', $next_versions['release'] . '-alpha', $url );
    197                 }
    198                 break;
    199         }
    200 
    201         return $url;
     133     * Get channel query arg.
     134     *
     135     * @return string
     136     */
     137    public static function get_channel() {
     138        return empty( self::$options['stream-option'] )
     139            ? self::$options['channel']
     140            : self::$options['stream-option'];
     141    }
     142
     143    /**
     144     * Set channel query arg in wp_version_check().
     145     *
     146     * @param  array $query_args Array of query args.
     147     *
     148     * @return array
     149     */
     150    public function set_core_update_channel_constant( $query_args ) {
     151        return array_merge( $query_args, array( 'channel' => self::get_channel() ) );
    202152    }
    203153
     
    358308
    359309        // For testing, set cache to 10 seconds.
     310        // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
    360311        // add_filter( 'wp_feed_cache_transient_lifetime', function () { return 10; } );
    361312
  • wordpress-beta-tester/tags/4.0.0/vendor/composer/installed.json

    r3369865 r3391813  
    102102        {
    103103            "name": "phpcsstandards/phpcsextra",
    104             "version": "1.4.1",
    105             "version_normalized": "1.4.1.0",
     104            "version": "1.4.2",
     105            "version_normalized": "1.4.2.0",
    106106            "source": {
    107107                "type": "git",
    108108                "url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
    109                 "reference": "882b8c947ada27eb002870fe77fee9ce0a454cdb"
     109                "reference": "8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e"
    110110            },
    111111            "dist": {
    112112                "type": "zip",
    113                 "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/882b8c947ada27eb002870fe77fee9ce0a454cdb",
    114                 "reference": "882b8c947ada27eb002870fe77fee9ce0a454cdb",
     113                "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e",
     114                "reference": "8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e",
    115115                "shasum": ""
    116116            },
     
    127127                "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
    128128            },
    129             "time": "2025-09-05T06:54:52+00:00",
     129            "time": "2025-10-28T17:00:02+00:00",
    130130            "type": "phpcodesniffer-standard",
    131131            "extra": {
     
    187187        {
    188188            "name": "phpcsstandards/phpcsutils",
    189             "version": "1.1.2",
    190             "version_normalized": "1.1.2.0",
     189            "version": "1.1.3",
     190            "version_normalized": "1.1.3.0",
    191191            "source": {
    192192                "type": "git",
    193193                "url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
    194                 "reference": "b22b59e3d9ec8fe4953e42c7d59117c6eae70eae"
     194                "reference": "8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9"
    195195            },
    196196            "dist": {
    197197                "type": "zip",
    198                 "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/b22b59e3d9ec8fe4953e42c7d59117c6eae70eae",
    199                 "reference": "b22b59e3d9ec8fe4953e42c7d59117c6eae70eae",
     198                "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9",
     199                "reference": "8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9",
    200200                "shasum": ""
    201201            },
     
    212212                "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0"
    213213            },
    214             "time": "2025-09-05T00:00:03+00:00",
     214            "time": "2025-10-16T16:39:32+00:00",
    215215            "type": "phpcodesniffer-standard",
    216216            "extra": {
     
    283283        {
    284284            "name": "squizlabs/php_codesniffer",
    285             "version": "3.13.4",
    286             "version_normalized": "3.13.4.0",
     285            "version": "3.13.5",
     286            "version_normalized": "3.13.5.0",
    287287            "source": {
    288288                "type": "git",
    289289                "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
    290                 "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119"
     290                "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4"
    291291            },
    292292            "dist": {
    293293                "type": "zip",
    294                 "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119",
    295                 "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119",
     294                "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
     295                "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
    296296                "shasum": ""
    297297            },
     
    305305                "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
    306306            },
    307             "time": "2025-09-05T05:47:09+00:00",
     307            "time": "2025-11-04T16:30:35+00:00",
    308308            "bin": [
    309309                "bin/phpcbf",
     
    311311            ],
    312312            "type": "library",
    313             "extra": {
    314                 "branch-alias": {
    315                     "dev-master": "3.x-dev"
    316                 }
    317             },
    318313            "installation-source": "dist",
    319314            "notification-url": "https://packagist.org/downloads/",
  • wordpress-beta-tester/tags/4.0.0/vendor/composer/installed.php

    r3369865 r3391813  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '3157d931e1241c2e8ee94768674ee9684e4e606e',
     6        'reference' => 'a8d784f6503c52311db2e2df9775d6c3cfc9560e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '3157d931e1241c2e8ee94768674ee9684e4e606e',
     16            'reference' => 'a8d784f6503c52311db2e2df9775d6c3cfc9560e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'phpcsstandards/phpcsextra' => array(
    32             'pretty_version' => '1.4.1',
    33             'version' => '1.4.1.0',
    34             'reference' => '882b8c947ada27eb002870fe77fee9ce0a454cdb',
     32            'pretty_version' => '1.4.2',
     33            'version' => '1.4.2.0',
     34            'reference' => '8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e',
    3535            'type' => 'phpcodesniffer-standard',
    3636            'install_path' => __DIR__ . '/../phpcsstandards/phpcsextra',
     
    3939        ),
    4040        'phpcsstandards/phpcsutils' => array(
    41             'pretty_version' => '1.1.2',
    42             'version' => '1.1.2.0',
    43             'reference' => 'b22b59e3d9ec8fe4953e42c7d59117c6eae70eae',
     41            'pretty_version' => '1.1.3',
     42            'version' => '1.1.3.0',
     43            'reference' => '8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9',
    4444            'type' => 'phpcodesniffer-standard',
    4545            'install_path' => __DIR__ . '/../phpcsstandards/phpcsutils',
     
    4848        ),
    4949        'squizlabs/php_codesniffer' => array(
    50             'pretty_version' => '3.13.4',
    51             'version' => '3.13.4.0',
    52             'reference' => 'ad545ea9c1b7d270ce0fc9cbfb884161cd706119',
     50            'pretty_version' => '3.13.5',
     51            'version' => '3.13.5.0',
     52            'reference' => '0ca86845ce43291e8f5692c7356fccf3bcf02bf4',
    5353            'type' => 'library',
    5454            'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
  • wordpress-beta-tester/tags/4.0.0/wp-beta-tester.php

    r3369865 r3391813  
    1414 * Description:       Allows you to easily upgrade to Beta releases.
    1515 * Author:            WordPress Upgrade/Install Team
    16  * Version:           3.6.5
     16 * Version:           4.0.0
    1717 * Network:           true
    1818 * Author URI:        https://make.wordpress.org/core/components/upgrade-install/
     
    2222 * License URI:       https://www.opensource.org/licenses/GPL-2.0
    2323 * GitHub Plugin URI: https://github.com/afragen/wordpress-beta-tester
    24  * Requires at least: 3.1
     24 * Requires at least: 4.9
    2525 * Requires PHP:      5.6
    2626 */
  • wordpress-beta-tester/trunk/CHANGES.md

    r3369865 r3391813  
    11[unreleased]
     2
     3#### 4.0.0 / 2025-11-07
     4* refactor to use `core_version_check_query_args` filter for simplicity and compatibility
     5* remove checks on `WP_AUTO_UPDATE_CORE`
     6* update to require WordPress 4.9
    27
    38#### 3.6.5 / 2025-09-29
  • wordpress-beta-tester/trunk/README.md

    r3326069 r3391813  
    44* License: GPLv2
    55* License URI: https://www.opensource.org/licenses/GPL-2.0
    6 * Requires at least: 3.1
     6* Requires at least: 4.9
    77* Requires PHP: 5.6
    88* Stable Tag: master
     
    2727There is a setting to **Skip successful autoupdate emails**. It functions to disable sending emails to the admin user for successful autoupdates. Only emails indicating failures of the autoupdate process are sent.
    2828
     29There is a setting to **Skip bundled plugins and themes**. It functions to disable the installation of any plugins or themes that are bundled with the Core update.
     30
    2931PRs are welcome on [GitHub](https://github.com/afragen/wordpress-beta-tester).
  • wordpress-beta-tester/trunk/languages/wordpress-beta-tester.pot

    r3369865 r3391813  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WordPress Beta Tester 3.6.5\n"
     5"Project-Id-Version: WordPress Beta Tester 4.0.0\n"
    66"Report-Msgid-Bugs-To: https://github.com/afragen/wordpress-beta-tester/issues\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-09-29T16:02:36+00:00\n"
     12"POT-Creation-Date: 2025-11-07T01:38:42+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    4444msgstr ""
    4545
    46 #: src/WPBT/WPBT_Core.php:76
     46#: src/WPBT/WPBT_Core.php:60
    4747msgid "WP Beta Tester Settings"
    4848msgstr ""
    4949
     50#: src/WPBT/WPBT_Core.php:77
     51msgid "Core Settings"
     52msgstr ""
     53
     54#: src/WPBT/WPBT_Core.php:84
     55msgid "Select the update channel you would like this website to use:"
     56msgstr ""
     57
    5058#: src/WPBT/WPBT_Core.php:93
    51 msgid "Core Settings"
    52 msgstr ""
    53 
    54 #: src/WPBT/WPBT_Core.php:100
    55 msgid "Select the update channel you would like this website to use:"
    56 msgstr ""
    57 
    58 #: src/WPBT/WPBT_Core.php:109
    5959msgid "Select one of the stream options below:"
    6060msgstr ""
    6161
    62 #: src/WPBT/WPBT_Core.php:168
    63 msgid "<strong>Please note:</strong> There are no development builds available for the beta stream you have chosen, so you will receive normal update notifications."
     62#: src/WPBT/WPBT_Core.php:150
     63msgid "<strong>Warning:</strong> The `WP_AUTO_UPDATE_CORE` constant is set. WordPress Beta Tester settings will be overridden."
    6464msgstr ""
    6565
    6666#. translators: 1: link to backing up database, 2: link to make.wp.org/core, 3: link to beta support forum
    67 #: src/WPBT/WPBT_Core.php:177
     67#: src/WPBT/WPBT_Core.php:159
    6868#, php-format
    6969msgid "By their nature, these releases are unstable and should not be used anyplace where your data is important. So please <a href=\"%1$s\">back up your database</a> before upgrading to a test release. In order to hear about the latest beta releases, your best bet is to watch the <a href=\"%2$s\">development blog</a> and the <a href=\"%3$s\">beta forum</a>."
    7070msgstr ""
    7171
    72 #: src/WPBT/WPBT_Core.php:178
     72#: src/WPBT/WPBT_Core.php:160
    7373#: src/WPBT/WPBT_Help.php:48
    7474msgctxt "URL to database backup instructions on HelpHub"
     
    7676msgstr ""
    7777
    78 #: src/WPBT/WPBT_Core.php:180
     78#: src/WPBT/WPBT_Core.php:162
    7979#: src/WPBT/WPBT_Help.php:50
    8080msgctxt "URL to beta support forum"
     
    8383
    8484#. translators: %s: link to new trac ticket
    85 #: src/WPBT/WPBT_Core.php:185
     85#: src/WPBT/WPBT_Core.php:167
    8686#, php-format
    8787msgid "Thank you for helping test WordPress. Please <a href=\"%s\">report any bugs you find</a>."
    8888msgstr ""
    8989
    90 #: src/WPBT/WPBT_Core.php:189
     90#: src/WPBT/WPBT_Core.php:171
    9191msgid "By default, your WordPress installation uses the stable update channel. To return to this, please deactivate this plugin and re-install from the <a href=\"update-core.php\">WordPress Updates</a> page."
    9292msgstr ""
    9393
    9494#. translators: %s: update version
    95 #: src/WPBT/WPBT_Core.php:193
     95#: src/WPBT/WPBT_Core.php:175
    9696#, php-format
    9797msgid "Currently your site is set to update to %s."
    9898msgstr ""
    9999
    100 #: src/WPBT/WPBT_Core.php:209
     100#: src/WPBT/WPBT_Core.php:191
    101101msgid "Save after switching"
    102102msgstr ""
    103103
    104 #: src/WPBT/WPBT_Core.php:219
    105 msgid "Channel options are overridden by the `WP_AUTO_UPDATE_CORE` constant."
    106 msgstr ""
    107 
    108 #. translators: %s: WP_AUTO_UPDATE_CORE setting
    109 #: src/WPBT/WPBT_Core.php:223
    110 #: src/WPBT/WPBT_Core.php:274
    111 #, php-format
    112 msgid "`WP_AUTO_UPDATE_CORE` is defined as `%s`."
    113 msgstr ""
    114 
    115 #: src/WPBT/WPBT_Core.php:236
     104#: src/WPBT/WPBT_Core.php:198
    116105msgid "Point release"
    117106msgstr ""
    118107
    119108#. translators: %s: Current WordPress version base, eg 5.5
    120 #: src/WPBT/WPBT_Core.php:242
     109#: src/WPBT/WPBT_Core.php:204
    121110#, php-format
    122111msgid "This contains the work that is occurring on a branch in preparation for a %s point release. This should also be fairly stable but will be available before the branch is ready for release."
    123112msgstr ""
    124113
    125 #: src/WPBT/WPBT_Core.php:250
     114#: src/WPBT/WPBT_Core.php:212
    126115msgid "Bleeding edge"
    127116msgstr ""
    128117
    129 #: src/WPBT/WPBT_Core.php:252
     118#: src/WPBT/WPBT_Core.php:214
    130119msgid "This is the bleeding edge development code from `trunk` which may be unstable at times. <em>Only use this if you really know what you are doing</em>."
    131120msgstr ""
    132121
    133 #: src/WPBT/WPBT_Core.php:270
    134 msgid "Stream options are overridden by the `WP_AUTO_UPDATE_CORE` constant."
    135 msgstr ""
    136 
    137 #: src/WPBT/WPBT_Core.php:287
     122#: src/WPBT/WPBT_Core.php:230
    138123msgid "Nightlies"
    139124msgstr ""
    140125
    141 #: src/WPBT/WPBT_Core.php:289
     126#: src/WPBT/WPBT_Core.php:232
    142127msgid "Latest daily updates."
    143128msgstr ""
    144129
    145 #: src/WPBT/WPBT_Core.php:294
    146 #: src/WPBT/WPBT_Core.php:308
     130#: src/WPBT/WPBT_Core.php:237
     131#: src/WPBT/WPBT_Core.php:251
    147132msgid "Beta/RC Only"
    148133msgstr ""
    149134
    150 #: src/WPBT/WPBT_Core.php:296
    151 #: src/WPBT/WPBT_Core.php:310
     135#: src/WPBT/WPBT_Core.php:239
     136#: src/WPBT/WPBT_Core.php:253
    152137msgid "This is for the Beta/RC releases only of the selected channel."
    153138msgstr ""
    154139
    155 #: src/WPBT/WPBT_Core.php:300
    156 #: src/WPBT/WPBT_Core.php:314
     140#: src/WPBT/WPBT_Core.php:243
     141#: src/WPBT/WPBT_Core.php:257
    157142msgid "Release Candidates Only"
    158143msgstr ""
    159144
    160 #: src/WPBT/WPBT_Core.php:302
    161 #: src/WPBT/WPBT_Core.php:316
     145#: src/WPBT/WPBT_Core.php:245
     146#: src/WPBT/WPBT_Core.php:259
    162147msgid "This is for the Release Candidate releases only of the selected channel."
    163148msgstr ""
    164149
    165150#. translators: %s: version number
    166 #: src/WPBT/WPBT_Core.php:387
     151#: src/WPBT/WPBT_Core.php:329
    167152#, php-format
    168153msgid "version %s"
    169154msgstr ""
    170155
    171 #: src/WPBT/WPBT_Core.php:393
     156#: src/WPBT/WPBT_Core.php:335
    172157msgid "next development version"
    173158msgstr ""
    174159
    175160#. translators: %l: next version numbers
    176 #: src/WPBT/WPBT_Core.php:398
     161#: src/WPBT/WPBT_Core.php:340
    177162msgid "version %l, whichever is released first"
    178163msgstr ""
    179164
    180165#. translators: Used to join items in a list with more than 2 items.
    181 #: src/WPBT/WPBT_Core.php:492
     166#: src/WPBT/WPBT_Core.php:432
    182167#, php-format
    183168msgid "%1$s, %2$s"
     
    185170
    186171#. translators: Used to join last two items in a list with more than 2 times.
    187 #: src/WPBT/WPBT_Core.php:494
     172#: src/WPBT/WPBT_Core.php:434
    188173#, php-format
    189174msgid "%1$s, or %2$s"
     
    191176
    192177#. translators: Used to join items in a list with only 2 items.
    193 #: src/WPBT/WPBT_Core.php:496
     178#: src/WPBT/WPBT_Core.php:436
    194179#, php-format
    195180msgid "%1$s or %2$s"
     
    281266
    282267#. translators: %s: WordPress Beta Tester Settings page URL
    283 #: src/WPBT/WP_Beta_Tester.php:126
     268#: src/WPBT/WP_Beta_Tester.php:125
    284269#, php-format
    285270msgid "<strong>Warning:</strong> Your current <a href=\"%s\">WordPress Beta Tester plugin configuration</a> will downgrade your installation to a previous version - please reconfigure it."
    286271msgstr ""
    287272
    288 #: src/WPBT/WP_Beta_Tester.php:299
     273#: src/WPBT/WP_Beta_Tester.php:249
    289274msgid "WordPress Beta Testing"
    290275msgstr ""
    291276
    292277#. translators: %s: WordPress version
    293 #: src/WPBT/WP_Beta_Tester.php:319
     278#: src/WPBT/WP_Beta_Tester.php:269
    294279#, php-format
    295280msgid "Please help test <strong>WordPress %s</strong>."
     
    297282
    298283#. translators: %1: link to closed and reopened trac tickets on current milestone
    299 #: src/WPBT/WP_Beta_Tester.php:325
     284#: src/WPBT/WP_Beta_Tester.php:275
    300285#, php-format
    301286msgid "Here are the <a href=\"%s\" target=\"_blank\">commits for the milestone</a>."
     
    303288
    304289#. translators: %s: update version
    305 #: src/WPBT/WP_Beta_Tester.php:334
     290#: src/WPBT/WP_Beta_Tester.php:284
    306291#, php-format
    307292msgid "Currently your site is set to update to <strong>%s</strong>."
     
    309294
    310295#. translators: %s: WP Beta Tester settings URL
    311 #: src/WPBT/WP_Beta_Tester.php:340
     296#: src/WPBT/WP_Beta_Tester.php:290
    312297#, php-format
    313298msgid "Head over to your <a href=\"%s\">WordPress Beta Tester Settings</a> and make sure the <strong>beta/RC</strong> stream is selected."
     
    315300
    316301#. translators: %s: Milestone version
    317 #: src/WPBT/WP_Beta_Tester.php:399
     302#: src/WPBT/WP_Beta_Tester.php:350
    318303#, php-format
    319304msgid "WordPress %s Dev Notes"
     
    321306
    322307#. translators: %s: Milestone version
    323 #: src/WPBT/WP_Beta_Tester.php:409
     308#: src/WPBT/WP_Beta_Tester.php:360
    324309#, php-format
    325310msgid "WordPress %s Field Guide"
  • wordpress-beta-tester/trunk/readme.txt

    r3369865 r3391813  
    55License: GPLv2
    66License URI: https://www.opensource.org/licenses/GPL-2.0
    7 Requires at least: 3.1
     7Requires at least: 4.9
    88Requires PHP: 5.6
    99Tested up to: 6.9
    10 Stable Tag: 3.6.5
     10Stable Tag: 4.0.0
    1111
    1212Allows you to easily upgrade for testing the next versions of WordPress.
     
    2929There is a setting to **Skip successful autoupdate emails**.  It functions to disable sending emails to the admin user for successful autoupdates. Only emails indicating failures of the autoupdate process are sent.
    3030
     31There is a setting to **Skip bundled plugins and themes**. It functions to disable the installation of any plugins or themes that are bundled with the Core update.
     32
     33
    3134PRs are welcome on [GitHub](https://github.com/afragen/wordpress-beta-tester).
    3235
    3336## Changelog
     37
     38#### 4.0.0 / 2025-11-07
     39* refactor to use `core_version_check_query_args` filter for simplicity and compatibility
     40* remove checks on `WP_AUTO_UPDATE_CORE`
     41* update to require WordPress 4.9
    3442
    3543#### 3.6.4 / 2025-07-10
     
    366374## Screenshots
    367375
    368 1. This shows the main administration page for the plugin
    369 2. This shows the Extra Settings page for the plugin
    370 3. This shows the Dashboard callout
     3761. Main Settings page
     3772. Extra Settings page
     3783. Dashboard widget
  • wordpress-beta-tester/trunk/src/WPBT/WPBT_Core.php

    r3201160 r3391813  
    2828
    2929    /**
    30      * Holds $core_update_stream_constant from WP_Beta_Tester.
    31      *
    32      * @var string|bool
    33      */
    34     protected static $core_update_stream_constant;
    35 
    36     /**
    37      * Holds $core_update_channel_constant from WP_Beta_Tester.
    38      *
    39      * @var string|bool
    40      */
    41     protected static $core_update_channel_constant;
    42 
    43     /**
    4430     * Constructor.
    4531     *
     
    4935     */
    5036    public function __construct( WP_Beta_Tester $wp_beta_tester, $options ) {
    51         self::$options                      = $options;
    52         $this->wp_beta_tester               = $wp_beta_tester;
    53         self::$core_update_stream_constant  = $wp_beta_tester::$core_update_stream_constant;
    54         self::$core_update_channel_constant = $wp_beta_tester::$core_update_channel_constant;
     37        self::$options        = $options;
     38        $this->wp_beta_tester = $wp_beta_tester;
    5539    }
    5640
     
    11195            'wp_beta_tester_core',
    11296            'wp_beta_tester_core',
    113             array(
    114                 'class' => 'wpbt-settings-title' . ( ! self::$core_update_channel_constant ? '' : 'hidden' ),
    115             )
     97            array( 'class' => 'wpbt-settings-title' )
    11698        );
    11799    }
     
    164146        $this->wp_beta_tester->action_admin_head_plugins_php(); // Check configuration.
    165147        $preferred = $this->wp_beta_tester->get_preferred_from_update_core();
    166         if ( 'development' !== $preferred->response ) {
    167             echo '<div class="updated fade">';
    168             echo '<p>' . wp_kses_post( __( '<strong>Please note:</strong> There are no development builds available for the beta stream you have chosen, so you will receive normal update notifications.', 'wordpress-beta-tester' ) ) . '</p>';
    169             echo '</div>';
     148        if ( defined( 'WP_AUTO_UPDATE_CORE' ) && WP_AUTO_UPDATE_CORE ) {
     149            echo '<div class="notice notice-warning fade"><p>';
     150            echo wp_kses_post( __( '<strong>Warning:</strong> The `WP_AUTO_UPDATE_CORE` constant is set. WordPress Beta Tester settings will be overridden.', 'wordpress-beta-tester' ) );
     151            echo '</p></div>';
    170152        }
    171153
     
    211193            </tr>
    212194        </fieldset>
    213         <?php
    214         if ( self::$core_update_channel_constant ) {
    215             ?>
    216             <fieldset>
    217             <tr>
    218                 <th><label></label></th>
    219                 <td><?php esc_html_e( 'Channel options are overridden by the `WP_AUTO_UPDATE_CORE` constant.', 'wordpress-beta-tester' ); ?><p>
    220                 <?php
    221                 printf(
    222                     /* translators: %s: WP_AUTO_UPDATE_CORE setting */
    223                     esc_html__( '`WP_AUTO_UPDATE_CORE` is defined as `%s`.', 'wordpress-beta-tester' ),
    224                     esc_attr( self::$core_update_channel_constant )
    225                 );
    226                 ?>
    227                 </p></td>
    228             </tr>
    229             </fieldset>
    230             <?php
    231         } else {
    232             ?>
    233             <fieldset>
     195        <fieldset>
    234196            <tr>
    235197                <th><label><input name="wp-beta-tester" id="update-stream-point-nightlies" type="radio" value="branch-development" class="tog" <?php checked( 'branch-development', self::$options['channel'] ); ?> />
     
    238200                <td>
    239201                <?php
    240                 printf(
    241                     /* translators: %s: Current WordPress version base, eg 5.5 */
    242                     esc_html__( 'This contains the work that is occurring on a branch in preparation for a %s point release. This should also be fairly stable but will be available before the branch is ready for release.', 'wordpress-beta-tester' ),
    243                     esc_attr( $next_versions['point'] )
    244                 );
     202                    printf(
     203                        /* translators: %s: Current WordPress version base, eg 5.5 */
     204                        esc_html__( 'This contains the work that is occurring on a branch in preparation for a %s point release. This should also be fairly stable but will be available before the branch is ready for release.', 'wordpress-beta-tester' ),
     205                        esc_attr( $next_versions['point'] )
     206                    );
    245207                ?>
    246208                </td>
     
    250212                <?php esc_html_e( 'Bleeding edge', 'wordpress-beta-tester' ); ?>
    251213                </label></th>
    252                 <td><?php echo wp_kses_post( __( 'This is the bleeding edge development code from `trunk` which may be unstable at times. <em>Only use this if you really know what you are doing</em>.', 'wordpress-beta-tester' ) ); ?></td>
    253             </tr>
    254             </fieldset>
    255             <?php
    256         }
     214                    <td><?php echo wp_kses_post( __( 'This is the bleeding edge development code from `trunk` which may be unstable at times. <em>Only use this if you really know what you are doing</em>.', 'wordpress-beta-tester' ) ); ?></td>
     215            </tr>
     216        </fieldset>
     217        <?php
    257218    }
    258219
     
    263224     */
    264225    public function stream_radio_group() {
    265         if ( self::$core_update_stream_constant ) {
    266             ?>
    267             <fieldset>
    268             <tr>
    269                 <th><label></label></th>
    270                 <td><?php esc_html_e( 'Stream options are overridden by the `WP_AUTO_UPDATE_CORE` constant.', 'wordpress-beta-tester' ); ?><p>
    271                 <?php
    272                 printf(
    273                     /* translators: %s: WP_AUTO_UPDATE_CORE setting */
    274                     esc_html__( '`WP_AUTO_UPDATE_CORE` is defined as `%s`.', 'wordpress-beta-tester' ),
    275                     esc_attr( self::$core_update_stream_constant )
    276                 );
    277                 ?>
    278                 </p></td>
    279             </tr>
    280             </fieldset>
    281             <?php
    282         } else {
    283             ?>
    284             <fieldset>
     226        ?>
     227        <fieldset>
    285228            <tr>
    286229                <th><label><input name="wp-beta-tester-beta-rc" id="update-stream-beta" type="radio" value="" class="tog" <?php checked( false, self::$options['stream-option'] ); ?> />
     
    317260            </tr>
    318261            <?php endif; ?>
    319             </fieldset>
    320             <?php
    321         }
     262        </fieldset>
     263        <?php
    322264    }
    323265
     
    332274        ?>
    333275        <div>
    334             <?php if ( 'wp_beta_tester_core' === $tab ) : ?>
     276        <?php if ( 'wp_beta_tester_core' === $tab ) : ?>
    335277            <form method="post" action="<?php echo esc_attr( $action ); ?>">
    336278                <?php settings_fields( 'wp_beta_tester_core' ); ?>
     
    345287                let $bleedingEdgeStream = $( '.bleeding-edge-stream' );
    346288
    347                 <?php if ( 'development' !== self::$options['channel'] ) : // Time to do our basic JS magic :). ?>
     289            <?php if ( 'development' !== self::$options['channel'] ) : // Time to do our basic JS magic :). ?>
    348290                    $bleedingEdgeStream.hide();
    349291                <?php endif; ?>
     
    383325
    384326        // Site is not on a beta/RC stream so use the preferred version.
    385         if ( ! $beta_rc && ! empty( $next_version ) && ! self::$core_update_stream_constant ) {
     327        if ( ! $beta_rc && ! empty( $next_version ) ) {
    386328            /* translators: %s: version number */
    387329            return sprintf( __( 'version %s', 'wordpress-beta-tester' ), $preferred_version );
     
    466408        );
    467409
    468         if ( ! $next_versions['beta'] || 'rc' === self::$options['stream-option']
    469             || 'rc' === self::$core_update_stream_constant || 1 < $next_rc
    470         ) {
     410        if ( ! $next_versions['beta'] || 'rc' === self::$options['stream-option'] || 1 < $next_rc ) {
    471411            unset( $next_versions['beta'] );
    472412        }
  • wordpress-beta-tester/trunk/src/WPBT/WPBT_Settings.php

    r3261736 r3391813  
    285285            <h1><?php esc_html_e( 'Beta Testing WordPress', 'wordpress-beta-tester' ); ?></h1>
    286286            <?php $this->options_tabs(); ?>
    287             <div class="updated fade">
     287            <div class="notice notice-info fade">
    288288                <p><?php echo wp_kses_post( __( '<strong>Please note:</strong> 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.', 'wordpress-beta-tester' ) ); ?></p>
    289289            </div>
  • wordpress-beta-tester/trunk/src/WPBT/WP_Beta_Tester.php

    r3369865 r3391813  
    2828
    2929    /**
    30      * Holds WP_AUTO_UPDATE_CORE if set.
    31      *
    32      * @var string|bool
    33      */
    34     public static $core_update_stream_constant;
    35 
    36     /**
    37      * Holds WP_AUTO_UPDATE_CORE if set.
    38      *
    39      * @var string|bool
    40      */
    41     public static $core_update_channel_constant;
    42 
    43     /**
    4430     * Constructor.
    4531     *
     
    4935     */
    5036    public function __construct( $file, $options ) {
    51         $this->file                         = $file;
    52         self::$options                      = $options;
    53         self::$core_update_stream_constant  = defined( 'WP_AUTO_UPDATE_CORE' ) && in_array( \WP_AUTO_UPDATE_CORE, array( 'beta', 'rc' ), true ) ? \WP_AUTO_UPDATE_CORE : false;
    54         self::$core_update_channel_constant = defined( 'WP_AUTO_UPDATE_CORE' ) && in_array( \WP_AUTO_UPDATE_CORE, array( 'development', 'branch-development' ), true ) ? \WP_AUTO_UPDATE_CORE : false;
     37        $this->file    = $file;
     38        self::$options = $options;
    5539    }
    5640
     
    7862            )
    7963        );
    80         add_filter( 'pre_http_request', array( $this, 'filter_http_request' ), 10, 3 );
     64
     65        // Set channel query arg for core version check.
     66        add_filter( 'core_version_check_query_args', array( $this, 'set_core_update_channel_constant' ), 10, 1 );
     67
     68        /* // phpcs:ignore Squiz.PHP.CommentedOutCode.Found
     69         * For testing pretend we're on another release.
     70         * $url = add_query_arg( 'pretend_releases', array( '5.6-beta2' ), $url );
     71        add_filter(
     72            'core_version_check_query_args',
     73            function ( $query_args ) {
     74                return array_merge( $query_args, array( 'pretend_releases' => array( '5.6-beta2' ) ) );
     75            },
     76            10,
     77            1
     78        );
     79        */
    8180
    8281        // Fixed in https://core.trac.wordpress.org/changeset/49708.
     
    132131
    133132    /**
    134      * Filter 'pre_http_request' to add beta-tester API check.
    135      *
    136      * @param  mixed  $result $result from filter.
    137      * @param  array  $args   Array of filter args.
    138      * @param  string $url    URL from filter.
    139      * @return stdClass Output from wp_remote_get().
    140      */
    141     public function filter_http_request( $result, $args, $url ) {
    142         if ( $result || isset( $args['_beta_tester'] ) ) {
    143             return $result;
    144         }
    145         if ( false === strpos( $url, '//api.wordpress.org/core/version-check/' ) ) {
    146             return $result;
    147         }
    148 
    149         // It's a core-update request.
    150         $args['_beta_tester'] = true;
    151 
    152         $url = empty( self::$options['stream-option'] )
    153             ? add_query_arg( 'channel', self::$options['channel'], $url )
    154             : add_query_arg( 'channel', self::$options['stream-option'], $url );
    155 
    156         // Use WP_AUTO_UPDATE_CORE if set.
    157         $url = self::$core_update_stream_constant ? add_query_arg( 'channel', self::$core_update_stream_constant, $url ) : $url;
    158         $url = self::$core_update_channel_constant ? add_query_arg( 'channel', self::$core_update_channel_constant, $url ) : $url;
    159 
    160         // Make adjustments for switching between channels.
    161         $url = $this->channel_switching_modification( $url );
    162 
    163         // phpcs:ignore Squiz.PHP.CommentedOutCode.Found
    164         // $url = add_query_arg( 'pretend_releases', array( '5.6-beta2' ), $url );
    165         // pretend_releases[]=5.6-beta2 query arg example.
    166 
    167         return wp_remote_get( $url, $args );
    168     }
    169 
    170     /**
    171      * Modify URL to version check to return expected API response.
    172      *
    173      * @param string $url Version check URL.
    174      *
    175      * @return string $url
    176      */
    177     private function channel_switching_modification( $url ) {
    178         $next_versions = ( new WPBT_Core( $this, static::$options ) )->calculate_next_versions();
    179         $wp_version    = get_bloginfo( 'version' );
    180         $channel       = self::$core_update_channel_constant ? self::$core_update_channel_constant : self::$options['channel'];
    181 
    182         if ( false !== strpos( $channel, 'development' )
    183             && version_compare( $wp_version, $next_versions['point'], '<' )
    184         ) {
    185             return $url;
    186         }
    187 
    188         switch ( $channel ) {
    189             case 'branch-development':
    190                 $url = add_query_arg( 'version', $next_versions['point'] . '-alpha', $url );
    191                 break;
    192             case 'development':
    193                 if ( false !== strpos( $wp_version, $next_versions['point'] )
    194                     || version_compare( $wp_version, $next_versions['point'], '<' )
    195                 ) {
    196                     $url = add_query_arg( 'version', $next_versions['release'] . '-alpha', $url );
    197                 }
    198                 break;
    199         }
    200 
    201         return $url;
     133     * Get channel query arg.
     134     *
     135     * @return string
     136     */
     137    public static function get_channel() {
     138        return empty( self::$options['stream-option'] )
     139            ? self::$options['channel']
     140            : self::$options['stream-option'];
     141    }
     142
     143    /**
     144     * Set channel query arg in wp_version_check().
     145     *
     146     * @param  array $query_args Array of query args.
     147     *
     148     * @return array
     149     */
     150    public function set_core_update_channel_constant( $query_args ) {
     151        return array_merge( $query_args, array( 'channel' => self::get_channel() ) );
    202152    }
    203153
     
    358308
    359309        // For testing, set cache to 10 seconds.
     310        // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
    360311        // add_filter( 'wp_feed_cache_transient_lifetime', function () { return 10; } );
    361312
  • wordpress-beta-tester/trunk/vendor/composer/installed.json

    r3369865 r3391813  
    102102        {
    103103            "name": "phpcsstandards/phpcsextra",
    104             "version": "1.4.1",
    105             "version_normalized": "1.4.1.0",
     104            "version": "1.4.2",
     105            "version_normalized": "1.4.2.0",
    106106            "source": {
    107107                "type": "git",
    108108                "url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
    109                 "reference": "882b8c947ada27eb002870fe77fee9ce0a454cdb"
     109                "reference": "8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e"
    110110            },
    111111            "dist": {
    112112                "type": "zip",
    113                 "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/882b8c947ada27eb002870fe77fee9ce0a454cdb",
    114                 "reference": "882b8c947ada27eb002870fe77fee9ce0a454cdb",
     113                "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e",
     114                "reference": "8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e",
    115115                "shasum": ""
    116116            },
     
    127127                "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
    128128            },
    129             "time": "2025-09-05T06:54:52+00:00",
     129            "time": "2025-10-28T17:00:02+00:00",
    130130            "type": "phpcodesniffer-standard",
    131131            "extra": {
     
    187187        {
    188188            "name": "phpcsstandards/phpcsutils",
    189             "version": "1.1.2",
    190             "version_normalized": "1.1.2.0",
     189            "version": "1.1.3",
     190            "version_normalized": "1.1.3.0",
    191191            "source": {
    192192                "type": "git",
    193193                "url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
    194                 "reference": "b22b59e3d9ec8fe4953e42c7d59117c6eae70eae"
     194                "reference": "8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9"
    195195            },
    196196            "dist": {
    197197                "type": "zip",
    198                 "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/b22b59e3d9ec8fe4953e42c7d59117c6eae70eae",
    199                 "reference": "b22b59e3d9ec8fe4953e42c7d59117c6eae70eae",
     198                "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9",
     199                "reference": "8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9",
    200200                "shasum": ""
    201201            },
     
    212212                "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0"
    213213            },
    214             "time": "2025-09-05T00:00:03+00:00",
     214            "time": "2025-10-16T16:39:32+00:00",
    215215            "type": "phpcodesniffer-standard",
    216216            "extra": {
     
    283283        {
    284284            "name": "squizlabs/php_codesniffer",
    285             "version": "3.13.4",
    286             "version_normalized": "3.13.4.0",
     285            "version": "3.13.5",
     286            "version_normalized": "3.13.5.0",
    287287            "source": {
    288288                "type": "git",
    289289                "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
    290                 "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119"
     290                "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4"
    291291            },
    292292            "dist": {
    293293                "type": "zip",
    294                 "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119",
    295                 "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119",
     294                "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
     295                "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
    296296                "shasum": ""
    297297            },
     
    305305                "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
    306306            },
    307             "time": "2025-09-05T05:47:09+00:00",
     307            "time": "2025-11-04T16:30:35+00:00",
    308308            "bin": [
    309309                "bin/phpcbf",
     
    311311            ],
    312312            "type": "library",
    313             "extra": {
    314                 "branch-alias": {
    315                     "dev-master": "3.x-dev"
    316                 }
    317             },
    318313            "installation-source": "dist",
    319314            "notification-url": "https://packagist.org/downloads/",
  • wordpress-beta-tester/trunk/vendor/composer/installed.php

    r3369865 r3391813  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '3157d931e1241c2e8ee94768674ee9684e4e606e',
     6        'reference' => 'a8d784f6503c52311db2e2df9775d6c3cfc9560e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '3157d931e1241c2e8ee94768674ee9684e4e606e',
     16            'reference' => 'a8d784f6503c52311db2e2df9775d6c3cfc9560e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'phpcsstandards/phpcsextra' => array(
    32             'pretty_version' => '1.4.1',
    33             'version' => '1.4.1.0',
    34             'reference' => '882b8c947ada27eb002870fe77fee9ce0a454cdb',
     32            'pretty_version' => '1.4.2',
     33            'version' => '1.4.2.0',
     34            'reference' => '8e89a01c7b8fed84a12a2a7f5a23a44cdbe4f62e',
    3535            'type' => 'phpcodesniffer-standard',
    3636            'install_path' => __DIR__ . '/../phpcsstandards/phpcsextra',
     
    3939        ),
    4040        'phpcsstandards/phpcsutils' => array(
    41             'pretty_version' => '1.1.2',
    42             'version' => '1.1.2.0',
    43             'reference' => 'b22b59e3d9ec8fe4953e42c7d59117c6eae70eae',
     41            'pretty_version' => '1.1.3',
     42            'version' => '1.1.3.0',
     43            'reference' => '8b8e17615d04f2fc2cd46fc1d2fd888fa21b3cf9',
    4444            'type' => 'phpcodesniffer-standard',
    4545            'install_path' => __DIR__ . '/../phpcsstandards/phpcsutils',
     
    4848        ),
    4949        'squizlabs/php_codesniffer' => array(
    50             'pretty_version' => '3.13.4',
    51             'version' => '3.13.4.0',
    52             'reference' => 'ad545ea9c1b7d270ce0fc9cbfb884161cd706119',
     50            'pretty_version' => '3.13.5',
     51            'version' => '3.13.5.0',
     52            'reference' => '0ca86845ce43291e8f5692c7356fccf3bcf02bf4',
    5353            'type' => 'library',
    5454            'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
  • wordpress-beta-tester/trunk/wp-beta-tester.php

    r3369865 r3391813  
    1414 * Description:       Allows you to easily upgrade to Beta releases.
    1515 * Author:            WordPress Upgrade/Install Team
    16  * Version:           3.6.5
     16 * Version:           4.0.0
    1717 * Network:           true
    1818 * Author URI:        https://make.wordpress.org/core/components/upgrade-install/
     
    2222 * License URI:       https://www.opensource.org/licenses/GPL-2.0
    2323 * GitHub Plugin URI: https://github.com/afragen/wordpress-beta-tester
    24  * Requires at least: 3.1
     24 * Requires at least: 4.9
    2525 * Requires PHP:      5.6
    2626 */
Note: See TracChangeset for help on using the changeset viewer.