WP_REST_Server::add_site_logo_to_index( WP_REST_Response $response )

In this article

Exposes the site logo through the WordPress REST API.

Description

This is used for fetching this information when user has no rights to update settings.

Parameters

$responseWP_REST_Responserequired
REST API response.

Source

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' );
}

Changelog

VersionDescription
5.8.0Introduced.

User Contributed Notes

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