BP_Activity_Query::__construct( array $query = array() )

Constructor.


Description Description


Parameters 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. } }

      Default value: array()


Top ↑

Source 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 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.