Changeset 3303 for trunk/wp-includes/classes.php
- Timestamp:
- 12/13/2005 07:19:56 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r3300 r3303 98 98 $qv['attachment_id'] = $qv['subpost_id']; 99 99 100 if ( ('' != $qv['attachment']) || $qv['attachment_id'] ) {100 if ( ('' != $qv['attachment']) || (int) $qv['attachment_id'] ) { 101 101 $this->is_single = true; 102 102 $this->is_attachment = true; 103 } 104 105 if ('' != $qv['name']) { 103 } elseif ('' != $qv['name']) { 106 104 $this->is_single = true; 107 105 } elseif ( $qv['p'] ) { … … 116 114 } elseif (!empty($qv['s'])) { 117 115 $this->is_search = true; 116 switch ($qv['show_post_type']) { 117 case 'page' : 118 $this->is_page = true; 119 break; 120 case 'attachment' : 121 $this->is_attachment = true; 122 break; 123 } 118 124 } else { 119 125 // Look for archive queries. Dates, categories, authors. … … 198 204 if ( ($this->is_date || $this->is_author || $this->is_category)) { 199 205 $this->is_archive = true; 206 } 207 208 if ( 'attachment' == $qv['show_post_type'] ) { 209 $this->is_attachment = true; 200 210 } 201 211 } … … 1414 1424 var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id'); 1415 1425 1416 var $private_query_vars = array('posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging' );1426 var $private_query_vars = array('posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'show_post_type'); 1417 1427 1418 1428 var $query_vars;
Note: See TracChangeset
for help on using the changeset viewer.