public function get_context_param( $args = array() ) {
		$param_details = array(
			'description'        => __( 'Scope under which the request is made; determines fields present in response.' ),
			'type'               => 'string',
			'sanitize_callback'  => 'sanitize_key',
			'validate_callback'  => 'rest_validate_request_arg',
		);
		$schema = $this->get_item_schema();
		if ( empty( $schema['properties'] ) ) {
			return array_merge( $param_details, $args );
		}
		$contexts = array();
		foreach ( $schema['properties'] as $attributes ) {
			if ( ! empty( $attributes['context'] ) ) {
				$contexts = array_merge( $contexts, $attributes['context'] );
			}
		}
		if ( ! empty( $contexts ) ) {
			$param_details['enum'] = array_unique( $contexts );
			rsort( $param_details['enum'] );
		}
		return array_merge( $param_details, $args );
	}
public function get_context_param( $args = array() ) {
		$param_details = array(
			'description'        => __( 'Scope under which the request is made; determines fields present in response.' ),
			'type'               => 'string',
			'sanitize_callback'  => 'sanitize_key',
			'validate_callback'  => 'rest_validate_request_arg',
		);
		$schema = $this->get_item_schema();
		if ( empty( $schema['properties'] ) ) {
			return array_merge( $param_details, $args );
		}
		$contexts = array();
		foreach ( $schema['properties'] as $attributes ) {
			if ( ! empty( $attributes['context'] ) ) {
				$contexts = array_merge( $contexts, $attributes['context'] );
			}
		}
		if ( ! empty( $contexts ) ) {
			$param_details['enum'] = array_unique( $contexts );
			rsort( $param_details['enum'] );
		}
		return array_merge( $param_details, $args );
	}
public function get_context_param ( $ args = array ( ) ) { $ param_details = array ( 'description' => __ ( 'Scope under which the request is made; determines fields present in response.' ) , 'type' => 'string' , 'sanitize_callback' => 'sanitize_key' , 'validate_callback' => 'rest_validate_request_arg' , ) ; $ schema = $ this -> get_item_schema ( ) ; if ( empty ( $ schema [ 'properties' ] ) ) { return array_merge ( $ param_details , $ args ) ; } $ contexts = array ( ) ; foreach ( $ schema [ 'properties' ] as $ attributes ) { if ( ! empty ( $ attributes [ 'context' ] ) ) { $ contexts = array_merge ( $ contexts , $ attributes [ 'context' ] ) ; } } if ( ! empty ( $ contexts ) ) { $ param_details [ 'enum' ] = array_unique ( $ contexts ) ; rsort ( $ param_details [ 'enum' ] ) ; } return array_merge ( $ param_details , $ args ) ; }
Get the magical context param.

Ensures consistent description between endpoints, and populates enum from schema.

@param array     $args
@return array
Get the magical context param .