[wp-trac] [WordPress Trac] #40780: Update docblocks & parameters in wp-includes/link-template.php for post-related functions

WordPress Trac noreply at wordpress.org
Sat Jul 1 03:28:13 UTC 2017


#40780: Update docblocks & parameters in wp-includes/link-template.php for post-
related functions
-------------------------------+---------------------------
 Reporter:  GunGeekATX         |       Owner:  DrewAPicture
     Type:  enhancement        |      Status:  closed
 Priority:  normal             |   Milestone:  4.9
Component:  Posts, Post Types  |     Version:  4.8
 Severity:  normal             |  Resolution:  fixed
 Keywords:  has-patch          |     Focuses:  docs
-------------------------------+---------------------------
Changes (by DrewAPicture):

 * owner:   => DrewAPicture
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40975"]:
 {{{
 #!CommitTicketReference repository="" revision="40975"
 Link Template: Clarify documentation for the `$id` parameter in
 `get_post_permalink()`, `get_edit_post_link()`, `edit_post_link()`, and
 `get_delete_post_link()`, to reflect that either a post ID or `WP_Post`
 object is accepted.

 Separately, use `$post` for checking the post status and retrieving the
 page_uri in `get_post_permalink()` instead of referencing back to the
 original `$id` parameter.

 Props GunGeekATX for the initial patch.
 Fixes #40780.
 }}}

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


More information about the wp-trac mailing list