WordPress.org

Make WordPress Core

Ticket #4711: 4711.2.diff

File 4711.2.diff, 877 bytes (added by chrislear, 6 years ago)

A smaller diff

  • wp-includes/post.php

    old new  
    19391939 
    19401940        $query = "SELECT * FROM $wpdb->posts " ; 
    19411941        $query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ; 
    1942         $query .= " WHERE (post_type = 'page' AND post_status = 'publish') $exclusions $inclusions " ; 
     1942        $query .= " WHERE (post_type = 'page' AND ".get_private_posts_cap_sql('page').") $exclusions $inclusions " ; 
     1943        //$query .= " WHERE (post_type = 'page' AND post_status = 'publish') $exclusions $inclusions " ; 
    19431944        // expected_slashed ($meta_key, $meta_value) -- also, it looks funky 
    19441945        $query .= ( empty( $meta_key ) | empty($meta_value)  ? "" : " AND ($wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = '$meta_key' AND $wpdb->postmeta.meta_value = '$meta_value' )" ) ; 
    19451946        $query .= $author_query;