diff options
Diffstat (limited to 'plugins/jetpack/3rd-party/bbpress.php')
-rw-r--r-- | plugins/jetpack/3rd-party/bbpress.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/jetpack/3rd-party/bbpress.php b/plugins/jetpack/3rd-party/bbpress.php index ae60d91d..7c46f381 100644 --- a/plugins/jetpack/3rd-party/bbpress.php +++ b/plugins/jetpack/3rd-party/bbpress.php @@ -13,6 +13,16 @@ function jetpack_bbpress_compat() { add_action( 'bbp_template_after_single_forum', 'jetpack_sharing_bbpress' ); add_action( 'bbp_template_after_single_topic', 'jetpack_sharing_bbpress' ); } + + /** + * Use Photon for all images in Topics and replies. + * + * @since 4.9.0 + */ + if ( class_exists( 'Jetpack_Photon' ) && Jetpack::is_module_active( 'photon' ) ) { + add_filter( 'bbp_get_topic_content', array( 'Jetpack_Photon', 'filter_the_content' ), 999999 ); + add_filter( 'bbp_get_reply_content', array( 'Jetpack_Photon', 'filter_the_content' ), 999999 ); + } } /** @@ -25,4 +35,4 @@ function jetpack_bbpress_compat() { */ function jetpack_sharing_bbpress() { sharing_display( null, true ); -}
\ No newline at end of file +} |