Make WordPress Core

Ticket #46795: 46795.diff

File 46795.diff, 1.5 KB (added by david.binda, 6 years ago)
  • src/wp-admin/includes/post.php

     
    11851185}
    11861186
    11871187/**
    1188  * Get all available post MIME types for a given post type.
    1189  *
    1190  * @since 2.5.0
    1191  *
    1192  * @global wpdb $wpdb WordPress database abstraction object.
    1193  *
    1194  * @param string $type
    1195  * @return mixed
    1196  */
    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 }
    1203 
    1204 /**
    12051188 * Get the query variables for the current attachments request.
    12061189 *
    12071190 * @since 4.2.0
  • src/wp-includes/post.php

     
    68916891function wp_cache_set_posts_last_changed() {
    68926892        wp_cache_set( 'last_changed', microtime(), 'posts' );
    68936893}
     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 */
     6905function 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}