Changeset 56452
- Timestamp:
- 08/24/2023 04:53:15 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r56414 r56452 7867 7867 global $wpdb; 7868 7868 7869 $types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) ); 7870 return $types; 7869 /** 7870 * Filters the list of available post MIME types for the given post type. 7871 * 7872 * @since 6.4.0 7873 * 7874 * @param string[]|null $mime_types An array of MIME types. Default null. 7875 * @param string $type The post type name. Usually 'attachment' but can be any post type. 7876 */ 7877 $mime_types = apply_filters( 'get_available_post_mime_types', null, $type ); 7878 7879 if ( ! is_array( $mime_types ) ) { 7880 $mime_types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) ); 7881 } 7882 7883 return $mime_types; 7871 7884 } 7872 7885
Note: See TracChangeset
for help on using the changeset viewer.