Changeset 45219
- Timestamp:
- 04/16/2019 08:29:42 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r45083 r45219 1183 1183 1184 1184 return $avail_post_stati; 1185 }1186 1187 /**1188 * Get all available post MIME types for a given post type.1189 *1190 * @since 2.5.01191 *1192 * @global wpdb $wpdb WordPress database abstraction object.1193 *1194 * @param string $type1195 * @return mixed1196 */1197 function get_available_post_mime_types( $type = 'attachment' ) {1198 global $wpdb;1199 1200 $types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) );1201 return $types;1202 1185 } 1203 1186 -
trunk/src/wp-includes/post.php
r44785 r45219 6892 6892 wp_cache_set( 'last_changed', microtime(), 'posts' ); 6893 6893 } 6894 6895 /** 6896 * Get all available post MIME types for a given post type. 6897 * 6898 * @since 2.5.0 6899 * 6900 * @global wpdb $wpdb WordPress database abstraction object. 6901 * 6902 * @param string $type 6903 * @return mixed 6904 */ 6905 function get_available_post_mime_types( $type = 'attachment' ) { 6906 global $wpdb; 6907 6908 $types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_mime_type FROM $wpdb->posts WHERE post_type = %s", $type ) ); 6909 return $types; 6910 }
Note: See TracChangeset
for help on using the changeset viewer.