Group_Fetcher::get( int|string $arg )
Get a group ID from its identifier (ID or slug).
Parameters Parameters
- $arg
-
(int|string) (Required) Group ID or slug.
Return Return
(BuddypressCLICommandBP_Groups_Group|bool)
Source Source
File: cli/src/group-fetcher.php
public function get( $arg ) { // Group ID or slug. if ( ! is_numeric( $arg ) ) { $arg = groups_get_id( $arg ); } // Get group object. $group = groups_get_group( array( 'group_id' => $arg, ) ); if ( empty( $group->id ) ) { return false; } return $group; }
Expand full source code Collapse full source code View on Trac