Skip to:
Content

BuddyPress.org

Changeset 13718


Ignore:
Timestamp:
01/29/2024 06:31:34 PM (16 months ago)
Author:
imath
Message:

Raise WordPress required version to 6.1

  • Do required WP version bumps.
  • Remove WP function/version checks when these were about WP version < 6.1.
  • Init the 14.0.0 deprecated functions file.
  • Update the GH PHP Unit Action and remove the 6.0 wp-phpunit/wp-phpunit composer package downgrade that was needed when testing WP version < 6.1.

Fixes #9051
Closes https://github.com/buddypress/buddypress/pull/226

Location:
trunk
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/unit-tests.yml

    r13684 r13718  
    2525            wp_version: '6.4'
    2626          - php: '7.4'
    27             wp_version: '5.8'
     27            wp_version: '6.1'
    2828    env:
    2929      WP_ENV_PHP_VERSION: ${{ matrix.php }}
     
    6666          composer-options: "--ignore-platform-reqs"
    6767
    68       - name: Adapt WP PHPUnit version for WP < 6.1
    69         run: |
    70           if [ ${{ env.WP_VERSION }} == '5.8' ]; then
    71             composer require wp-phpunit/wp-phpunit:6.0 --dev --ignore-platform-reqs
    72           fi
    73 
    7468      - name: Cache node modules
    7569        uses: actions/cache@v2
  • trunk/bp-loader.php

    r13667 r13718  
    2121 * Domain Path:       /bp-languages/
    2222 * Requires PHP:      5.6
    23  * Requires at least: 5.8
     23 * Requires at least: 6.1
    2424 * Version:           14.0.0-alpha
    2525 */
  • trunk/src/bp-core/admin/bp-core-admin-functions.php

    r13660 r13718  
    15501550    );
    15511551}
    1552 
    1553 /**
    1554  * Select the right `block_categories` filter according to WP version.
    1555  *
    1556  * @since 8.0.0
    1557  * @since 12.0.0 This category is left for third party plugin but not used anymmore.
    1558  *
    1559  * @todo deprecate.
    1560  */
    1561 function bp_block_init_category_filter() {
    1562     if ( function_exists( 'get_default_block_categories' ) ) {
    1563         add_filter( 'block_categories_all', 'bp_block_category', 1, 2 );
    1564     } else {
    1565         add_filter( 'block_categories', 'bp_block_category', 1, 2 );
    1566     }
    1567 }
    1568 add_action( 'bp_init', 'bp_block_init_category_filter' );
     1552add_filter( 'block_categories_all', 'bp_block_category', 1, 2 );
    15691553
    15701554/**
  • trunk/src/bp-core/bp-core-blocks.php

    r13676 r13718  
    156156    return $editor_settings;
    157157}
    158 
    159 /**
    160  * Select the right `block_editor_settings` filter according to WP version.
    161  *
    162  * @since 8.0.0
    163  */
    164 function bp_block_init_editor_settings_filter() {
    165     if ( function_exists( 'get_block_editor_settings' ) ) {
    166         add_filter( 'block_editor_settings_all', 'bp_blocks_editor_settings' );
    167     } else {
    168         add_filter( 'block_editor_settings', 'bp_blocks_editor_settings' );
    169     }
    170 }
    171 add_action( 'bp_init', 'bp_block_init_editor_settings_filter' );
     158add_filter( 'block_editor_settings_all', 'bp_blocks_editor_settings' );
    172159
    173160/**
  • trunk/src/bp-core/bp-core-functions.php

    r13705 r13718  
    47004700function bp_is_large_install() {
    47014701    // Use the Multisite function if available.
    4702     if ( function_exists( 'wp_is_large_network' ) ) {
     4702    if ( is_multisite() ) {
    47034703        $is_large = wp_is_large_network( 'users' );
    47044704    } else {
     
    48714871        11.0,
    48724872        12.0,
     4873        14.0,
    48734874    );
    48744875
  • trunk/src/bp-core/bp-core-template-loader.php

    r13686 r13718  
    465465     * BuddyPress then needs to use the WordPress template canvas to retrieve the community content.
    466466     */
    467     if ( bp_is_running_wp( '5.9.0', '>=' ) && wp_is_block_theme() ) {
     467    if ( wp_is_block_theme() ) {
    468468        $template = ABSPATH . WPINC . '/template-canvas.php';
    469469    }
     
    834834 */
    835835function bp_set_block_theme_compat() {
    836     if ( bp_is_running_wp( '5.9.0', '>=' ) && wp_is_block_theme() && current_theme_supports( 'buddypress' ) ) {
     836    if ( wp_is_block_theme() && current_theme_supports( 'buddypress' ) ) {
    837837        bp_deregister_template_stack( 'get_stylesheet_directory', 10 );
    838838        bp_deregister_template_stack( 'get_template_directory', 12 );
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r13315 r13718  
    644644        );
    645645
    646         /**
    647          * Make sure the wp_read_image_metadata function is reachable for the old Avatar UI
    648          * or if WordPress < 3.9 (New Avatar UI is not available in this case)
    649          */
     646        // Make sure the wp_read_image_metadata function is reachable.
    650647        if ( ! function_exists( 'wp_read_image_metadata' ) ) {
    651648            require_once( ABSPATH . 'wp-admin/includes/image.php' );
  • trunk/src/bp-loader.php

    r13667 r13718  
    2121 * Domain Path:       /bp-languages/
    2222 * Requires PHP:      5.6
    23  * Requires at least: 5.8
     23 * Requires at least: 6.1
    2424 * Version:           14.0.0-alpha
    2525 */
  • trunk/src/bp-templates/bp-nouveau/buddypress-functions.php

    r13709 r13718  
    8484        $this->directory_nav  = new BP_Core_Nav( bp_get_root_blog_id() );
    8585        $this->is_block_theme = false;
    86 
    87         if ( bp_is_running_wp( '5.9.0', '>=' ) ) {
    88             $this->is_block_theme = wp_is_block_theme();
    89         }
     86        $this->is_block_theme = wp_is_block_theme();
    9087    }
    9188
  • trunk/src/bp-templates/bp-nouveau/includes/functions.php

    r13652 r13718  
    16631663    }
    16641664
    1665     // `wp_get_global_settings()` has been introduced in WordPress 5.9
    1666     if ( function_exists( 'wp_get_global_settings' ) ) {
     1665    // Use Block Theme global settings for Block Themes.
     1666    if ( wp_is_block_theme() ) {
    16671667        $theme_layouts = wp_get_global_settings( array( 'layout' ) );
    16681668
  • trunk/src/readme.txt

    r13713 r13718  
    66License URI:       https://www.gnu.org/licenses/gpl-2.0.html
    77Requires PHP:      5.6
    8 Requires at least: 5.8
     8Requires at least: 6.1
    99Tested up to:      6.4
    1010Stable tag:        12.2.0
Note: See TracChangeset for help on using the changeset viewer.