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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php b/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php index d53feae4..7900e9b6 100644 --- a/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php +++ b/plugins/jetpack/extensions/blocks/tiled-gallery/tiled-gallery.php @@ -44,9 +44,11 @@ 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'] ) ); + // Jetpack_Plan does not exist on WordPress.com. + if ( class_exists( 'Jetpack_Plan' ) ) { + $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 ) ) { /** |