Changeset 652
- Timestamp:
- 12/25/2003 12:01:31 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r629 r652 8 8 9 9 <head> 10 <title><?php bloginfo('name') ?><?php single_post_title(' » ') ?><?php single_cat_title(' » ') ?><?php single_month_title(' » ')?></title>10 <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> 11 11 12 12 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> -
trunk/wp-includes/functions.php
r650 r652 1309 1309 $attributes = $regex[2]; 1310 1310 if($attributes) { 1311 1312 1311 $attributes = ' '.$attributes; 1313 1312 } -
trunk/wp-includes/template-functions.php
r650 r652 71 71 } 72 72 return $output; 73 } 74 75 function wp_title($sep = '»', $display = true) { 76 global $wpdb, $tableposts, $tablecategories; 77 global $year, $monthnum, $day, $cat, $p, $name; 78 79 // If there's a category 80 if(!empty($cat) || !empty($category_name)) { 81 $title = stripslashes(get_the_category_by_ID($cat)); 82 $title = stripslashes($wpdb->get_var("SELECT cat_name FROM $tablecategories WHERE category_nicename = '$category_name'")); 83 } 84 85 // If there's a month 86 if(!empty($m)) { 87 $my_year = substr($m, 0, 4); 88 $my_month = $month[substr($m, 4, 2)]; 89 $title = "$my_year $sep $my_month"; 90 91 } 92 if (!empty($year)) { 93 $title = $year; 94 if (!empty($monthnum)) { 95 $title .= "$sep $monthnum"; 96 } 97 if (!empty($day)) { 98 $title .= " $sep $day"; 99 } 100 } 101 102 // If there's a post 103 if (intval($p) || '' != $name) { 104 if (!$p) { 105 if ($year != '') { 106 $year = '' . intval($year); 107 $where .= ' AND YEAR(post_date)=' . $year; 108 } 109 110 if ($monthnum != '') { 111 $monthnum = '' . intval($monthnum); 112 $where .= ' AND MONTH(post_date)=' . $monthnum; 113 } 114 115 if ($day != '') { 116 $hay = '' . intval($day); 117 $where .= ' AND DAYOFMONTH(post_date)=' . $day; 118 } 119 $p = $wpdb->get_var("SELECT ID FROM $tableposts WHERE post_name = '$name' $where"); 120 } 121 $post_data = get_postdata($p); 122 $title = strip_tags(stripslashes($post_data['Title'])); 123 $title = apply_filters('single_post_title', $title); 124 } 125 126 // Send it out 127 if ($display) { 128 echo " $sep $title"; 129 } else { 130 return " $sep $title"; 131 } 73 132 } 74 133
Note: See TracChangeset
for help on using the changeset viewer.