BP_Admin_Setting_Xprofile: register_fields ()

描述

文件:bp-core /管理/设置/ bp-admin-setting-xprofile.php

public function register_fields() {$this->add_section('bp_xprofile', __('Profile Settings', 'buddyboss'));//显示名称格式。$this->add_field('bp-display-name-format', __('Display Name Format', 'buddyboss'), [$this, 'callback_display_name_format']); / /添加字段/ /阿凡达。$this->add_field('bp- disabled -avatar-uploads', __('Profile Avatars', 'buddyboss'), 'bp_admin_setting_callback_avatar_uploads', 'intval');/ /封面照片。if (bp_is_active('xprofile', 'cover_image')) {$this->add_field('bp-disable-cover-image-uploads', __('Profile Cover Images', 'buddyboss'), 'bp_admin_setting_callback_cover_image_uploads', 'intval');} // Profile设置教程$this->add_field('bp-profile-setting-tutorial', ",' bp_profile_setting_tutorial');// @todo将在后面的// Section中为配置文件仪表板使用它。//$this->add_section('bp_profile_dashboard_settings', __('Profile Dashboard', 'buddyboss')); // @todo will use this later on // Enable/Disable profile dashboard. //$this->add_field( 'bp-enable-member-dashboard', __( 'Profile Dashboard', 'buddyboss' ), [$this, 'bp_admin_setting_callback_member_dashboard'], 'intval' ); // @todo will use this later on //$this->add_field( 'bp-enable-member-dashboard-redirect', __( 'Redirect on Login', 'buddyboss' ), [$this, 'bp_admin_setting_callback_member_dashboard_redirect'], 'intval' ); // Section for profile types. $this->add_section( 'bp_member_type_settings', __( 'Profile Types', 'buddyboss' ) ); // Enable/Disable profile types. $this->add_field( 'bp-member-type-enable-disable', __( 'Profile Types', 'buddyboss' ), [$this, 'bp_admin_setting_callback_member_type_enable_disable'], 'intval' ); // Profile Type enabled then display profile types. if ( true === bp_member_type_enable_disable() ) { // Enable/Disable Display on profiles. $this->add_field( 'bp-member-type-display-on-profile',__( 'Display Profile Types', 'buddyboss' ),[ $this, 'bp_admin_setting_callback_member_type_display_on_profile' ],'intval' ); } // Default profile type on registration. if ( true === bp_member_type_enable_disable() ) { $this->add_field( 'bp-member-type-default-on-registration',__( 'Default Profile Type', 'buddyboss' ),[ $this, 'bp_admin_setting_callback_member_type_default_on_registration' ] ); } // Profile Types Tutorial $this->add_field( 'bp-profile-types-tutorial','', [$this, 'bp_profile_types_tutorial'] ); // Section for profile search. $this->add_section( 'bp_profile_search_settings', __( 'Profile Search', 'buddyboss' ) ); // Enable/Disable profile search. $this->add_field( 'bp-enable-profile-search', __( 'Profile Search', 'buddyboss' ), [$this, 'bp_admin_setting_callback_profile_search'], 'intval' ); // Profile Search Tutorial $this->add_field( 'bp-profile-search-tutorial','', [$this, 'bp_profile_search_tutorial'] ); }

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队