Ticket #6939: 6939.diff
| File 6939.diff, 1.6 KB (added by wojtek.szkutnik, 3 years ago) |
|---|
-
wp-includes/post-template.php
758 758 'child_of' => 0, 'exclude' => '', 759 759 'title_li' => __('Pages'), 'echo' => 1, 760 760 'authors' => '', 'sort_column' => 'menu_order, post_title', 761 'link_before' => '', 'link_after' => '', 'walker' => '', 761 'link_before' => '', 'link_after' => '', 'walker' => '', 762 'include_private' => false 762 763 ); 763 764 764 765 $r = wp_parse_args( $args, $defaults ); -
wp-includes/post.php
3064 3064 'authors' => '', 'parent' => -1, 'exclude_tree' => '', 3065 3065 'number' => '', 'offset' => 0, 3066 3066 'post_type' => 'page', 'post_status' => 'publish', 3067 'include_private' => false 3067 3068 ); 3068 3069 3069 3070 $r = wp_parse_args( $args, $defaults ); … … 3171 3172 3172 3173 if ( $parent >= 0 ) 3173 3174 $where .= $wpdb->prepare(' AND post_parent = %d ', $parent); 3175 3176 $page_status = "AND post_status = '%s'"; 3177 if ( $include_private ) { 3178 $page_status = 'AND ' . get_private_posts_cap_sql( 'page' ); 3179 } 3180 $where_post_type = $wpdb->prepare( "post_type = '%s' $page_status", $post_type, $post_status ); 3174 3181 3175 $where_post_type = $wpdb->prepare( "post_type = '%s' AND post_status = '%s'", $post_type, $post_status );3176 3177 3182 $query = "SELECT * FROM $wpdb->posts $join WHERE ($where_post_type) $where "; 3178 3183 $query .= $author_query; 3179 3184 $query .= " ORDER BY " . $sort_column . " " . $sort_order ;
