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'
Return Return
(array)
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 ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |