Skip to content

Commit f8e8335

Browse files
update jetpack filter to new class
1 parent b9339fb commit f8e8335

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/default-filters.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use Automattic\Jetpack\Image_CDN\Image_CDN;
4+
35
defined('ABSPATH') or exit;
46

57
add_filter('boxzilla_box_content', 'wptexturize');
@@ -10,12 +12,13 @@
1012
add_filter('boxzilla_box_content', 'do_shortcode', 11);
1113

1214
/**
13-
* Allow Jetpack Photon to filter on Boxzilla box content.
15+
* Allow Jetpack to filter images inside Boxzilla box content.
1416
*/
15-
if (class_exists('Jetpack') && class_exists('Jetpack_Photon') && method_exists('Jetpack', 'is_module_active') && Jetpack::is_module_active('photon')) {
16-
add_filter('boxzilla_box_content', [ 'Jetpack_Photon', 'filter_the_content' ], 999999);
17+
if (class_exists(Image_CDN::class) && method_exists(Image_CDN::class, 'filter_the_content')) {
18+
add_filter('boxzilla_box_content', [ Image_CDN::class, 'filter_the_content' ], 999999);
1719
}
1820

21+
1922
/**
2023
* Filter nav menu items to use an onclick event instead of a href attribute.
2124
*/

0 commit comments

Comments
 (0)