mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- allow webp image format
This commit is contained in:
@@ -1982,7 +1982,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$array['invalid_image'] = __( 'Please upload a valid image!', 'ultimate-member' );
|
||||
}
|
||||
if ( ! isset( $array['allowed_types'] ) ) {
|
||||
$array['allowed_types'] = 'gif,jpg,jpeg,png';
|
||||
$array['allowed_types'] = 'gif,jpg,jpeg,png,webp';
|
||||
} else {
|
||||
$array['allowed_types'] = implode( ',', $array['allowed_types'] );
|
||||
}
|
||||
|
||||
@@ -822,12 +822,15 @@ if ( ! class_exists( 'um\core\Files' ) ) {
|
||||
* }
|
||||
* ?>
|
||||
*/
|
||||
return apply_filters( 'um_allowed_image_types', array(
|
||||
'png' => 'PNG',
|
||||
'jpeg' => 'JPEG',
|
||||
'jpg' => 'JPG',
|
||||
'gif' => 'GIF'
|
||||
) );
|
||||
return apply_filters(
|
||||
'um_allowed_image_types',
|
||||
array(
|
||||
'png' => 'PNG',
|
||||
'jpeg' => 'JPEG',
|
||||
'jpg' => 'JPG',
|
||||
'webp' => 'WEBP',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user