Ticket #6380: 6380.diff
| File 6380.diff, 0.8 kB (added by DD32, 8 months ago) |
|---|
-
wp-includes/formatting.php
old new 829 829 function wp_trim_excerpt($text) { // Fakes an excerpt if needed 830 830 if ( '' == $text ) { 831 831 $text = get_the_content(''); 832 $shortcodes = has_filter('the_content', 'do_shortcode'); 833 if( $shortcodes ) 834 remove_filter('the_content', 'do_shortcode'); 832 835 $text = apply_filters('the_content', $text); 836 if( $shortcodes ) 837 add_filter('the_content', 'do_shortcode'); 833 838 $text = str_replace(']]>', ']]>', $text); 834 839 $text = strip_tags($text); 835 840 $excerpt_length = 55; … … 839 844 array_push($words, '[...]'); 840 845 $text = implode(' ', $words); 841 846 } 847 if( $shortcodes ) 848 $text = do_shortcode($text); 842 849 } 843 850 return $text; 844 851 }
