Skip to content

Commit

Permalink
Remove unnecessary function exists check on wp_filter_content_tags (#…
Browse files Browse the repository at this point in the history
…33182)

Minimum required WP version is 5.6 (#29701 and #29938). `wp_filter_content_tags` was added in 5.5 so these checks is no longer needed.
  • Loading branch information
Petter Walbø Johnsgård committed Jul 5, 2021
1 parent 67cc4d5 commit 4f5360e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions lib/full-site-editing/template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,7 @@ function gutenberg_get_the_template_html() {
$content = $wp_embed->autoembed( $content );
$content = do_blocks( $content );
$content = wptexturize( $content );
if ( function_exists( 'wp_filter_content_tags' ) ) {
$content = wp_filter_content_tags( $content );
} else {
$content = wp_make_content_images_responsive( $content );
}
$content = wp_filter_content_tags( $content );
$content = str_replace( ']]>', ']]>', $content );

// Wrap block template in .wp-site-blocks to allow for specific descendant styles
Expand Down
6 changes: 1 addition & 5 deletions packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ function render_block_core_template_part( $attributes ) {
$content = wptexturize( $content );
$content = convert_smilies( $content );
$content = shortcode_unautop( $content );
if ( function_exists( 'wp_filter_content_tags' ) ) {
$content = wp_filter_content_tags( $content );
} else {
$content = wp_make_content_images_responsive( $content );
}
$content = wp_filter_content_tags( $content );
$content = do_shortcode( $content );

// Handle embeds for block template parts.
Expand Down

0 comments on commit 4f5360e

Please sign in to comment.