diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-07-28 23:29:30 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-07-28 23:29:30 -0400 |
commit | 5c4552fad98db23b2698e8a598bf20f42cb430ef (patch) | |
tree | 61fc1f692646288704376f32d914eeef152e375e /plugins/jetpack/functions.photon.php | |
parent | Update plugin jecpack to 4.0.4 (diff) | |
download | blogs-gentoo-5c4552fad98db23b2698e8a598bf20f42cb430ef.tar.gz blogs-gentoo-5c4552fad98db23b2698e8a598bf20f42cb430ef.tar.bz2 blogs-gentoo-5c4552fad98db23b2698e8a598bf20f42cb430ef.zip |
Update plugin jetpack to 4.1.1
Diffstat (limited to 'plugins/jetpack/functions.photon.php')
-rw-r--r-- | plugins/jetpack/functions.photon.php | 15 |
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. * |