Changeset 55850 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 05/23/2023 06:23:59 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r55844 r55850 3938 3938 $text = excerpt_remove_blocks( $text ); 3939 3939 3940 /* 3941 * Temporarily unhook wp_filter_content_tags() since any tags 3942 * within the excerpt are stripped out. Modifying the tags here 3943 * is wasteful and can lead to bugs in the image counting logic. 3944 */ 3945 $filter_removed = remove_filter( 'the_content', 'wp_filter_content_tags' ); 3946 3940 3947 /** This filter is documented in wp-includes/post-template.php */ 3941 3948 $text = apply_filters( 'the_content', $text ); 3942 3949 $text = str_replace( ']]>', ']]>', $text ); 3950 3951 /** 3952 * Only restore the filter callback if it was removed above. The logic 3953 * to unhook and restore only applies on the default priority of 10, 3954 * which is generally used for the filter callback in WordPress core. 3955 */ 3956 if ( $filter_removed ) { 3957 add_filter( 'the_content', 'wp_filter_content_tags' ); 3958 } 3943 3959 3944 3960 /* translators: Maximum number of words used in a post excerpt. */
Note: See TracChangeset
for help on using the changeset viewer.