jetpack_get_site_logo
Retrieve the site logo URL or ID (URL by default).
Description
jetpack_get_site_logo( (string) $show = 'url' );
Pass in the string id for ID.
Parameters (1)
- 0. $show — Optional. (string) =>
'url'
- The show.
Usage
if ( !function_exists( 'jetpack_get_site_logo' ) ) { require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/theme-tools/site-logo/inc/functions.php'; } // The show. $show = 'url'; // NOTICE! Understand what this does before running. $result = jetpack_get_site_logo($show);
Defined (1)
The function is defined in the following location(s).
- /modules/theme-tools/site-logo/inc/functions.php
- function jetpack_get_site_logo( $show = 'url' ) {
- $logo =site_logo)->logo;
- // Return false if no logo is set
- if ( ! isset( $logo['id'] ) || 0 == $logo['id'] ) {
- return false;
- }
- // Return the ID if specified, otherwise return the URL by default
- if ( 'id' == $show ) {
- return $logo['id'];
- } else {
- return esc_url_raw( set_url_scheme( $logo['url'] ) );
- }
- }