Changeset 5010 for branches/2.0/wp-includes/template-functions-general.php
- Timestamp:
- 03/09/2007 08:58:05 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-includes/template-functions-general.php
r4656 r5010 138 138 139 139 function wp_title($sep = '»', $display = true) { 140 global $wpdb; 141 global $m, $year, $monthnum, $day, $category_name, $month, $posts; 140 global $wpdb, $month; 142 141 143 142 $cat = get_query_var('cat'); … … 147 146 $author = get_query_var('author'); 148 147 $author_name = get_query_var('author_name'); 148 $m = get_query_var('m'); 149 $year = get_query_var('year'); 150 $monthnum = get_query_var('monthnum'); 151 $day = get_query_var('day'); 152 $title = ''; 149 153 150 154 // If there's a category … … 152 156 // category exclusion 153 157 if ( !stristr($cat,'-') ) 154 $title = get_the_category_by_ID($cat); 155 } 156 if ( !empty($category_name) ) { 158 $title = apply_filters('single_cat_title', get_the_category_by_ID($cat)); 159 } elseif ( !empty($category_name) ) { 157 160 if ( stristr($category_name,'/') ) { 158 161 $category_name = explode('/',$category_name); … … 163 166 } 164 167 $title = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'"); 168 $title = apply_filters('single_cat_title', $title); 165 169 } 166 170 … … 245 249 246 250 function single_month_title($prefix = '', $display = true ) { 247 global $m, $monthnum, $month, $year; 251 global $month; 252 253 $m = get_query_var('m'); 254 $year = get_query_var('year'); 255 $monthnum = get_query_var('monthnum'); 256 248 257 if ( !empty($monthnum) && !empty($year) ) { 249 258 $my_year = $year;
Note: See TracChangeset
for help on using the changeset viewer.