bp_activity_check_exists_by_content

Check whether an activity item exists with a given content string.

Description

(int|null) bp_activity_check_exists_by_content( (string) $content ); 

Returns (int|null)

The ID of the located activity item. Null if none is found.

Parameters (1)

0. $content (string)
The content to filter by.

Usage

  1. if ( !function_exists( 'bp_activity_check_exists_by_content' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; 
  3.  
  4. // The content to filter by. 
  5. $content = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_check_exists_by_content($content); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_check_exists_by_content( $content ) { 
  2.  
  3. /** 
  4. * Filters the results of the check for whether an activity item exists by specified content. 
  5. * @since 1.1.0 
  6. * @param BP_Activity_Activity $value ID of the activity if found, else null. 
  7. */ 
  8. return apply_filters( 'bp_activity_check_exists_by_content', BP_Activity_Activity::check_exists_by_content( $content ) );