bp_get_activity_is_favorite()

Return whether the current activity is in a current user’s favorites.


Description Description


Return Return

(bool) True if user favorite, false otherwise.


Top ↑

Source Source

File: bp-activity/bp-activity-template.php

	function bp_get_activity_is_favorite() {
		global $activities_template;

		/**
		 * Filters whether the current activity item is in the current user's favorites.
		 *
		 * @since 1.2.0
		 *
		 * @param bool $value Whether or not the current activity item is in the current user's favorites.
		 */
		return (bool) apply_filters( 'bp_get_activity_is_favorite', in_array( $activities_template->activity->id, (array) $activities_template->my_favs ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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