Changeset 61576
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-media-control.php
r60645 r61576 93 93 * Note that the default value must be a URL, NOT an attachment ID. 94 94 */ 95 $ext = substr( $this->setting->default, -3 ); 96 $type = in_array( $ext, array( 'jpg', 'png', 'gif', 'bmp', 'webp', 'avif' ), true ) ? 'image' : 'document'; 95 $ext = wp_check_filetype( $this->setting->default )['ext']; 96 $ext_types = wp_get_ext_types(); 97 $type = isset( $ext_types['image'] ) && in_array( $ext, $ext_types['image'], true ) ? 'image' : 'document'; 97 98 98 99 $default_attachment = array(
Note: See TracChangeset
for help on using the changeset viewer.