diff options
Diffstat (limited to 'plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php')
-rw-r--r-- | plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php b/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php index bcfdaf1f..d53feae4 100644 --- a/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php +++ b/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php @@ -44,6 +44,10 @@ class Jetpack_Tiled_Gallery_Block { $is_squareish_layout = self::is_squareish_layout( $attr ); + $jetpack_plan = Jetpack_Plan::get(); + + wp_localize_script( 'jetpack-gallery-settings', 'jetpack_plan', array( 'data' => $jetpack_plan['product_slug'] ) ); + if ( preg_match_all( '/<img [^>]+>/', $content, $images ) ) { /** * This block processes all of the images that are found and builds $find and $replace. @@ -85,7 +89,7 @@ class Jetpack_Tiled_Gallery_Block { $srcset_src = add_query_arg( array( 'resize' => $w . ',' . $w, - 'strip' => 'all', + 'strip' => 'info', ), $orig_src ); @@ -104,7 +108,7 @@ class Jetpack_Tiled_Gallery_Block { for ( $w = $min_width; $w <= $max_width; $w = min( $max_width, $w + self::IMG_SRCSET_WIDTH_STEP ) ) { $srcset_src = add_query_arg( array( - 'strip' => 'all', + 'strip' => 'info', 'w' => $w, ), $orig_src @@ -163,9 +167,4 @@ class Jetpack_Tiled_Gallery_Block { } } -if ( - ( defined( 'IS_WPCOM' ) && IS_WPCOM ) - || class_exists( 'Jetpack_Photon' ) && Jetpack::is_module_active( 'photon' ) -) { - Jetpack_Tiled_Gallery_Block::register(); -} +Jetpack_Tiled_Gallery_Block::register(); |