| 1 |
<?php |
| 2 |
/** |
| 3 |
* Functions for maintaining backwards compatibility with unprefixed template tags from the original Site Logo plugin. |
| 4 |
* These should never be used in themes; instead, use the template tags in functions.php. |
| 5 |
* See: https://github.com/Automattic/jetpack/pull/956 |
| 6 |
* |
| 7 |
* @package automattic/jetpack |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! function_exists( 'the_site_logo' ) ) : |
| 11 |
/** |
| 12 |
* Unprefixed, backwards-compatible function for outputting the site logo. |
| 13 |
* |
| 14 |
* @uses jetpack_the_site_logo() |
| 15 |
*/ |
| 16 |
function the_site_logo() { |
| 17 |
jetpack_the_site_logo(); |
| 18 |
} |
| 19 |
endif; |
| 20 |
|
| 21 |
if ( ! function_exists( 'has_site_logo' ) ) : |
| 22 |
/** |
| 23 |
* Unprefixed, backwards-compatible function for determining if a site logo has been set. |
| 24 |
* |
| 25 |
* @uses jetpack_has_site_logo() |
| 26 |
* @return bool True if a site logo is set, false otherwise. |
| 27 |
*/ |
| 28 |
function has_site_logo() { |
| 29 |
return jetpack_has_site_logo(); |
| 30 |
} |
| 31 |
endif; |
| 32 |
|
| 33 |
if ( ! function_exists( 'get_site_logo' ) ) : |
| 34 |
/** |
| 35 |
* Unprefixed, backwards-compatible function for getting either the site logo's image URL or its ID. |
| 36 |
* |
| 37 |
* @param string $show Return the site logo URL or ID. |
| 38 |
* @uses jetpack_get_site_logo() |
| 39 |
* @return string Site logo ID or URL (the default). |
| 40 |
*/ |
| 41 |
function get_site_logo( $show = 'url' ) { |
| 42 |
return jetpack_get_site_logo( $show ); |
| 43 |
} |
| 44 |
endif; |
| 45 |
|