Skip to:
Content

BuddyPress.org


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

Raise WordPress required version to 5.8

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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    }
Note: See TracChangeset for help on using the changeset viewer.