Changeset 3037
- Timestamp:
- 11/11/2005 12:48:31 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/template-functions-general.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-general.php
r3030 r3037 145 145 $name = get_query_var('name'); 146 146 $category_name = get_query_var('category_name'); 147 $author = get_query_var('author'); 148 $author_name = get_query_var('author_name'); 147 149 148 150 // If there's a category … … 161 163 } 162 164 $title = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'"); 165 } 166 167 // If there's an author 168 if ( !empty($author) ) { 169 $title = get_userdata($author); 170 $title = $title->display_name; 171 } 172 if ( !empty($author_name) ) { 173 // We do a direct query here because we don't cache by nicename. 174 $title = $wpdb->get_var("SELECT display_name FROM $wpdb->users WHERE user_nicename = '$author_name'"); 163 175 } 164 176
Note: See TracChangeset
for help on using the changeset viewer.