mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-18 05:53:23 +09:00
Update image ext check
pulled from latest CMB2
This commit is contained in:
@@ -599,11 +599,9 @@ class Display_Featured_Image_Genesis_Settings {
|
||||
protected function is_valid_img_ext( $file ) {
|
||||
$file_ext = $this->get_file_ext( $file );
|
||||
|
||||
$this->valid = empty( $this->valid )
|
||||
? (array) apply_filters( 'displayfeaturedimage_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif' ) )
|
||||
: $this->valid;
|
||||
$is_valid_types = (array) apply_filters( 'displayfeaturedimage_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif' ) );
|
||||
|
||||
return ( $file_ext && in_array( $file_ext, $this->valid ) );
|
||||
return ( $file_ext && in_array( $file_ext, $is_valid_types ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user