Changeset 57687 for trunk/src/wp-includes/post.php
- Timestamp:
- 02/21/2024 07:25:18 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r57644 r57687 6804 6804 * @since 2.1.0 6805 6805 * 6806 * @param string|int $mime MIME type or attachment ID. 6806 * @param string|int $mime MIME type or attachment ID. 6807 * @param string $preferred_ext File format to prefer in return. Default .png. 6807 6808 * @return string|false Icon, false otherwise. 6808 6809 */ 6809 function wp_mime_type_icon( $mime = 0 ) {6810 function wp_mime_type_icon( $mime = 0, $preferred_ext = '.png' ) { 6810 6811 if ( ! is_numeric( $mime ) ) { 6811 6812 $icon = wp_cache_get( "mime_type_icon_$mime" ); … … 6886 6887 continue; 6887 6888 } 6888 $icon_files[ "$dir/$file" ] = "$uri/$file"; 6889 if ( $ext === $preferred_ext ) { 6890 $icon_files[ "$dir/$file" ] = "$uri/$file"; 6891 } 6889 6892 } 6890 6893 closedir( $dh );
Note: See TracChangeset
for help on using the changeset viewer.