[wp-trac] [WordPress Trac] #18037: inconsistency in filters for the_content and the_excerpt

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 14 17:28:44 UTC 2012


#18037: inconsistency in filters for the_content and the_excerpt
-------------------------+------------------------------
 Reporter:  opajaap      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Plugins      |     Version:  3.2
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by mdgl):

 Agreed the filters on these functions (and their get_* brothers) are a
 complete mess and we really need to be more consistent. The difficult is,
 as always backwards compatibility.

 Your problem occurs because if there is no explicit excerpt created by the
 user, WP takes the first bit of text from the full post content instead,
 applying the filters declared on function the_content(). See function
 wp_trim_excerpt() in wp-includes/formatting.php which is called as a
 filter on get_the_excerpt().

 There are many similar tickets, some such as #4679 going back a long way!

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18037#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list