- Timestamp:
- 09/27/2024 09:11:27 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r13503 r14026 174 174 // Register the visibility levels. See bp_xprofile_get_visibility_levels() to filter. 175 175 $this->visibility_levels = array( 176 'public' => array(177 'id' => 'public',176 'public' => array( 177 'id' => 'public', 178 178 'label' => _x( 'Everyone', 'Visibility level setting', 'buddypress' ), 179 179 ), 180 180 'adminsonly' => array( 181 'id' => 'adminsonly',181 'id' => 'adminsonly', 182 182 'label' => _x( 'Only Me', 'Visibility level setting', 'buddypress' ), 183 183 ), 184 'loggedin' => array(185 'id' => 'loggedin',184 'loggedin' => array( 185 'id' => 'loggedin', 186 186 'label' => _x( 'All Members', 'Visibility level setting', 'buddypress' ), 187 187 ), … … 190 190 if ( bp_is_active( 'friends' ) ) { 191 191 $this->visibility_levels['friends'] = array( 192 'id' => 'friends',193 'label' => _x( 'My Friends', 'Visibility level setting', 'buddypress' ),192 'id' => 'friends', 193 'label' => _x( 'My Friends', 'Visibility level setting', 'buddypress' ), 194 194 ); 195 195 } … … 252 252 // Edit Profile. 253 253 $sub_nav[] = array( 254 'name' => _x( 'Edit', 'Profile header sub menu', 'buddypress' ),254 'name' => _x( 'Edit', 'Profile header sub menu', 'buddypress' ), 255 255 'slug' => 'edit', 256 256 'parent_slug' => $slug, … … 342 342 $bp->bp_options_title = _x( 'My Profile', 'Page title', 'buddypress' ); 343 343 } else { 344 $bp->bp_options_avatar = bp_core_fetch_avatar( array( 345 'item_id' => bp_displayed_user_id(), 346 'type' => 'thumb', 347 348 /* translators: %s: member name */ 349 'alt' => sprintf( _x( 'Profile picture of %s', 'Avatar alt', 'buddypress' ), bp_get_displayed_user_fullname() ), 350 ) ); 351 $bp->bp_options_title = bp_get_displayed_user_fullname(); 344 $bp->bp_options_avatar = bp_core_fetch_avatar( 345 array( 346 'item_id' => bp_displayed_user_id(), 347 'type' => 'thumb', 348 349 /* translators: %s: member name */ 350 'alt' => sprintf( _x( 'Profile picture of %s', 'Avatar alt', 'buddypress' ), bp_get_displayed_user_fullname() ), 351 ) 352 ); 353 $bp->bp_options_title = bp_get_displayed_user_fullname(); 352 354 } 353 355 } … … 364 366 365 367 // Global groups. 366 wp_cache_add_global_groups( array( 367 'bp_xprofile', 368 'bp_xprofile_data', 369 'bp_xprofile_fields', 370 'bp_xprofile_groups', 371 'xprofile_meta', 372 'bp_user_mid', 373 ) ); 368 wp_cache_add_global_groups( 369 array( 370 'bp_xprofile', 371 'bp_xprofile_data', 372 'bp_xprofile_fields', 373 'bp_xprofile_groups', 374 'xprofile_meta', 375 'bp_user_mid', 376 ) 377 ); 374 378 375 379 parent::setup_cache_groups(); … … 405 409 */ 406 410 public function rest_api_init( $controllers = array() ) { 407 parent::rest_api_init( array( 408 'BP_REST_XProfile_Fields_Endpoint', 409 'BP_REST_XProfile_Field_Groups_Endpoint', 410 'BP_REST_XProfile_Data_Endpoint', 411 ) ); 411 parent::rest_api_init( 412 array( 413 'BP_XProfile_Fields_REST_Controller', 414 'BP_XProfile_Field_Groups_REST_Controller', 415 'BP_XProfile_Data_REST_Controller', 416 ) 417 ); 412 418 } 413 419
Note: See TracChangeset
for help on using the changeset viewer.