diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2019-01-01 22:18:11 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2019-01-01 22:18:11 -0500 |
commit | 018bd442ec1e04ba78a6628763414eb60b359398 (patch) | |
tree | 448cde462397af33e5a964ba5d0803b73c65040e /plugins/jetpack/3rd-party | |
parent | Update easy-table 1.8 (diff) | |
download | blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.tar.gz blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.tar.bz2 blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.zip |
Update jetpack 6.8.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/3rd-party')
3 files changed, 25 insertions, 4 deletions
diff --git a/plugins/jetpack/3rd-party/class.jetpack-amp-support.php b/plugins/jetpack/3rd-party/class.jetpack-amp-support.php index 39520636..780bc100 100644 --- a/plugins/jetpack/3rd-party/class.jetpack-amp-support.php +++ b/plugins/jetpack/3rd-party/class.jetpack-amp-support.php @@ -217,11 +217,15 @@ class Jetpack_AMP_Support { } $metadata['image'] = array( - '@type' => 'ImageObject', - 'url' => $image['src'], - 'width' => $image['src_width'], - 'height' => $image['src_height'], + '@type' => 'ImageObject', + 'url' => $image['src'], ); + if ( isset( $image['src_width'] ) ) { + $metadata['image']['width'] = $image['src_width']; + } + if ( isset( $image['src_width'] ) ) { + $metadata['image']['height'] = $image['src_height']; + } return $metadata; } diff --git a/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php b/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php index 5d00c5a0..c32d7e01 100644 --- a/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php +++ b/plugins/jetpack/3rd-party/debug-bar/class.jetpack-search-debug-bar.php @@ -26,6 +26,8 @@ class Jetpack_Search_Debug_Bar extends Debug_Bar_Panel { $this->title( esc_html__( 'Jetpack Search', 'jetpack' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + add_action( 'login_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + add_action( 'enqueue_embed_scripts', array( $this, 'enqueue_scripts' ) ); } /** @@ -46,6 +48,11 @@ class Jetpack_Search_Debug_Bar extends Debug_Bar_Panel { * @return void */ public function enqueue_scripts() { + // Do not enqueue scripts if we haven't already enqueued Debug Bar or Query Monitor styles. + if ( ! wp_style_is( 'debug-bar' ) && ! wp_style_is( 'query-monitor' ) ) { + return; + } + wp_enqueue_style( 'jetpack-search-debug-bar', plugins_url( '3rd-party/debug-bar/debug-bar.css', JETPACK__PLUGIN_FILE ) diff --git a/plugins/jetpack/3rd-party/woocommerce.php b/plugins/jetpack/3rd-party/woocommerce.php index 5245e906..78a307b6 100644 --- a/plugins/jetpack/3rd-party/woocommerce.php +++ b/plugins/jetpack/3rd-party/woocommerce.php @@ -93,3 +93,13 @@ function jetpack_woocommerce_infinite_scroll_style() { }"; wp_add_inline_style( 'woocommerce-layout', $custom_css ); } + +function jetpack_woocommerce_lazy_images_compat() { + wp_add_inline_script( 'wc-cart-fragments', " + jQuery( 'body' ).bind( 'wc_fragments_refreshed', function() { + jQuery( 'body' ).trigger( 'jetpack-lazy-images-load' ); + } ); + " ); +} + +add_action( 'wp_enqueue_scripts', 'jetpack_woocommerce_lazy_images_compat', 11 ); |