BBP_User_Engagements_Meta::get_query( array $args = array(),  $context_key = '', string $meta_key = '', string $meta_type = 'post' )

Get the part of the query responsible for JOINing objects to relationships.


Description Description


Parameters Parameters

$args

(Optional)

Default value: array()

$meta_key

(Optional)

Default value: ''

$meta_type

(Optional)

Default value: 'post'


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/common/engagements.php

	public function get_query( $args = array(), $context_key = '', $meta_key = '', $meta_type = 'post' ) {

		// Backwards compat for pre-2.6.0
		if ( is_numeric( $args ) ) {
			$args = array(
				'meta_query' => array( array(
					'key'     => $meta_key,
					'value'   => bbp_get_user_id( $args, false, false ),
					'compare' => 'NUMERIC'
				) )
			);
		}

		// Default arguments
		$defaults = array(
			'meta_query' => array( array(
				'key'     => $meta_key,
				'value'   => bbp_get_displayed_user_id(),
				'compare' => 'NUMERIC'
			) )
		);

		// Parse arguments
		return bbp_parse_args( $args, $defaults, $context_key );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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