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' );
|
$array['invalid_image'] = __( 'Please upload a valid image!', 'ultimate-member' );
|
||||||
}
|
}
|
||||||
if ( ! isset( $array['allowed_types'] ) ) {
|
if ( ! isset( $array['allowed_types'] ) ) {
|
||||||
$array['allowed_types'] = 'gif,jpg,jpeg,png';
|
$array['allowed_types'] = 'gif,jpg,jpeg,png,webp';
|
||||||
} else {
|
} else {
|
||||||
$array['allowed_types'] = implode( ',', $array['allowed_types'] );
|
$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(
|
return apply_filters(
|
||||||
'png' => 'PNG',
|
'um_allowed_image_types',
|
||||||
'jpeg' => 'JPEG',
|
array(
|
||||||
'jpg' => 'JPG',
|
'png' => 'PNG',
|
||||||
'gif' => 'GIF'
|
'jpeg' => 'JPEG',
|
||||||
) );
|
'jpg' => 'JPG',
|
||||||
|
'webp' => 'WEBP',
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user