Changeset 13630
- Timestamp:
- 11/02/2023 06:00:33 PM (16 months ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-settings.php
r13587 r13630 29 29 <input id="hide-loggedout-adminbar" name="hide-loggedout-adminbar" type="checkbox" value="1" <?php checked( !bp_hide_loggedout_adminbar( false ) ); ?> /> 30 30 <label for="hide-loggedout-adminbar"><?php _e( 'Show the Toolbar for logged out users', 'buddypress' ); ?></label> 31 32 <?php33 }34 35 /**36 * Allow members to delete their accounts setting field.37 *38 * @since 1.6.039 *40 */41 function bp_admin_setting_callback_account_deletion() {42 ?>43 44 <input id="bp-disable-account-deletion" name="bp-disable-account-deletion" type="checkbox" value="1" <?php checked( !bp_disable_account_deletion( false ) ); ?> />45 <label for="bp-disable-account-deletion"><?php _e( 'Allow registered members to delete their own accounts', 'buddypress' ); ?></label>46 31 47 32 <?php … … 361 346 } 362 347 348 /** Account settings Section ************************************************************/ 349 350 /** 351 * Account settings section description for the settings page. 352 * 353 * @since 12.0.0 354 */ 355 function bp_admin_setting_callback_settings_section() { } 356 357 /** 358 * Allow members to delete their accounts setting field. 359 * 360 * @since 1.6.0 361 */ 362 function bp_admin_setting_callback_account_deletion() { 363 ?> 364 365 <input id="bp-disable-account-deletion" name="bp-disable-account-deletion" type="checkbox" value="1" <?php checked( ! bp_disable_account_deletion( false ) ); ?> /> 366 <label for="bp-disable-account-deletion"><?php esc_html_e( 'Allow registered members to delete their own accounts', 'buddypress' ); ?></label> 367 368 <?php 369 } 370 363 371 /** Settings Page *************************************************************/ 364 372 -
trunk/src/bp-core/classes/class-bp-admin.php
r13628 r13630 477 477 public function register_admin_settings() { 478 478 479 /* MainSection ******************************************************/480 481 // Add the mainsection.482 add_settings_section( 'bp_main', __( ' Main Settings', 'buddypress' ), 'bp_admin_setting_callback_main_section', 'buddypress' );479 /* Core Section ******************************************************/ 480 481 // Add the Core section. 482 add_settings_section( 'bp_main', __( 'BuddyPress Core', 'buddypress' ), 'bp_admin_setting_callback_main_section', 'buddypress' ); 483 483 484 484 // Hide toolbar for logged out users setting. 485 485 add_settings_field( 'hide-loggedout-adminbar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_admin_bar', 'buddypress', 'bp_main' ); 486 486 register_setting( 'buddypress', 'hide-loggedout-adminbar', 'intval' ); 487 488 // Allow account deletion.489 add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_main' );490 register_setting( 'buddypress', 'bp-disable-account-deletion', 'intval' );491 487 492 488 // Community Visibility … … 500 496 register_setting( 'buddypress', '_bp_theme_package_id', 'sanitize_text_field' ); 501 497 498 /* Account settings Section *****************************************/ 499 500 if ( bp_is_active( 'settings' ) ) { 501 // Add the Settings section. 502 add_settings_section( 'bp_account_settings', _x( 'Account Settings', 'BuddyPress setting tab', 'buddypress' ), 'bp_admin_setting_callback_settings_section', 'buddypress' ); 503 504 // Allow account deletion. 505 add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_account_settings' ); 506 register_setting( 'buddypress', 'bp-disable-account-deletion', 'intval' ); 507 } 508 502 509 /* Members Section **************************************************/ 503 510 504 511 // Add the main section. 505 add_settings_section( 'bp_members', _x( ' Members Settings', 'BuddyPress setting tab', 'buddypress' ), 'bp_admin_setting_callback_members_section', 'buddypress' );512 add_settings_section( 'bp_members', _x( 'Community Members', 'BuddyPress setting tab', 'buddypress' ), 'bp_admin_setting_callback_members_section', 'buddypress' ); 506 513 507 514 // Avatars. … … 532 539 533 540 // Add the main section. 534 add_settings_section( 'bp_xprofile', _x( ' Profile Settings', 'BuddyPress setting tab', 'buddypress' ), 'bp_admin_setting_callback_xprofile_section', 'buddypress' );541 add_settings_section( 'bp_xprofile', _x( 'Extended Profiles', 'BuddyPress setting tab', 'buddypress' ), 'bp_admin_setting_callback_xprofile_section', 'buddypress' ); 535 542 536 543 // Profile sync setting. … … 544 551 545 552 // Add the main section. 546 add_settings_section( 'bp_groups', __( ' Groups Settings', 'buddypress' ), 'bp_admin_setting_callback_groups_section', 'buddypress' );553 add_settings_section( 'bp_groups', __( 'User Groups', 'buddypress' ), 'bp_admin_setting_callback_groups_section', 'buddypress' ); 547 554 548 555 // Allow subscriptions setting. … … 566 573 567 574 // Add the main section. 568 add_settings_section( 'bp_activity', __( 'Activity S ettings', 'buddypress' ), 'bp_admin_setting_callback_activity_section', 'buddypress' );575 add_settings_section( 'bp_activity', __( 'Activity Streams', 'buddypress' ), 'bp_admin_setting_callback_activity_section', 'buddypress' ); 569 576 570 577 // Activity commenting on post and comments.
Note: See TracChangeset
for help on using the changeset viewer.