- Timestamp:
- Apr 4, 2009, 6:47:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/custom_functions.php
r154 r155 1 1 <?php 2 function xpress_selected_author($show=true ) { 3 $output = ''; 4 $author_cookie = get_xpress_dir_name() . "_select_author" ; 5 if (!empty($_COOKIE[$author_cookie])){ 6 $uid = intval($_COOKIE[$author_cookie]); 7 $user_info = get_userdata($uid); 8 $output = $user_info->display_name; 9 } 10 if (empty($show)) 11 return $output; 12 else 13 echo $output; 14 15 } 2 16 3 17 function xpress_list_pings($trackback, $args, $depth) { … … 199 213 } 200 214 215 function xpress_is_multi_user(){ 216 global $xpress_config; 217 return $xpress_config->is_multi_user; 218 } 219 220 201 221 function xpress_substr($str, $start, $length, $trimmarker = '...') 202 222 { … … 352 372 function xpress_conditional_title($display = true) 353 373 { 374 $selected_author = xpress_selected_author(false); 375 354 376 $output = __('Main', 'xpressme'); 355 377 if (is_category()) … … 363 385 if (is_year()) 364 386 $output = sprintf(__('Archive for %s|Yearly archive page', 'xpressme'), get_the_time(__('Y', 'xpressme'))); 365 if (is_author()) 366 $output = sprintf(__('Archive for the ‘%s’ Author', 'xpressme'), get_author_name( get_query_var('author'))); 387 if (is_author()){ 388 if (empty($selected_author)) 389 $output = sprintf(__('Archive for the ‘%s’ Author', 'xpressme'), get_author_name( get_query_var('author'))); 390 } 367 391 if (is_search()) 368 392 $output = sprintf(__('Search Results of word ‘%s’', 'xpressme'), get_search_query()); 393 394 if (!empty($selected_author)) 395 $output = sprintf(__('Article of %s', 'xpressme'), $selected_author) . ' - ' . $output; 369 396 370 397 if ($display)
Note: See TracChangeset
for help on using the changeset viewer.