[wp-trac] [WordPress Trac] #39321: Issue with get_permalink when using wp_update_post() and %author% is part of your permalink

WordPress Trac noreply at wordpress.org
Fri Dec 23 13:29:50 UTC 2016


#39321: Issue with get_permalink when using wp_update_post() and %author% is part
of your permalink
--------------------------+------------------------------
 Reporter:  mauteri       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+------------------------------

Comment (by boonebgorges):

 > Not sure that's actually true, because in this situation $author =
 $authordata->user_nicename; never actually worked when post_author=0,
 $authordata is not an object and $authordata->user_nicename; is just NULL,
 so my change just leave it the same but with the added bonus of not
 throwing a PHP Notice :-)

 Right, I didn't mean "worse than it currently is". I meant that we'd be
 setting a precedent that, in some cases, the permalinks are different by
 design :)

 Let me think about non-pretty permalinks for revisions. If anyone else has
 thoughts about potential compatibility issues, please chime in here.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39321#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list