本文整理匯總了PHP中BP_Activity_Activity::check_exists_by_content方法的典型用法代碼示例。如果您正苦於以下問題:PHP BP_Activity_Activity::check_exists_by_content方法的具體用法?PHP BP_Activity_Activity::check_exists_by_content怎麽用?PHP BP_Activity_Activity::check_exists_by_content使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BP_Activity_Activity
的用法示例。
在下文中一共展示了BP_Activity_Activity::check_exists_by_content方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_check_exists_by_content
/**
* @group check_exists_by_content
*/
public function test_check_exists_by_content()
{
$content = 'A classy girl who know how to enjoy the freedom of a cup of coffee';
$activity = $this->factory->activity->create(array('content' => $content, 'type' => 'activity_update'));
$result = BP_Activity_Activity::check_exists_by_content($content);
$this->assertEquals($activity, $result);
}
示例2: bp_activity_check_exists_by_content
/**
* Check whether an activity item exists with a given content string.
*
* @since BuddyPress (1.1.0)
*
* @uses BP_Activity_Activity::check_exists_by_content() {@link BP_Activity_Activity}
* @uses apply_filters() To call the 'bp_activity_check_exists_by_content' hook.
*
* @param string $content The content to filter by.
* @return int|null The ID of the located activity item. Null if none is found.
*/
function bp_activity_check_exists_by_content($content)
{
return apply_filters('bp_activity_check_exists_by_content', BP_Activity_Activity::check_exists_by_content($content));
}
示例3: bp_activity_check_exists_by_content
/**
* Check whether an activity item exists with a given content string.
*
* @since 1.1.0
*
* @uses BP_Activity_Activity::check_exists_by_content() {@link BP_Activity_Activity}
* @uses apply_filters() To call the 'bp_activity_check_exists_by_content' hook.
*
* @param string $content The content to filter by.
* @return int|null The ID of the located activity item. Null if none is found.
*/
function bp_activity_check_exists_by_content($content)
{
/**
* Filters the results of the check for whether an activity item exists by specified content.
*
* @since 1.1.0
*
* @param BP_Activity_Activity $content_exists ID of the activity if found, else null.
*/
return apply_filters('bp_activity_check_exists_by_content', BP_Activity_Activity::check_exists_by_content($content));
}