Changeset 5009 for branches/2.1/wp-includes/general-template.php
- Timestamp:
- 03/09/2007 08:47:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/wp-includes/general-template.php
r4775 r5009 148 148 149 149 function wp_title($sep = '»', $display = true) { 150 global $wpdb; 151 global $m, $year, $monthnum, $day, $category_name, $wp_locale, $posts; 150 global $wpdb, $wp_locale, $wp_query; 152 151 153 152 $cat = get_query_var('cat'); … … 157 156 $author = get_query_var('author'); 158 157 $author_name = get_query_var('author_name'); 158 $m = get_query_var('m'); 159 $year = get_query_var('year'); 160 $monthnum = get_query_var('monthnum'); 161 $day = get_query_var('day'); 159 162 $title = ''; 160 163 … … 197 200 $title = $year; 198 201 if ( !empty($monthnum) ) 199 $title .= " $sep " .$wp_locale->get_month($monthnum);202 $title .= " $sep " . $wp_locale->get_month($monthnum); 200 203 if ( !empty($day) ) 201 $title .= " $sep " .zeroise($day, 2);204 $title .= " $sep " . zeroise($day, 2); 202 205 } 203 206 204 207 // If there is a post 205 208 if ( is_single() || is_page() ) { 206 $title = strip_tags($ posts[0]->post_title);209 $title = strip_tags($wp_query->get_queried_object()->post_title); 207 210 $title = apply_filters('single_post_title', $title); 208 211 } … … 257 260 258 261 function single_month_title($prefix = '', $display = true ) { 259 global $m, $monthnum, $wp_locale, $year; 262 global $wp_locale; 263 264 $m = get_query_var('m'); 265 $year = get_query_var('year'); 266 $monthnum = get_query_var('monthnum'); 267 260 268 if ( !empty($monthnum) && !empty($year) ) { 261 269 $my_year = $year;
Note: See TracChangeset
for help on using the changeset viewer.