Make WordPress Core

Ticket #37051: 37051.patch

File 37051.patch, 1.1 KB (added by sebastian.pisula, 8 years ago)
  • wp-includes/post.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    42674267
    42684268        $post_types = esc_sql( $post_types );
    42694269        $post_type_in_string = "'" . implode( "','", $post_types ) . "'";
    4270         $sql = "
     4270
     4271        /**
     4272         * Filters the SQL Query
     4273         *
     4274         * @since 4.6.0
     4275         *
     4276         * @param array $post_types Array of escaped acceptance post type.
     4277         * @param array $parts Parts of escaped post names.
     4278         * @param string $post_type_in_string Imploded post types for sql query.
     4279         * @param string $in_string Imploded parts for sql query.
     4280         */
     4281        $sql = apply_filters( 'wp_page_path_sql', "
    42714282                SELECT ID, post_name, post_parent, post_type
    42724283                FROM $wpdb->posts
    42734284                WHERE post_name IN ($in_string)
    42744285                AND post_type IN ($post_type_in_string)
    4275         ";
     4286        ", $post_types, $parts, $post_type_in_string, $in_string);
    42764287
    42774288        $pages = $wpdb->get_results( $sql, OBJECT_K );
    42784289