groups_allowed_status
Filters the allowed status values for the group.
Description
Parameters (1)
- 0. $array (callback) =>
array( 'public', 'private', 'hidden' )
- The array.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'groups_allowed_status', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the groups_allowed_status callback
- function filter_groups_allowed_status( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'groups_allowed_status', 'filter_groups_allowed_status', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'groups_allowed_status', 'filter_groups_allowed_status', 10, 1 );
Defined (2)
The filter is defined in the following location(s).
- /bp-groups/bp-groups-screens.php
- $allowed_status = apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) );
- /bp-groups/bp-groups-admin.php
- $allowed_status = apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) );