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.


Top ↑

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

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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