bp_xprofile_component :: setup_globals(大批$ args.=大批()的)

设置全局。

描述

BP_XProfile_slug常量被弃用,仅在此用于向后兼容性。

参数

$ args.

大批的)(可选的)全球全局设置。

默认值:array()

来源

文件:bp-xprofile / classes / class-bp-xprofile-component.php

公共函数setup_globals($ args = array()){$ bp = buddypress();//如有必要,定义一个slug。if(!定义('bp_xprofile_slug')){define('bp_xprofile_slug','profile');} //将基组和FullName字段名称分配给常量//以在SQL语句中使用。//条件定义以适应单元测试。if(!定义('bp_xprofile_base_group_name')){define('bp_xprofile_base_group_name',stripslashes(bp_core_get_root_option('avatar_default')));}如果(!定义('bp_xprofile_fullname_field_name'))){define('bp_xprofile_fullname_field_name',stripslashes(bp_core_get_root_option('bp-xprofile-fullname-field-ames-name-name')));} / ** *过滤支持的字段类型ID。* * @since buddypress 1.1.0 * * * @param数组$ Value数组的支持的字段类型。* / $ this-> field_types = apply_filters('xprofile_field_types',array_keys(bp_xprofile_get_field_types())); // 'option' is a special case. It is not a top-level field, so // does not have an associated BP_XProfile_Field_Type class, // but it must be whitelisted. $this->field_types[] = 'option'; // Register the visibility levels. See bp_xprofile_get_visibility_levels() to filter. $this->visibility_levels = array( 'public' => array( 'id' => 'public', 'label' => __( 'Public', 'buddyboss' ) ), 'adminsonly' => array( 'id' => 'adminsonly', 'label' => __( 'Only Me', 'buddyboss' ) ), 'loggedin' => array( 'id' => 'loggedin', 'label' => __( 'All Members', 'buddyboss' ) ) ); if ( bp_is_active( 'friends' ) ) { $this->visibility_levels['friends'] = array( 'id' => 'friends', 'label' => __( 'My Connections', 'buddyboss' ) ); } // Tables. $global_tables = array( 'table_name_data' => $bp->table_prefix . 'bp_xprofile_data', 'table_name_groups' => $bp->table_prefix . 'bp_xprofile_groups', 'table_name_fields' => $bp->table_prefix . 'bp_xprofile_fields', 'table_name_meta' => $bp->table_prefix . 'bp_xprofile_meta', ); $meta_tables = array( 'xprofile_group' => $bp->table_prefix . 'bp_xprofile_meta', 'xprofile_field' => $bp->table_prefix . 'bp_xprofile_meta', 'xprofile_data' => $bp->table_prefix . 'bp_xprofile_meta', ); $globals = array( 'slug' => BP_XPROFILE_SLUG, 'has_directory' => false, 'notification_callback' => 'xprofile_format_notifications', 'global_tables' => $global_tables, 'meta_tables' => $meta_tables, ); parent::setup_globals( $globals ); }

变更乐

变更乐
版本 描述
BuddyPress 1.5.0. 介绍。

问题?

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