本文整理汇总了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));
}