[wp-trac] [WordPress Trac] #24164: Deprecate `get_permalink()`
WordPress Trac
noreply at wordpress.org
Tue Apr 23 17:29:47 UTC 2013
#24164: Deprecate `get_permalink()`
-----------------------------+------------------------------
Reporter: ericmann | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------------+------------------------------
Comment (by itsananderson):
Replying to [comment:5 ethitter]:
> `get_the_title()` and `get_the_guid()` both accept an ID, so the use of
''the'' already doesn't indicate that an ID is or isn't accepted. The
''the_'' and ''get_the_'' conventions simply indicate that functions
either `echo` or `return` the information they retrieve, and this ticket
doesn't aim to change that.
I chose a bad example, since an ID is accepted by the `title` functions.
`the_content` and `get_the_content` would be better examples. Still, not
really relevant to this ticket.
I've added a modification of Eric's patch that aliases get_permalink
rather than deprecating it. This way people can use the intuitive name,
but legacy code won't break or throw deprecated notices.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24164#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list