bp_get_group_creator_id
Filters the user ID of the creator of the current group in the loop.
Description
Parameters (2)
- 0. $group_creator_id (int)
- User ID of the group creator.
- 1. $group (object)
- Group object.
Usage
- To run the hook, copy the example below.
- $group_creator_id = apply_filters( 'bp_get_group_creator_id', $group_creator_id, $group );
- if ( !empty( $group_creator_id ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_group_creator_id callback
- function filter_bp_get_group_creator_id( $group_creator_id, $group ) {
- // make filter magic happen here...
- return $group_creator_id;
- };
- // add the filter
- add_filter( 'bp_get_group_creator_id', 'filter_bp_get_group_creator_id', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_group_creator_id', 'filter_bp_get_group_creator_id', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-groups/bp-groups-template.php
- return apply_filters( 'bp_get_group_creator_id', $group->creator_id, $group );