Ticket #9558: bug9558-make-wp_trim_excerpt-filterable.diff

File bug9558-make-wp_trim_excerpt-filterable.diff, 526 bytes (added by coffee2code, 3 years ago)

Aforementioned patch

  • wp-includes/formatting.php

     
    16271627 * @return string The excerpt. 
    16281628 */ 
    16291629function wp_trim_excerpt($text) { 
     1630        $raw_excerpt = $text; 
    16301631        if ( '' == $text ) { 
    16311632                $text = get_the_content(''); 
    16321633 
     
    16431644                        $text = implode(' ', $words); 
    16441645                } 
    16451646        } 
    1646         return $text; 
     1647        return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); 
    16471648} 
    16481649 
    16491650/**