Changeset 13417 for trunk/src/bp-core/bp-core-attachments.php
- Timestamp:
- 02/10/2023 04:01:49 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.