Changeset 1492
- Timestamp:
- 07/28/2004 03:30:15 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-general.php
r1491 r1492 99 99 function wp_title($sep = '»', $display = true) { 100 100 global $wpdb; 101 global $m, $year, $monthnum, $day, $cat, $ p, $name, $month, $posts;101 global $m, $year, $monthnum, $day, $cat, $category_name, $p, $name, $month, $posts; 102 102 103 103 // If there's a category … … 108 108 } 109 109 if (!empty($category_name)) { 110 if (stristr($category_name,'/')) { 111 $category_name = explode('/',$category_name); 112 if ($category_name[count($category_name)-1]) { 113 $category_name = $category_name[count($category_name)-1]; // no trailing slash 114 } else { 115 $category_name = $category_name[count($category_name)-2]; // there was a trailling slash 116 } 117 } 110 118 $title = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'"); 111 119 }
Note: See TracChangeset
for help on using the changeset viewer.