[wp-trac] [WordPress Trac] #14111: wp_unique_post_slug() doesn't have a filter

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 1 08:53:49 UTC 2011


#14111: wp_unique_post_slug() doesn't have a filter
-----------------------------------------+-----------------------------
 Reporter:  Viper007Bond                 |       Owner:
     Type:  enhancement                  |      Status:  new
 Priority:  lowest                       |   Milestone:  Future Release
Component:  Permalinks                   |     Version:
 Severity:  trivial                      |  Resolution:
 Keywords:  has-patch reporter-feedback  |
-----------------------------------------+-----------------------------
Changes (by ptahdunbar):

 * cc: trac@… (added)
 * keywords:  needs-patch => has-patch reporter-feedback


Comment:

 ticket.14111.diff adds a new filter "wp_unique_post_slug_{$post_type}" at
 the end of wp_unique_post_slug() passing $post_ID, $post_status,
 $post_type, $post_parent as parameters.

 Taking another look at this, if you want control over the slug you
 probably want to skip the queries as your probably going to run your own
 queries. ticket.14111.2.diff skips the queries.

 if you could clarify your approach, that would be great.

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


More information about the wp-trac mailing list