BP_Admin_Setting_Groups

主要社会群体设置类。

描述

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

class BP_Admin_Setting_Groups extends BP_Admin_Setting_tab{//初始化类public function Initialize () {$this->tab_label = __('Groups', 'buddyboss');$ this - > tab_name =“bp-groups”;$ this - > tab_order = 20;} //检查组是否被启用public function is_active() {return bp_is_active('groups');} //注册设置字段public function register_fields() {$this->add_section('bp_groups', __('Group Settings', 'buddyboss'));//允许订阅设置。$this->add_field('bp_restrict_group_creation', __('Group Creation', 'buddyboss'), 'bp_admin_setting_callback_group_creation', 'intval');//允许组角色。$this->add_field('bp- disabled - Group -avatar-uploads', __('Group Avatars', 'buddyboss'), 'bp_admin_setting_callback_group_avatar_uploads', 'intval');//允许团体封面照片。 if ( bp_is_active( 'groups', 'cover_image' ) ) { $this->add_field( 'bp-disable-group-cover-image-uploads', __( 'Group Cover Images', 'buddyboss' ), 'bp_admin_setting_callback_group_cover_image_uploads', 'intval' ); } // Group Settings Tutorial $this->add_field( 'bp-group-setting-tutorial','', 'bp_group_setting_tutorial' ); // Register Group Types sections. $this->add_section( 'bp_groups_types', __( 'Group Types', 'buddyboss' ) ); // enable or disable group types. $this->add_field( 'bp-disable-group-type-creation', __( 'Group Types', 'buddyboss' ), 'bp_admin_setting_callback_group_type_creation', 'intval' ); // enable or disable group automatically approve memberships. $this->add_field( 'bp-enable-group-auto-join', __( 'Auto Membership Approval', 'buddyboss' ), 'bp_admin_setting_callback_group_auto_join', 'intval' ); // Group Types Tutorial $this->add_field( 'bp-group-types-tutorial','', 'bp_group_types_tutorial' ); // Register Group Hierarchies sections. $this->add_section( 'bp_groups_hierarchies', __( 'Group Hierarchies', 'buddyboss' ) ); // enable or disable group hierarchies. $type = array(); $type['class'] = 'bp-enable-group-hierarchies'; $this->add_field( 'bp-enable-group-hierarchies', __( 'Hierarchies', 'buddyboss' ), 'bp_admin_setting_callback_group_hierarchies', 'intval', $type ); // enable or disable restrict invites to members who already in specific parent group. $type = array(); $type['class'] = 'bp-enable-group-restrict-invites'; $this->add_field( 'bp-enable-group-restrict-invites', __( 'Restrict Invitations', 'buddyboss' ), 'bp_admin_setting_callback_group_restrict_invites', 'intval', $type ); // Group Hierarchies Tutorial $this->add_field( 'bp-group-hierarchies-tutorial','', 'bp_group_hierarchies_tutorial' ); } }

更新日志

更新日志
版本 描述
BuddyBoss 1.0.0 介绍了。

方法

问题吗?

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