[wp-trac] [WordPress Trac] #20419: get_sample_permalink() passes the wrong post_status to wp_unique_post_slug()

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 20 04:41:42 UTC 2012


#20419: get_sample_permalink() passes the wrong post_status to
wp_unique_post_slug()
--------------------------+------------------
 Reporter:  mintindeed    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Permalinks    |     Version:  3.3
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by mintindeed):

 One reason for submitting the original/real status is so that plugins can
 act differently based on the status of the post, e.g. for custom statuses.
 I ran into this bug when implementing an SEO feature that allowed an "seo
 slug" to override the default permalink based on title.  If someone was
 using custom statuses etc, having access to the original status (vs a
 placeholder status) could be useful.

 I've uploaded two patches made against svn r21284 --

 20419-extra-param.patch is an updated version of my original patch

 20419-override-post_status.patch based on Ryan's suggestion attempts to
 override the existing status parameter while still passing the actual post
 status.  I kinda like this approach better because I think it's a bit
 janky to add new parameters.

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


More information about the wp-trac mailing list