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


Top ↑

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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.