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.
Return Return
(array)
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-reusable.php
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | 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 ; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |