Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Awards_Query::prepare_meta_query()

Prepares the meta_query ultimately passed to the WP_Query.


Return Return

(array) An array of meta query arrays.


Top ↑

Source Source

File: includes/class-llms-awards-query.php

	private function prepare_meta_query() {

		// If a query for manual awards we skip all other relationships and return early.
		if ( $this->get( 'manual_only' ) ) {

			return array(
				'relation' => 'OR',
				// Meta doesn't exist.
				array(
					'key'     => '_llms_engagement',
					'compare' => 'NOT EXISTS',
				),
				// Or it's "empty".
				array(
					'key'     => '_llms_engagement',
					'value'   => array( '', '0', 0 ),
					'compare' => 'IN',
				),
			);

		}

		return $this->prepare_meta_query_for_relationships();

	}


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.