Andrew Nacin wrote this a couple of weeks ago when these functions first came up on the list:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
<div>In a nutshell, <span class="il">home_url</span>() is to
get_bloginfo('url') or get_option('home'), as site_url() is to
get_option('site_url') or get_bloginfo('wpurl');</div><div><br></div><div>The difference between the _url() functions and
get_option/get_bloginfo is that the _url() functions handle schemes,
specifically, HTTPS versus HTTP. Thus these are extremely important for
sites that want to force SSL on the frontend, admin, or login.</div><div><br></div><div>The difference between site and home is the
following. Otto is correct that they have to do with the two address
fields on the General Settings page. Specifically, SITE is always where
the WP files are actually located, and HOME *may* be /blog. In 99% of
cases, a theme will want to use <span class="il">home_url</span>().</div></blockquote>
<br>So I would look at using home_url() as a recommendation over get_option("home") as well, not required ... but definitely good practice.<br><br><br>Cais.<br><br><br><div class="gmail_quote">2010/9/15 Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Ah, I get it. :)<div><br></div><div>IMO (and others more expert might have good reason to disagree), anytime a <i>get_X()</i> or <i>get_bloginfo( 'X' )</i> function exists, <i>get_option( 'X' )</i> should not be used. It would seem that using the variable explicitly defined for 'X' is the safer/preferred route.</div>
<div><br></div><div>Thoughts?</div><div><br></div><div><font color="#888888">Chip</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 11:31 AM, yulian yordanov <span dir="ltr"><<a href="mailto:yul.yordanov@gmail.com" target="_blank">yul.yordanov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Oh, I wanted to ask something different. I'm sorry, English is not my native language you know :/<br>
I know home_url is recommended for bloginfo('url') but I'm wondering about get_option(home). Seems it produces the same result /home URL/ so can I replace get_option(home) with home_url() too?<br>
<br>Yulian <Fingli><br><br><div class="gmail_quote">2010/9/15 Edward Caissie <span dir="ltr"><<a href="mailto:edward.caissie@gmail.com" target="_blank">edward.caissie@gmail.com</a>></span><div><div></div><div>
<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
As a recommendation is fine for now ... it might get a 'strongly' added to it, but not yet.<br><br><br>Cais.<br><br><div class="gmail_quote">2010/9/15 Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net" target="_blank">chip@chipbennett.net</a>></span><div>
<div></div><div><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Using <i>home_url()</i> is actually already listed as <b>recommended </b>in the Guidelines, but is not <b>required</b>.<div>
<br></div><div>That's probably a good balance for the time being, I think.</div><div><br></div>
<div>Chip<br><br><div class="gmail_quote"><div><div></div><div>On Wed, Sep 15, 2010 at 11:15 AM, yulian yordanov <span dir="ltr"><<a href="mailto:yul.yordanov@gmail.com" target="_blank">yul.yordanov@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>
<div bgcolor="#ffffff" text="#000000">
Hi, <br>
Hmm, is there significant difference between get_option('home') and
bloginfo('url')? Can I recommend using <b>echo home_url('/')</b>
instead?<br><font color="#888888">
<pre cols="72">--
Юлиян Йорданов
Yulian Yordanov
<a href="http://post-scriptum.info/" target="_blank">http://post-scriptum.info/</a> </pre>
</font></div>
<br></div></div>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Юлиян Йорданов<br><br>Yulian Yordanov<br><a href="http://post-scriptum.info/" target="_blank"> post-scriptum.info</a><br><br>
</font><br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br>