Changeset 58437
- Timestamp:
- 06/18/2024 02:44:23 PM (4 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r58377 r58437 8095 8095 8096 8096 if ( ! is_array( $mime_types ) ) { 8097 $mime_types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) ); 8098 } 8099 8100 return $mime_types; 8097 $mime_types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s AND post_mime_type != ''", $type ) ); 8098 } 8099 8100 // Remove nulls from returned $mime_types. 8101 return array_values( array_filter( $mime_types ) ); 8101 8102 } 8102 8103
Note: See TracChangeset
for help on using the changeset viewer.