WP_REST_Abilities_V1_Run_Controller::get_run_schema(): array<string,

In this article

Retrieves the schema for ability execution endpoint.

Return

array<string, mixed> Schema for the run endpoint.

Source

public function get_run_schema(): array {
	return array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'ability-execution',
		'type'       => 'object',
		'properties' => array(
			'result' => array(
				'description' => __( 'The result of the ability execution.' ),
				'type'        => array( 'integer', 'number', 'boolean', 'string', 'array', 'object', 'null' ),
				'context'     => array( 'view', 'edit' ),
				'readonly'    => true,
			),
		),
	);
}

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

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