Activity::ham( $args )

Ham an activity.


Description Description

Top ↑

OPTIONS OPTIONS

: Identifier for the activity.
## EXAMPLES
$ wp bp activity ham 500 Success: Activity marked as ham.
$ wp bp activity unspam 4679 Success: Activity marked as ham.


Source Source

File: cli/src/activity.php

	public function ham( $args ) {
		$activity = $this->get_activity_id_from_identifier( $args[0], true );

		// Mark as ham.
		bp_activity_mark_as_ham( $activity );

		if ( $activity->save() ) {
			WP_CLI::success( 'Activity marked as ham.' );
		} else {
			WP_CLI::error( 'Could not mark the activity as ham.' );
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

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