BP_Admin_Setting_Invites
主类。
描述
源
文件:bp-core /管理/设置/ bp-admin-setting-invites.php
class bp_admin_setting_invitation extends BP_Admin_Setting_tab {public function initialize() {$this->tab_label = __('邀请','buddyboss');$ this - > tab_name =“bp-invites”;$ this - > tab_order = 70;} //检查是否启用了邀请public function is_active() {return bp_is_active('邀请');} //注册设置字段public function register_fields() {$this->add_section(' bp_notifications ', __('Email notifications Settings', 'buddyboss'));//允许成员更改邮件主题。$this->add_field('bp-disable-invite-member-email-subject', __('Email Subject', 'buddyboss'), 'bp_admin_setting_callback_member_invite_email_subject', 'intval');//允许成员更改邮件内容。$this->add_field('bp-disable-invite-member-email-content', __('Email Content', 'buddyboss'), 'bp_admin_setting_callback_member_invite_email_content', 'intval');if (true === bp_member_type_enable_disable()){//允许成员邀请配置文件类型。 $this->add_field( 'bp-disable-invite-member-type',__( 'Set Profile Type', 'buddyboss' ),'bp_admin_setting_callback_member_invite_member_type','intval' ); // Allowed Profile Types to Send Invites. $member_types = bp_get_active_member_types(); if ( isset( $member_types ) && ! empty( $member_types ) ) { $is_first = true; foreach ( $member_types as $member_type_id ) { $type = array(); $type_name = bp_get_member_type_key( $member_type_id ); $member_type_name = get_post_meta( $member_type_id, '_bp_member_type_label_name', true ); $class = ( true === $is_first ) ? 'child-no-padding-first' : 'child-no-padding'; $type['member_type_name'] = $member_type_name; $type['name'] = $type_name; $type['class'] = $class; $type['description'] = ( true === $is_first ) ? true : false; $this->add_field( 'bp-enable-send-invite-member-type-'.$type_name, ( true === $is_first ) ? __( 'Allowed Profile Type', 'buddyboss' ) : '','bp_admin_setting_callback_enable_send_invite_member_type','intval', $type ); $is_first = false; } } } // Email Invites tutorial $this->add_field( 'bp-email-invites-tutorial','', 'bp_email_invites_tutorial' ); } }
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.0.0 | 介绍了。 |