summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/functions.photon.php')
-rw-r--r--plugins/jetpack/functions.photon.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/jetpack/functions.photon.php b/plugins/jetpack/functions.photon.php
index 419b8b55..d6cf13d9 100644
--- a/plugins/jetpack/functions.photon.php
+++ b/plugins/jetpack/functions.photon.php
@@ -12,6 +12,21 @@
function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
$image_url = trim( $image_url );
+ if ( class_exists( 'Jetpack') ) {
+ /**
+ * Disables Photon URL processing for local development
+ *
+ * @module photon
+ *
+ * @since 4.1.0
+ *
+ * @param bool false Result of Jetpack::is_development_mode.
+ */
+ if ( true === apply_filters( 'jetpack_photon_development_mode', Jetpack::is_development_mode() ) ) {
+ return $image_url;
+ }
+ }
+
/**
* Allow specific image URls to avoid going through Photon.
*