Changeset 14010 for trunk/src/bp-blogs/classes/class-bp-blogs-component.php
- Timestamp:
- 08/26/2024 11:10:35 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/classes/class-bp-blogs-component.php
r13522 r14010 35 35 array( 36 36 'adminbar_myaccount_order' => 30, 37 'search_query_arg' => 'sites_search',38 'features' => array( 'site-icon' )37 'search_query_arg' => 'sites_search', 38 'features' => array( 'site-icon' ), 39 39 ) 40 40 ); … … 74 74 // Fetch the default directory title. 75 75 $default_directory_titles = bp_core_get_directory_page_default_titles(); 76 $default_directory_title = $default_directory_titles[ $this->id];76 $default_directory_title = $default_directory_titles[ $this->id ]; 77 77 78 78 // All globals for blogs component. … … 85 85 'create_single_item' => 'blog_create', 86 86 'directory_action' => 'blogs_action', 87 'directory_action_variables' => 'blogs_action_variables' 87 'directory_action_variables' => 'blogs_action_variables', 88 88 ), 89 89 'directory_title' => isset( $bp->pages->blogs->title ) ? $bp->pages->blogs->title : $default_directory_title, … … 218 218 */ 219 219 if ( ! is_multisite() ) { 220 return false;220 return; 221 221 } 222 222 … … 229 229 'screen_function' => 'bp_blogs_screen_my_blogs', 230 230 'default_subnav_slug' => 'my-sites', 231 'item_css_id' => $this->id 231 'item_css_id' => $this->id, 232 232 ); 233 233 … … 237 237 'parent_slug' => $slug, 238 238 'screen_function' => 'bp_blogs_screen_my_blogs', 239 'position' => 10 239 'position' => 10, 240 240 ); 241 241 … … 334 334 'title' => __( 'Create a Site', 'buddypress' ), 335 335 'href' => $url, 336 'position' => 99 336 'position' => 99, 337 337 ); 338 338 } … … 356 356 } 357 357 358 // If we are not viewing the logged in user, set up the current359 // users avatar and name.358 // If we are not viewing the logged in user, set up the current 359 // users avatar and name. 360 360 } else { 361 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 362 'item_id' => bp_displayed_user_id(), 363 'type' => 'thumb', 364 'alt' => sprintf( 361 $bp->bp_options_avatar = bp_core_fetch_avatar( 362 array( 363 'item_id' => bp_displayed_user_id(), 364 'type' => 'thumb', 365 'alt' => sprintf( 365 366 /* translators: %s: member name */ 366 __( 'Profile picture of %s', 'buddypress' ), 367 bp_get_displayed_user_fullname() 368 ), 369 ) ); 370 $bp->bp_options_title = bp_get_displayed_user_fullname(); 367 __( 'Profile picture of %s', 'buddypress' ), 368 bp_get_displayed_user_fullname() 369 ), 370 ) 371 ); 372 $bp->bp_options_title = bp_get_displayed_user_fullname(); 371 373 } 372 374 } … … 383 385 384 386 // Global groups. 385 wp_cache_add_global_groups( array( 386 'bp_blog_meta' 387 ) ); 387 wp_cache_add_global_groups( 388 array( 389 'bp_blog_meta', 390 ) 391 ); 388 392 389 393 parent::setup_cache_groups(); … … 430 434 'query' => 'index.php?' . $this->rewrite_ids['directory'] . '=1&' . $this->rewrite_ids['directory_action'] . '=$matches[1]', 431 435 ), 432 'create_single_item' => array(436 'create_single_item' => array( 433 437 'regex' => $this->root_slug . '/' . $create_slug . '/?$', 434 438 'order' => 50, … … 455 459 */ 456 460 if ( ! is_multisite() || 'rewrites' !== bp_core_get_query_parser() ) { 457 return parent::parse_query( $query ); 461 parent::parse_query( $query ); 462 return; 458 463 } 459 464 … … 507 512 public function rest_api_init( $controllers = array() ) { 508 513 if ( is_multisite() ) { 509 $controllers = array( 510 'BP_REST_Blogs_Endpoint', 511 ); 514 $controllers = array( 'BP_REST_Blogs_Endpoint' ); 512 515 513 516 // Support to Blog Avatar.
Note: See TracChangeset
for help on using the changeset viewer.