WP_REST_Server::get_route_options PHP Method

get_route_options() public method

Retrieves specified options for a route.
Since: 4.4.0
public get_route_options ( string $route ) : array | null
$route string Route pattern to fetch options for.
return array | null Data as an associative array if found, or null if not found.
    public function get_route_options($route)
    {
        if (!isset($this->route_options[$route])) {
            return null;
        }
        return $this->route_options[$route];
    }