diff --git a/inc/compatibilities/jetpack.php b/inc/compatibilities/jetpack.php new file mode 100644 index 00000000..2e9ba147 --- /dev/null +++ b/inc/compatibilities/jetpack.php @@ -0,0 +1,66 @@ +post_content ) ) { + $value->post_content = Optml_Main::instance()->manager->replace_content( $value->post_content ); + } + + if ( ! empty( $value->post_excerpt ) ) { + $value->post_excerpt = Optml_Main::instance()->manager->replace_content( $value->post_excerpt ); + } + + if ( isset( $value->featured_image ) && ! empty( $value->featured_image ) ) { + $value->featured_image = apply_filters( 'optml_content_url', $value->featured_image ); + } + } + + return $data; + }, + 10 + ); + } + + /** + * Should we early load the compatibility? + * + * @return bool Whether to load the compatibility or not. + */ + public function should_load_early() { + return true; + } +} diff --git a/inc/manager.php b/inc/manager.php index a7359443..c6be3b94 100644 --- a/inc/manager.php +++ b/inc/manager.php @@ -100,6 +100,7 @@ final class Optml_Manager { 'otter_blocks', 'spectra', 'wpsp', + 'jetpack', ]; /** * The current state of the buffer.