LLMS_Awards_Query::prepare_query()
Prepare the WP_Query arguments for the awards query.
Return Return
(array) Array of arguments suitable to pass to a WP_Query.
Source Source
File: includes/class-llms-awards-query.php
protected function prepare_query() { // Remove any extra arguments not found in the map. $args = array_intersect_key( parent::prepare_query(), array_flip( $this->get_arg_map() ) ); // Add post type(s). $args['post_type'] = $this->post_types(); // Add meta query. $args['meta_query'] = $this->prepare_meta_query(); // Remove empty arrays. return array_filter( $args, function( $val ) { return ! is_array( $val ) || ! empty( $val ); } ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |