← All changes
|
jetpack_vendor/automattic/jetpack-image-cdn/src/compatibility/photon.php
+7
-3
12.2.3
→
16.3
View file →
| @@ -8,8 +8,12 @@ | ||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | namespace Automattic\Jetpack\Image_CDN\Compatibility; |
| 11 | 11 | |
| 12 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 13 | + exit( 0 ); | |
| 14 | +} | |
| 15 | + | |
| 12 | 16 | /** |
| 13 | 17 | * Disable the unpackaged photon version living in Jetpack. |
| 14 | 18 | * |
| 15 | 19 | * Before the package, Jetpack had the photon functionality within the plugin. To avoid double |
| @@ -22,11 +26,11 @@ | ||
| 22 | 26 | /* |
| 23 | 27 | * Photon used have different functions names. They are later replaced by methods in |
| 24 | 28 | * Image_CDN_Core class. And the filters are now handled by the Image_CDN_Core class itself. |
| 25 | 29 | */ |
| 26 | - remove_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 ); | |
| 27 | - remove_filter( 'jetpack_photon_pre_args', 'jetpack_photon_parse_wpcom_query_args', 10, 2 ); | |
| 28 | - remove_filter( 'jetpack_photon_skip_for_url', 'jetpack_photon_banned_domains', 9, 2 ); | |
| 30 | + remove_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10 ); | |
| 31 | + remove_filter( 'jetpack_photon_pre_args', 'jetpack_photon_parse_wpcom_query_args', 10 ); | |
| 32 | + remove_filter( 'jetpack_photon_skip_for_url', 'jetpack_photon_banned_domains', 9 ); | |
| 29 | 33 | remove_filter( 'widget_text', 'jetpack_photon_support_text_widgets' ); |
| 30 | 34 | |
| 31 | 35 | /* |
| 32 | 36 | * If photon is active in an old version of Jetpack which is using the unpackaged photon |