[wp-trac] [WordPress Trac] #17134: Add support for the_slug() in template tags

WordPress Trac noreply at wordpress.org
Fri Feb 1 04:54:09 UTC 2013


#17134: Add support for the_slug() in template tags
-----------------------------------+------------------------------
 Reporter:  tomauger               |       Owner:
     Type:  feature request        |      Status:  reopened
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Template               |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |
-----------------------------------+------------------------------

Comment (by wonderboymusic):

 `post_name` appears in core 176 times, almost every time it is directly
 accessed from the object, unfiltered. The only filters that are ever
 called on it are `editable_slug` in the admin, and `sanitize_title`, only
 when going into the database or being faked for a draft or pending post.

 Adding a filter that could alter its uniqueness is dangerous. If the plan
 is for no one to ever filter it, and the filter's removed from your patch,
 then it's too much reflection - there are other ways to access it. The new
 functions would make sense if they got rid of the value being filtered in
 a bunch of places and replaced them with handy helper functions, but that
 doesn't seem to be the case.

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


More information about the wp-trac mailing list