Changeset 1558
- Timestamp:
- 08/24/2004 08:43:01 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
wp-blog-header.php (modified) (2 diffs)
-
wp-includes/classes.php (modified) (3 diffs)
-
wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-blog-header.php
r1536 r1558 1 1 <?php 2 2 3 if (! isset($wp_did_header)): 3 4 if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) 4 5 die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='wp-admin/setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); … … 160 161 } 161 162 162 if ($pagenow != 'wp-feed.php' && $feed != '') { 163 require(dirname(__FILE__) . '/wp-feed.php'); 164 exit; 165 } 166 167 if ($pagenow != 'wp-trackback.php' && $tb == 1) { 168 require(dirname(__FILE__) . '/wp-trackback.php'); 169 exit; 163 $wp_did_header = true; 164 endif; 165 166 // Template redirection 167 if (is_single() && (! isset($wp_did_single)) && 168 file_exists(ABSPATH . 'wp-content/single.php')) { 169 $wp_did_single = true; 170 include(ABSPATH . 'wp-content/single.php'); 171 exit; 172 } else if (is_page() && (! isset($wp_did_page)) && 173 file_exists(ABSPATH . 'wp-content/page.php')) { 174 $wp_did_page = true; 175 include(ABSPATH . 'wp-content/page.php'); 176 exit; 177 } else if (is_category() && (! isset($wp_did_category)) && 178 file_exists(ABSPATH . 'wp-content/category.php')) { 179 $wp_did_category = true; 180 include(ABSPATH . 'wp-content/category.php'); 181 exit; 182 } else if (is_author() && (! isset($wp_did_author)) && 183 file_exists(ABSPATH . 'wp-content/author.php')) { 184 $wp_did_author = true; 185 include(ABSPATH . 'wp-content/author.php'); 186 exit; 187 } else if (is_date() && (! isset($wp_did_date)) && 188 file_exists(ABSPATH . 'wp-content/date.php')) { 189 $wp_did_date = true; 190 include(ABSPATH . 'wp-content/date.php'); 191 exit; 192 } else if (is_archive() && (! isset($wp_did_archive)) && 193 file_exists(ABSPATH . 'wp-content/archive.php')) { 194 $wp_did_archive = true; 195 include(ABSPATH . 'wp-content/archive.php'); 196 exit; 197 } else if (is_search() && (! isset($wp_did_search)) && 198 file_exists(ABSPATH . 'wp-content/search.php')) { 199 $wp_did_search = true; 200 include(ABSPATH . 'wp-content/search.php'); 201 exit; 202 } else if (is_feed() && $pagenow != 'wp-feed.php') { 203 include(dirname(__FILE__) . '/wp-feed.php'); 204 exit; 205 } else if ($pagenow != 'wp-trackback.php' && $tb == 1) { 206 include(dirname(__FILE__) . '/wp-trackback.php'); 207 exit; 170 208 } 171 209 -
trunk/wp-includes/classes.php
r1556 r1558 11 11 12 12 var $is_single = false; 13 var $is_page = false; 13 14 var $is_archive = false; 14 15 var $is_date = false; … … 25 26 function init () { 26 27 $this->is_single = false; 28 $this->is_page = false; 27 29 $this->is_archive = false; 28 30 $this->is_date = false; … … 153 155 if ('' != $qv['feed']) { 154 156 $this->is_feed = true; 155 $this->feed = $qv['feed']; 157 } 158 159 if ('' != $qv['static'] || '' != $qv['pagename']) { 160 $this->is_page = true; 156 161 } 157 162 158 163 if ( ($this->is_date || $this->is_author || $this->is_category) 159 && (! $this->is_single)) {164 && (! ($this->is_single || $this->is_page)) ) { 160 165 $this->is_archive = true; 161 166 } 162 167 163 if ( ! ($this->is_archive || $this->is_single || $this->is_ search || $this->is_feed)) {168 if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed)) { 164 169 $this->is_home = true; 165 170 } -
trunk/wp-includes/functions.php
r1556 r1558 1591 1591 } 1592 1592 1593 function is_page () { 1594 global $wp_query; 1595 1596 return $wp_query->is_page; 1597 } 1598 1593 1599 function is_archive () { 1594 1600 global $wp_query;
Note: See TracChangeset
for help on using the changeset viewer.