Skip to:
Content

BuddyPress.org

Changeset 13417


Ignore:
Timestamp:
02/10/2023 04:01:49 AM (3 years ago)
Author:
imath
Message:

Raise WordPress required version to 5.8

Closes https://github.com/buddypress/buddypress/pull/61
Fixes #8822

Location:
trunk
Files:
8 edited

Legend:

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

    r13414 r13417  
    2121            wp_version: '6.1'
    2222          - php: '7.4'
    23             wp_version: '5.7'
     23            wp_version: '5.8'
    2424    env:
    2525      WP_ENV_PHP_VERSION: ${{ matrix.php }}
     
    5959      - name: Adapt WP PHPUnit version for WP < 6.1
    6060        run: |
    61           if [ ${{ env.WP_VERSION }} == '5.7' ]; then
     61          if [ ${{ env.WP_VERSION }} == '5.8' ]; then
    6262            composer require wp-phpunit/wp-phpunit:6.0 --dev --ignore-platform-reqs
    6363          fi
  • trunk/bp-loader.php

    r13413 r13417  
    2121 * Domain Path:       /bp-languages/
    2222 * Requires PHP:      5.6
    23  * Requires at least: 5.7
     23 * Requires at least: 5.8
    2424 * Version:           12.0.0-alpha
    2525 */
  • trunk/src/bp-core/bp-core-attachments.php

    r13371 r13417  
    165165function bp_attachments_get_allowed_types( $type = 'avatar' ) {
    166166        // Defaults to BuddyPress supported image extensions.
    167         $exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
    168         if ( bp_is_running_wp( '5.8.0', '>=' ) ) {
    169                 $exts[] = 'webp';
    170         }
     167        $exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' );
    171168
    172169        // Avatar and cover image are images.
     
    787784
    788785        // Check if WebP images can be edited.
    789         if ( bp_is_running_wp( '5.8.0', '>=' ) && ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
     786        if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
    790787                $defaults['webp_upload_error'] = true;
    791788        }
  • trunk/src/bp-core/bp-core-template.php

    r13170 r13417  
    38893889        );
    38903890
    3891         if ( $block_name && bp_is_running_wp( '5.8.0', '>=' ) ) {
     3891        if ( $block_name ) {
    38923892                $widget_blocks = get_option( 'widget_block', array() );
    38933893                $sidebars      = wp_get_sidebars_widgets();
  • trunk/src/bp-core/bp-core-widgets.php

    r13228 r13417  
    2020function bp_core_retain_legacy_widgets() {
    2121        $theme_supports = current_theme_supports( 'widgets-block-editor' );
    22         $wp_supports    = bp_is_running_wp( '5.8.0' );
    2322
    2423        /** This filter is documented in wp-includes/widgets.php */
    25         $block_widgets_enabled = $theme_supports && apply_filters( 'use_widgets_block_editor', $wp_supports );
     24        $block_widgets_enabled = $theme_supports && apply_filters( 'use_widgets_block_editor', true );
    2625
    2726        $retain_legacy_widgets = true;
  • trunk/src/bp-loader.php

    r13413 r13417  
    2121 * Domain Path:       /bp-languages/
    2222 * Requires PHP:      5.6
    23  * Requires at least: 5.7
     23 * Requires at least: 5.8
    2424 * Version:           12.0.0-alpha
    2525 */
  • trunk/tests/phpunit/testcases/core/avatars.php

    r13316 r13417  
    66class BP_Tests_Avatars extends BP_UnitTestCase {
    77        private $params = array();
    8         protected $allowed_image_types = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
    9         protected $allowed_image_mimes = array( 'image/jpeg', 'image/jpeg', 'image/jpeg', 'image/gif', 'image/png' );
     8        protected $allowed_image_types = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' );
     9        protected $allowed_image_mimes = array( 'image/jpeg', 'image/jpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/webp' );
    1010
    1111        public function set_up() {
    1212                parent::set_up();
    13 
    14                 if ( bp_is_running_wp( '5.8.0', '>=' ) ) {
    15                         $this->allowed_image_types[] = 'webp';
    16                         $this->allowed_image_mimes[] = 'image/webp';
    17                 }
    1813        }
    1914
  • trunk/tests/phpunit/testcases/core/functions.php

    r13370 r13417  
    785785         */
    786786        public function test_bp_attachments_get_allowed_types() {
    787                 $supported = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
    788                 if ( bp_is_running_wp( '5.8.0', '>=' ) ) {
    789                         $supported[] = 'webp';
    790                 }
     787                $supported = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' );
    791788
    792789                $avatar = bp_attachments_get_allowed_types( 'avatar' );
Note: See TracChangeset for help on using the changeset viewer.