Changeset 11867
- Timestamp:
- 02/28/2018 02:48:30 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-activity.php
r11692 r11867 457 457 $search_terms_like = '%' . bp_esc_like( $r['search_terms'] ) . '%'; 458 458 $where_conditions['search_sql'] = $wpdb->prepare( 'a.content LIKE %s', $search_terms_like ); 459 460 /** 461 * Filters whether or not to include users for search parameters. 462 * 463 * @since 3.0.0 464 * 465 * @param bool $value Whether or not to include user search. Default false. 466 */ 467 if ( apply_filters( 'bp_activity_get_include_user_search', false ) ) { 468 $user_search = get_user_by( 'slug', $r['search_terms'] ); 469 if ( false !== $user_search ) { 470 $user_id = $user_search->ID; 471 $where_conditions['search_sql'] .= $wpdb->prepare( ' OR a.user_id = %d', $user_id ); 472 } 473 } 459 474 } 460 475
Note: See TracChangeset
for help on using the changeset viewer.