WP_REST_Server::add_site_logo_to_index()
Exposes the site logo through the WordPress REST API.
This is used for fetching this information when user has no rights to update settings.
Метод класса: WP_REST_Server{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_site_logo_to_index( $response );
- $response(WP_REST_Response) (обязательный)
- REST API response.
Список изменений
С версии 5.8.0 | Введена. |
Код WP_REST_Server::add_site_logo_to_index() WP REST Server::add site logo to index WP 6.2.2
protected function add_site_logo_to_index( WP_REST_Response $response ) { $site_logo_id = get_theme_mod( 'custom_logo', 0 ); $this->add_image_to_index( $response, $site_logo_id, 'site_logo' ); }