BP_Activity_Query::__construct( array $query = array() )
Constructor.
Description
Parameters
- $query
-
(Optional) Array of query clauses.
- (array)
- 'column'
(string) Required. The column to query against. Basically, any DB column in the main 'wp_bp_activity' table. - 'value'
(string) Required. Value to filter by. - 'compare'
(string) Optional. The comparison operator. Default '='. Accepts '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN', 'LIKE', 'NOT LIKE', BETWEEN', 'NOT BETWEEN', 'REGEXP', 'NOT REGEXP', 'RLIKE'. - 'relation'
(string) Optional. The boolean relationship between the activity queries. Accepts 'OR', 'AND'. Default 'AND'. - (array) Optional. Another fully-formed activity query. See parameters above. } }
- 'column'
Default value: array()
- (array)
Source
File: bp-activity/classes/class-bp-activity-query.php
public function __construct( $query = array() ) { if ( ! is_array( $query ) ) { return; } $this->queries = $this->sanitize_query( $query ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.