Changeset 34685 for trunk/src/wp-includes/query.php
- Timestamp:
- 09/29/2015 04:57:02 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r34659 r34685 4737 4737 4738 4738 // Guess the current post_type based on the query vars. 4739 if ( get_query_var('post_type') ) 4740 $post_type = get_query_var('post_type'); 4741 elseif ( !empty($wp_query->query_vars['pagename']) ) 4739 if ( get_query_var( 'post_type' ) ) { 4740 $post_type = get_query_var( 'post_type' ); 4741 } elseif ( get_query_var( 'attachment' ) ) { 4742 $post_type = 'attachment'; 4743 } elseif ( ! empty( $wp_query->query_vars['pagename'] ) ) { 4742 4744 $post_type = 'page'; 4743 else4745 } else { 4744 4746 $post_type = 'post'; 4747 } 4745 4748 4746 4749 if ( is_array( $post_type ) ) {
Note: See TracChangeset
for help on using the changeset viewer.