- Timestamp:
- 09/27/2024 09:11:27 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-component.php
r13551 r14026 42 42 array( 43 43 'adminbar_myaccount_order' => 50, 44 'features' => array( 'star' ) 44 'features' => array( 'star' ), 45 45 ) 46 46 ); … … 178 178 // All globals for messaging component. 179 179 // Note that global_tables is included in this array. 180 parent::setup_globals( array( 181 'slug' => $default_slug, 182 'has_directory' => false, 183 'notification_callback' => 'messages_format_notifications', 184 'search_string' => __( 'Search Messages...', 'buddypress' ), 185 'global_tables' => $global_tables, 186 'meta_tables' => $meta_tables 187 ) ); 180 parent::setup_globals( 181 array( 182 'slug' => $default_slug, 183 'has_directory' => false, 184 'notification_callback' => 'messages_format_notifications', 185 'search_string' => __( 'Search Messages...', 'buddypress' ), 186 'global_tables' => $global_tables, 187 'meta_tables' => $meta_tables, 188 ) 189 ); 188 190 } 189 191 … … 224 226 if ( bp_is_active( $this->id, 'star' ) ) { 225 227 $sub_nav[] = array( 226 'name' => __( 'Starred', 'buddypress' ),228 'name' => __( 'Starred', 'buddypress' ), 227 229 'slug' => bp_get_messages_starred_slug(), 228 230 'parent_slug' => $slug, … … 325 327 // Unread message count. 326 328 $count = messages_get_unread_count( bp_loggedin_user_id() ); 327 if ( ! empty( $count ) ) {329 if ( ! empty( $count ) ) { 328 330 $title = sprintf( 329 331 /* translators: %s: Unread message count for the current user */ … … 338 340 } else { 339 341 $title = __( 'Messages', 'buddypress' ); 340 $inbox = __( 'Inbox', 'buddypress' );342 $inbox = __( 'Inbox', 'buddypress' ); 341 343 } 342 344 … … 413 415 $bp->bp_options_title = __( 'My Messages', 'buddypress' ); 414 416 } else { 415 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 416 'item_id' => bp_displayed_user_id(), 417 'type' => 'thumb', 418 /* translators: %s: member name */ 419 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ) 420 ) ); 421 $bp->bp_options_title = bp_get_displayed_user_fullname(); 417 $bp->bp_options_avatar = bp_core_fetch_avatar( 418 array( 419 'item_id' => bp_displayed_user_id(), 420 'type' => 'thumb', 421 /* translators: %s: member name */ 422 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ), 423 ) 424 ); 425 $bp->bp_options_title = bp_get_displayed_user_fullname(); 422 426 } 423 427 } … … 434 438 435 439 // Global groups. 436 wp_cache_add_global_groups( array( 437 'bp_messages', 438 'bp_messages_threads', 439 'bp_messages_unread_count', 440 'message_meta' 441 ) ); 440 wp_cache_add_global_groups( 441 array( 442 'bp_messages', 443 'bp_messages_threads', 444 'bp_messages_unread_count', 445 'message_meta', 446 ) 447 ); 442 448 443 449 parent::setup_cache_groups(); … … 455 461 parent::rest_api_init( 456 462 array( 457 'BP_ REST_Messages_Endpoint',458 'BP_ REST_Sitewide_Notices_Endpoint',463 'BP_Messages_REST_Controller', 464 'BP_Messages_Sitewide_Notices_REST_Controller', 459 465 ) 460 466 );
Note: See TracChangeset
for help on using the changeset viewer.