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.
Command::get_context_fields( string $context )
Get a list of fields present in a given context
Contents
Parameters Parameters
- $context
-
(string) (Required)
Return Return
(array)
Source Source
File: libraries/lifterlms-cli/src/Commands/Restful/Command.php
private function get_context_fields( $context ) { $fields = array(); foreach ( $this->schema['properties'] as $key => $args ) { if ( empty( $args['context'] ) || in_array( $context, $args['context'] ) ) { $fields[] = $key; } } return $fields; }
Expand full source code Collapse full source code View on GitHub