Changeset 56560 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 09/12/2023 07:18:34 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r56559 r56560 3981 3981 * is wasteful and can lead to bugs in the image counting logic. 3982 3982 */ 3983 $filter_removed = remove_filter( 'the_content', 'wp_filter_content_tags' ); 3983 $filter_image_removed = remove_filter( 'the_content', 'wp_filter_content_tags' ); 3984 3985 /* 3986 * Temporarily unhook do_blocks() since excerpt_remove_blocks( $text ) 3987 * handels block rendering needed for excerpt. 3988 */ 3989 $filter_block_removed = remove_filter( 'the_content', 'do_blocks', 9 ); 3984 3990 3985 3991 /** This filter is documented in wp-includes/post-template.php */ … … 3987 3993 $text = str_replace( ']]>', ']]>', $text ); 3988 3994 3989 /** 3995 // Restore the original filter if removed. 3996 if ( $filter_block_removed ) { 3997 add_filter( 'the_content', 'do_blocks', 9 ); 3998 } 3999 4000 /* 3990 4001 * Only restore the filter callback if it was removed above. The logic 3991 4002 * to unhook and restore only applies on the default priority of 10, 3992 4003 * which is generally used for the filter callback in WordPress core. 3993 4004 */ 3994 if ( $filter_ removed ) {4005 if ( $filter_image_removed ) { 3995 4006 add_filter( 'the_content', 'wp_filter_content_tags' ); 3996 4007 }
Note: See TracChangeset
for help on using the changeset viewer.