BuddyPressCommand::get_activity_id_from_identifier( int $activity_id, bool $object = false )
Get an activity ID.
Parameters Parameters
- $activity_id
-
(int) (Required) Activity ID.
- $object
-
(bool) (Optional) Return activity object.
Default value: false
Return Return
(int|BuddypressCLICommandBP_Activity_Activity)
Source Source
File: cli/src/command.php
protected function get_activity_id_from_identifier( $activity_id, $object = false ) { $fetcher = new Activity_Fetcher(); $activity = $fetcher->get_check( $activity_id ); if ( true === $object ) { return $activity; } return $activity->id; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.0 | Introduced. |