Changeset 13450 for trunk/src/bp-settings/bp-settings-functions.php
- Timestamp:
- 04/12/2023 10:12:37 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-settings/bp-settings-functions.php
r13140 r13450 362 362 <?php 363 363 } 364 365 /** 366 * Whether a user can delete self account from front-end. 367 * 368 * @since 12.0.0 369 * 370 * @return boolean True if user can delete self account from front-end. False otherwise. 371 */ 372 function bp_settings_can_delete_self_account() { 373 return ! user_can( bp_displayed_user_id(), 'delete_users' ); 374 } 375 376 /** 377 * Whether to show the Delete account front-end nav. 378 * 379 * @since 12.0.0 380 * 381 * @return boolean True if user can be shown the Delete account nav. False otherwise. 382 */ 383 function bp_settings_show_delete_account_nav() { 384 return ( ! bp_disable_account_deletion() && bp_is_my_profile() ) || bp_current_user_can( 'delete_users' ); 385 } 386 387 /** 388 * Whether to show the Capability front-end nav. 389 * 390 * @since 12.0.0 391 * 392 * @return boolean True if user can be shown the Capability nav. False otherwise. 393 */ 394 function bp_settings_show_capability_nav() { 395 return ! bp_is_my_profile(); 396 }
Note: See TracChangeset
for help on using the changeset viewer.