[wp-trac] [WordPress Trac] #34234: Rename `id` param in get_the_permalink, get_permalink, and the_permalink

WordPress Trac noreply at wordpress.org
Fri Oct 9 16:47:44 UTC 2015


#34234: Rename `id` param in get_the_permalink, get_permalink, and the_permalink
-------------------------+------------------------------------------------
 Reporter:  chriscct7    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  needs-patch needs-codex needs-docs
  Focuses:               |
-------------------------+------------------------------------------------
 The `id` param in get_the_permalink, get_permalink, and the_permalink
 isn't very intuitive. `id` is not a really good parameter name, partially
 because it doesn't actually describe what it is. Is it a post id? A user
 id? A random number called id? A serial number for a bikeshed? A MySQL
 column that autoincrements value?

 If the `id` param was renamed to `post` it'd make the functions more self-
 documenting, and would require a minimal effort patch, making the
 functions more easily understood for newer developers by saving them the
 time of figuring out what exactly `id` is.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34234>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list