summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/tiled-gallery/tiled-gallery.php')
-rw-r--r--plugins/jetpack/modules/tiled-gallery/tiled-gallery.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
index 479eadc2..f99e7558 100644
--- a/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
+++ b/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php
@@ -1,5 +1,8 @@
<?php
+use Automattic\Jetpack\Assets;
+use Automattic\Jetpack\Status;
+
// Include the class file containing methods for rounding constrained array elements.
// Here the constrained array element is the dimension of a row, group or an image in the tiled gallery.
require_once dirname( __FILE__ ) . '/math/class-constrained-array-rounding.php';
@@ -127,7 +130,7 @@ class Jetpack_Tiled_Gallery {
public static function default_scripts_and_styles() {
wp_enqueue_script(
'tiled-gallery',
- Jetpack::get_file_url_for_environment(
+ Assets::get_file_url_for_environment(
'_inc/build/tiled-gallery/tiled-gallery/tiled-gallery.min.js',
'modules/tiled-gallery/tiled-gallery/tiled-gallery.js'
),
@@ -181,7 +184,7 @@ class Jetpack_Tiled_Gallery {
if ( $gallery_html && class_exists( 'Jetpack' ) && class_exists( 'Jetpack_Photon' ) ) {
// Tiled Galleries in Jetpack require that Photon be active.
// If it's not active, run it just on the gallery output.
- if ( ! in_array( 'photon', Jetpack::get_active_modules() ) && ! Jetpack::is_development_mode() ) {
+ if ( ! in_array( 'photon', Jetpack::get_active_modules() ) && ! ( new Status() )->is_development_mode() ) {
$gallery_html = Jetpack_Photon::filter_the_content( $gallery_html );
}
}