Skip to content

Commit 175d602

Browse files
committed
added support for new wp_filter_content_tags function
and backwards compatibility for use in pre-5.5 WordPress
1 parent 2ad0fc6 commit 175d602

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

includes/template-global.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ function carelib_add_the_content_filters( $hook ) {
220220
add_filter( $hook, 'wpautop', 16 );
221221
add_filter( $hook, 'shortcode_unautop', 18 );
222222
add_filter( $hook, 'prepend_attachment', 20 );
223+
if ( function_exists( 'wp_filter_content_tags' ) ) {
224+
add_filter( $hook, 'wp_filter_contnt_tags', 22 );
225+
} else {
226+
add_filter( $hook, 'wp_make_content_images_responsive', 22 );
223227
add_filter( $hook, 'wp_make_content_images_responsive', 22 );
224228
add_filter( $hook, 'capital_P_dangit', 24 );
225229
add_filter( $hook, 'do_shortcode', 26 );
@@ -245,6 +249,10 @@ function carelib_remove_the_content_filters( $hook ) {
245249
remove_filter( $hook, 'wpautop', 16 );
246250
remove_filter( $hook, 'shortcode_unautop', 18 );
247251
remove_filter( $hook, 'prepend_attachment', 20 );
252+
if ( function_exists( 'wp_filter_content_tags' ) ) {
253+
remove_filter( $hook, 'wp_filter_contnt_tags', 22 );
254+
} else {
255+
remove_filter( $hook, 'wp_make_content_images_responsive', 22 );
248256
remove_filter( $hook, 'wp_make_content_images_responsive', 22 );
249257
remove_filter( $hook, 'capital_P_dangit', 24 );
250258
remove_filter( $hook, 'do_shortcode', 26 );

0 commit comments

Comments
 (0)