bp_get_member_type_metadata_schema( array $schema = array(), string $taxonomy = '' )
Extend generic Type metadata schema to match Member Type needs.
Parameters Parameters
- $schema
-
(array) (Optional) The generic Type metadata schema.
Default value: array()
- $taxonomy
-
(string) (Optional) The taxonomy name the schema applies to.
Default value: ''
Return Return
(array) The Member Type metadata schema.
Source Source
File: bp-members/bp-members-functions.php
function bp_get_member_type_metadata_schema( $schema = array(), $taxonomy = '' ) { if ( bp_get_member_type_tax_name() === $taxonomy ) { // Directory. if ( isset( $schema['bp_type_has_directory']['description'] ) ) { $schema['bp_type_has_directory']['description'] = __( 'Make a list of members matching this type available on the members directory.', 'buddypress' ); } // Slug. if ( isset( $schema['bp_type_directory_slug']['description'] ) ) { $schema['bp_type_directory_slug']['description'] = __( 'Enter if you want the type slug to be different from its ID.', 'buddypress' ); } // List. $schema['bp_type_show_in_list'] = array( 'description' => __( 'Show where member types may be listed, like in the member header.', 'buddypress' ), 'type' => 'boolean', 'single' => true, 'sanitize_callback' => 'absint', ); } return $schema; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |