[wp-trac] [WordPress Trac] #23882: get_permalink() accepts an ID, the_permalink() does not

WordPress Trac noreply at wordpress.org
Fri Oct 9 16:26:09 UTC 2015


#23882: get_permalink() accepts an ID, the_permalink() does not
-------------------------------------------+------------------------
 Reporter:  johnjamesjacoby                |       Owner:  chriscct7
     Type:  enhancement                    |      Status:  closed
 Priority:  normal                         |   Milestone:  4.4
Component:  Permalinks                     |     Version:  3.5
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  has-patch commit dev-feedback  |     Focuses:
-------------------------------------------+------------------------
Changes (by DrewAPicture):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Replying to [comment:12 Frank Klein]:
 > But I think that adding a parameter would change the function from being
 a pure Template Tag towards something that is mixed. This would break with
 the existing conventions of how templating works (for the most part due to
 backwards compatibility reasons) in WordPress, and therefore isn't a
 worthwhile addition because the gain of adding the parameter in view of
 these downsides isn't worth it.

 I recognize your concerns about the purity of what it means to have
 template tags, at the same time, I don't see a downside or a slippery
 slope here.

 This change makes `the_permalink()` ''more flexible'' without affecting
 default behavior. It also allows people already using it in the loop to
 continue using what they know in other contexts. If we can save people
 time having to hunt down a non-template tag for the sake of semantics,
 that's a win, in my opinion.

 Reclosing as fixed.

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


More information about the wp-trac mailing list