PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
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 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | modules/theme-tools/site-logo.php +8 -3 12.7.316.3-a.1 View file →
@@ -19,8 +19,12 @@
19 19 *
20 20 * @package automattic/jetpack
21 21 */
22 22
23 +if ( ! defined( 'ABSPATH' ) ) {
24 + exit( 0 );
25 +}
26 +
23 27 /**
24 28 * Activate the Site Logo plugin.
25 29 *
26 30 * @uses current_theme_supports()
@@ -29,8 +33,9 @@
29 33 */
30 34 function site_logo_init() {
31 35 // Only load our code if our theme declares support, and the standalone plugin is not activated.
32 36 if ( current_theme_supports( 'site-logo' ) && ! class_exists( 'Site_Logo', false ) ) {
37 + _deprecated_hook( 'site-logo', '13.4', 'custom-logo', 'Jetpack no longer supports site-logo feature. Add custom-logo support to your theme instead: https://developer.wordpress.org/themes/functionality/custom-logo/' );
33 38 // Load our class for namespacing.
34 39 if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
35 40 // wpcom handles the image sizes differently.
36 41 require_once WPMU_PLUGIN_DIR . '/site-logo/inc/class-site-logo.php';
@@ -69,13 +74,13 @@
69 74 * and the updated Jetpack site-logo feature.
70 75 *
71 76 * @since 9.9.0
72 77 *
73 - * @param int|array $site_logo Option.
74 - * @return int
78 + * @param int|array|WP_Error $site_logo Option.
79 + * @return int|WP_Error
75 80 */
76 81 function jetpack_site_logo_block_compat( $site_logo ) {
77 - if ( isset( $site_logo['id'] ) ) {
82 + if ( is_array( $site_logo ) && isset( $site_logo['id'] ) ) {
78 83 remove_filter( 'option_site_logo', 'jetpack_site_logo_block_compat', 1 );
79 84 update_option( 'site_logo', $site_logo['id'] );
80 85 return $site_logo['id'];
81 86 }