BP_Admin_Setting_General: register_fields ()
描述
源
文件:bp-core /管理/设置/ bp-admin-setting-general.php
public function register_fields() {$this->add_section('bp_main', __('General Settings', 'buddyboss'));$this->add_field('bp-enable-site-registration', __('Registrations', 'buddyboss'), 'bp_admin_setting_callback_register', 'intval');$this->add_field('bp-disable-account-deletion', __('Account Deletion', 'buddyboss'), 'bp_admin_setting_callback_account_deletion', 'intval'); / /删除账户数组$ args = ();args(类的)美元=“child-no-padding-first”;$this->add_field('show-login-adminbar', __('Toolbar', 'buddyboss'), 'bp_admin_setting_callback_login_admin_bar', 'intval', $args);数组$ args = ();args(类的)美元=“child-no-padding”;$this->add_field('hide-loggedout-adminbar','', 'bp_admin_setting_callback_admin_bar', 'intval', $args);数组$ args = (); $this->add_field( 'bp-admin-setting-tutorial','', 'bp_admin_setting_tutorial' ); $this->add_section( 'bp_privacy', __( 'Privacy', 'buddyboss' ) ); $this->add_field( 'bp-enable-private-network', __( 'Private Network', 'buddyboss' ), 'bp_admin_setting_callback_private_network', 'intval' ); $enable_private_network = bp_get_option( 'bp-enable-private-network' ); if ( '0' === $enable_private_network ) { $this->add_field( 'bp-enable-private-network-public-content',__( 'Public Content', 'buddyboss' ),'bp_admin_setting_callback_private_network_public_content' ); } $this->add_field( 'bp-privacy-tutorial','', 'bp_privacy_tutorial' ); }