PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | modules/theme-tools/site-logo/inc/compat.php +44 -0 16.2-beta → 16.3 View file →
@@ -1,0 +1,44 @@
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;