本文整理匯總了PHP中BP_Activity_Activity::hide_all_for_user方法的典型用法代碼示例。如果您正苦於以下問題:PHP BP_Activity_Activity::hide_all_for_user方法的具體用法?PHP BP_Activity_Activity::hide_all_for_user怎麽用?PHP BP_Activity_Activity::hide_all_for_user使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BP_Activity_Activity
的用法示例。
在下文中一共展示了BP_Activity_Activity::hide_all_for_user方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_hide_all_for_user
/**
* @group get
*/
public function test_hide_all_for_user()
{
$activity = $this->factory->activity->create(array('type' => 'activity_update'));
BP_Activity_Activity::hide_all_for_user(get_current_user_id());
$activity = BP_Activity_Activity::get(array('in' => $activity, 'show_hidden' => true));
$this->assertEquals($activity['activities'][0]->hide_sitewide, 1);
}
示例2: bp_activity_hide_user_activity
/**
* Hide a user's activity.
*
* @since BuddyPress (1.2.0)
*
* @uses BP_Activity_Activity::hide_all_for_user() {@link BP_Activity_Activity}
*
* @param int $user_id The ID of the user whose activity is being hidden.
* @return bool True on success, false on failure.
*/
function bp_activity_hide_user_activity($user_id)
{
return BP_Activity_Activity::hide_all_for_user($user_id);
}