Свойство | Тип | Описание | |
---|---|---|---|
$args | |||
$legacy | |||
$root | |||
$site | Site object | ||
$uri |
Метод | Описание | |
---|---|---|
__construct ( string $uri, $args = [], boolean $legacy = false ) : |
Discover the WordPress API from a URI. | |
request ( string $uri, string $request_type = 'get' ) : mixed | Make a request using the WP http API | |
site ( ) : |
Get the Site object |
Метод | Описание | |
---|---|---|
discover_api_root ( ) : string | null | Discover the API root from an address. | |
get_index_information ( ) : |
Get the index information from a site. | |
parse_link_header ( string $link ) : array | Parse a Link header into attributes. |
protected discover_api_root ( ) : string | null | ||
Результат | string | null | API root URL if found, null if no API is available. |
protected get_index_information ( ) : |
||
Результат | Data from the index for the site. |
protected parse_link_header ( string $link ) : array | ||
$link | string | Link header from the response. |
Результат | array | Map of attribute key => attribute value, with link href in `href` key. |
public site ( ) : |
||
Результат |
protected Site,WDS_WP_REST_API\Discover $site | ||
Результат |