Changeset 5670
- Timestamp:
- 01/29/2012 05:45:11 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-filters.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-filters.php
r5604 r5670 244 244 * 245 245 * @global object $bp BuddyPress global settings 246 * @global unknown $post247 * @global WP_Query $wp_query WordPress query object248 246 * @param string $title Original page title 249 247 * @param string $sep How to separate the various items within the page title. … … 254 252 */ 255 253 function bp_modify_page_title( $title, $sep, $seplocation ) { 256 global $bp , $post, $wp_query;254 global $bp; 257 255 258 256 // If this is not a BP page, just return the title produced by WP … … 268 266 // Displayed user 269 267 if ( !empty( $bp->displayed_user->fullname ) && !is_404() ) { 268 269 // Get the component's ID to try and get it's name 270 $component_id = $component_name = bp_current_component(); 271 272 // Use the actual component name 273 if ( !empty( $bp->{$component_id}->name ) ) { 274 $component_name = $bp->{$component_id}->name; 275 276 // Fall back on the component ID (probably same as current_component) 277 } elseif ( !empty( $bp->{$component_id}->id ) ) { 278 $component_name = $bp->{$component_id}->id; 279 } 280 270 281 // translators: "displayed user's name | canonicalised component name" 271 $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ), bp_get_displayed_user_fullname(), ucwords( bp_current_component()) ) );282 $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ), bp_get_displayed_user_fullname(), ucwords( $component_name ) ) ); 272 283 273 284 // A single group
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)