[wp-trac] [WordPress Trac] #33857: Add new function the_home_url()

WordPress Trac noreply at wordpress.org
Thu Jan 16 05:49:48 UTC 2020


#33857: Add new function the_home_url()
-----------------------------+----------------------
 Reporter:  miyauchi         |       Owner:  (none)
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  General          |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  has-patch        |     Focuses:
-----------------------------+----------------------
Changes (by noisysocks):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Hey @miyauchi, thanks for the suggestion and for the patch! This was
 discussed during a triage session (see Slack link above) and it was
 decided that we don't want to add this new API, because:

 - `the_{thing}` functions are for outputting big sections of HTML e.g. in
 a template, not strings like the one returned by `home_url`.
 - The naming convention for these functions is that there is `the_{thing}`
 and `get_the_{thing}`, but adding this would make it so that there is
 `the_{thing}` and `{thing}`.
 - Themes don't need this very often.

 I'm going to close this out as `wontfix` for now.

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


More information about the wp-trac mailing list