Changeset 13417
- Timestamp:
- 02/10/2023 04:01:49 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/unit-tests.yml
r13414 r13417 21 21 wp_version: '6.1' 22 22 - php: '7.4' 23 wp_version: '5. 7'23 wp_version: '5.8' 24 24 env: 25 25 WP_ENV_PHP_VERSION: ${{ matrix.php }} … … 59 59 - name: Adapt WP PHPUnit version for WP < 6.1 60 60 run: | 61 if [ ${{ env.WP_VERSION }} == '5. 7' ]; then61 if [ ${{ env.WP_VERSION }} == '5.8' ]; then 62 62 composer require wp-phpunit/wp-phpunit:6.0 --dev --ignore-platform-reqs 63 63 fi -
trunk/bp-loader.php
r13413 r13417 21 21 * Domain Path: /bp-languages/ 22 22 * Requires PHP: 5.6 23 * Requires at least: 5. 723 * Requires at least: 5.8 24 24 * Version: 12.0.0-alpha 25 25 */ -
trunk/src/bp-core/bp-core-attachments.php
r13371 r13417 165 165 function bp_attachments_get_allowed_types( $type = 'avatar' ) { 166 166 // 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' ); 171 168 172 169 // Avatar and cover image are images. … … 787 784 788 785 // 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' ) ) ) { 790 787 $defaults['webp_upload_error'] = true; 791 788 } -
trunk/src/bp-core/bp-core-template.php
r13170 r13417 3889 3889 ); 3890 3890 3891 if ( $block_name && bp_is_running_wp( '5.8.0', '>=' )) {3891 if ( $block_name ) { 3892 3892 $widget_blocks = get_option( 'widget_block', array() ); 3893 3893 $sidebars = wp_get_sidebars_widgets(); -
trunk/src/bp-core/bp-core-widgets.php
r13228 r13417 20 20 function bp_core_retain_legacy_widgets() { 21 21 $theme_supports = current_theme_supports( 'widgets-block-editor' ); 22 $wp_supports = bp_is_running_wp( '5.8.0' );23 22 24 23 /** 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 ); 26 25 27 26 $retain_legacy_widgets = true; -
trunk/src/bp-loader.php
r13413 r13417 21 21 * Domain Path: /bp-languages/ 22 22 * Requires PHP: 5.6 23 * Requires at least: 5. 723 * Requires at least: 5.8 24 24 * Version: 12.0.0-alpha 25 25 */ -
trunk/tests/phpunit/testcases/core/avatars.php
r13316 r13417 6 6 class BP_Tests_Avatars extends BP_UnitTestCase { 7 7 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' ); 10 10 11 11 public function set_up() { 12 12 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 }18 13 } 19 14 -
trunk/tests/phpunit/testcases/core/functions.php
r13370 r13417 785 785 */ 786 786 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' ); 791 788 792 789 $avatar = bp_attachments_get_allowed_types( 'avatar' );
Note: See TracChangeset
for help on using the changeset viewer.