[theme-reviewers] New Tags in 3.0: home_url(), site_url(), admin_url()

Edward Caissie edward.caissie at gmail.com
Fri Aug 27 18:41:35 UTC 2010


I'm not seeing a great deal of difference in their functionality from the
codex pages.

The major differences I am seeing in core are:

   - site_url() returns get_option ( 'siteurl' ) vs. home_url returns
   get_option( 'home' )
   - site_url() does additonal $scheme checks

There also appear to be several other "_url" type functions added with
3.0.0.

Source:
http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/link-template.php


Cais.

On Fri, Aug 27, 2010 at 2:24 PM, Chip Bennett <chip at chipbennett.net> wrote:

> On Fri, Aug 27, 2010 at 1:08 PM, Simon Prosser <pross at pross.org.uk> wrote:
>
>> On Friday 27 August 2010 19:06:38 Chip Bennett wrote:
>> > Something we have thus far overlooked, the following three template tags
>> > were added in 3.0:
>> > home_url()<http://codex.wordpress.org/Function_Reference/home_url>,
>> > site_url() <http://codex.wordpress.org/Function_Reference/site_url>,
>> > admin_url().
>> >
>> > (Actually, site_url() was added in 2.6.)
>> >
>> > Should these be incorporated into the Guidelines, as replacements for
>> their
>> > get_bloginfo() equivalents? And if so, how: required, or recommended?
>> >
>> > See Justin Tadlock's
>> > comment<
>> http://www.wptavern.com/forum/themes-templates/1911-theme-repositor
>> > y-reviews-3.html#post18711>at WP Tavern for reference.
>> >
>> > Thoughts?
>> >
>> > Chip
>> 99.99% of themes still use bloginfo() so i think a recommendation only at
>> this
>> point..
>
>
> Sounds good.
>
> Also, I'm having a brain-fart moment (I'll blame it on having just donated
> blood): when would home_url and site_url be different? Does it have to do
> with handling of static front pages, or something?
>
> Chip
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20100827/904ae9ee/attachment.htm>


More information about the theme-reviewers mailing list