get_bloginfo('site_url') returns 'home' option, which is confusing
|Reported by:||dd32||Owned by:||rob1n|
According to the Template tags for get_bloginfo()
'url' - the Blog address (URI) is the URL for your blog's web site address and is set in Administration > Options > General. This data is retrieved from the home record in the wp_options table.
'home' - returns the same value as 'url'.
'site_url' - returns the same value as 'url'.
however the output when using latest SVN: (2.1-RC2 revision 4776)
get_bloginfo(""); "blog title"
get_bloginfo('url'); "blog url"
get_bloginfo('home'); "blog url"
get_bloginfo('site_url'); "blog title"
It may be that site_url has been depreciated(as it seems to be given that 'url' should just be used), however it may break some templates/plugins if its not included for backwards compatibility.
Change History (9)
- Milestone 2.1 deleted
- Priority changed from low to lowest
- Resolution set to fixed
- Status changed from new to closed
- Version 2.1 deleted
comment:3 @markjaquith — 8 years ago
- Milestone set to 2.2
- Resolution fixed deleted
- Status changed from closed to reopened
- Summary changed from get_bloginfo('site_url') not returning expected value. to get_bloginfo('site_url') returns 'home' option, which is confusing
- Version set to 2.1
- Owner changed from anonymous to rob1n
- Status changed from reopened to new
- Keywords dev-feedback 2nd-opinion added; site_url removed
- Status changed from new to assigned