diff --git src/bp-activity/classes/class-bp-activity-activity.php src/bp-activity/classes/class-bp-activity-activity.php
index ad1266f7c..b91c85c69 100644
|
|
class BP_Activity_Activity { |
453 | 453 | if ( $r['search_terms'] ) { |
454 | 454 | $search_terms_like = '%' . bp_esc_like( $r['search_terms'] ) . '%'; |
455 | 455 | $where_conditions['search_sql'] = $wpdb->prepare( 'a.content LIKE %s', $search_terms_like ); |
| 456 | |
| 457 | /** |
| 458 | * Filters whether or not to include users for search parameters. |
| 459 | * |
| 460 | * @since UNKNOWN |
| 461 | * |
| 462 | * @param bool $value Whether or not to include user search. Default false. |
| 463 | */ |
| 464 | if ( apply_filters( 'bp_activity_get_include_user_search', false ) ) { |
| 465 | $user_search = get_user_by( 'slug', $r['search_terms'] ); |
| 466 | if ( false !== $user_search ) { |
| 467 | $user_id = $user_search->ID; |
| 468 | $where_conditions['search_sql'] .= $wpdb->prepare( ' OR a.user_id = %d', $user_id ); |
| 469 | } |
| 470 | } |
456 | 471 | } |
457 | 472 | |
458 | 473 | // Sorting. |