WP_REST_Server::get_route_options( string $route ): array|null

Retrieves specified options for a route.


Parameters

$route string Required
Route pattern to fetch options for.

Top ↑

Return

array|null Data as an associative array if found, or null if not found.


Top ↑

Source

File: wp-includes/rest-api/class-wp-rest-server.php. View all references

public function get_route_options( $route ) {
	if ( ! isset( $this->route_options[ $route ] ) ) {
		return null;
	}

	return $this->route_options[ $route ];
}


Top ↑

Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

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