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_Blocks_Reusable::get_meta_query( boolean $include_fields )

Retrieve a meta query array depending on the post type of the referring rest request


Parameters Parameters

$include_fields

(boolean) (Required) Whether or not to include form fields.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks-reusable.php

	private function get_meta_query( $include_fields ) {

		// Default 	query when including fields.
		$meta_query = array(
			'key'   => '_is_llms_field',
			'value' => 'yes',
		);

		// Excluding fields.
		if ( ! $include_fields ) {

			$meta_query = array(
				'relation' => 'OR',
				wp_parse_args(
					array(
						'compare' => '!=',
					),
					$meta_query
				),
				array(
					'key'     => '_is_llms_field',
					'compare' => 'NOT EXISTS',
				),
			);
		}

		return $meta_query;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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