Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2023 06:00:33 PM (2 years ago)
Author:
imath
Message:

BP Options: improve sections naming & listed options/active components

  • The option to let members delete their own account is only available when the BP Settings component is active. If it's not, do not display this option into the Administration screen.
  • Create a new section for the BP Settings component & move the above option into it.
  • Make sure BP Options sections naming is consistent with the names used inside the BP Components Administration tab.

Fixes #9011
Closes https://github.com/buddypress/buddypress/pull/180

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-settings.php

    r13587 r13630  
    2929    <input id="hide-loggedout-adminbar" name="hide-loggedout-adminbar" type="checkbox" value="1" <?php checked( !bp_hide_loggedout_adminbar( false ) ); ?> />
    3030    <label for="hide-loggedout-adminbar"><?php _e( 'Show the Toolbar for logged out users', 'buddypress' ); ?></label>
    31 
    32 <?php
    33 }
    34 
    35 /**
    36  * Allow members to delete their accounts setting field.
    37  *
    38  * @since 1.6.0
    39  *
    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>
    4631
    4732<?php
     
    361346}
    362347
     348/** Account settings Section ************************************************************/
     349
     350/**
     351 * Account settings section description for the settings page.
     352 *
     353 * @since 12.0.0
     354 */
     355function bp_admin_setting_callback_settings_section() { }
     356
     357/**
     358 * Allow members to delete their accounts setting field.
     359 *
     360 * @since 1.6.0
     361 */
     362function 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
    363371/** Settings Page *************************************************************/
    364372
Note: See TracChangeset for help on using the changeset viewer.