Opened 18 years ago
Closed 18 years ago
#3623 closed defect (bug) (fixed)
get_bloginfo('site_url') returns 'home' option, which is confusing
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.2 | Priority: | lowest |
Severity: | minor | Version: | 2.1 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (9)
#1
@
18 years ago
- Milestone 2.1 deleted
- Priority changed from low to lowest
- Resolution set to fixed
- Status changed from new to closed
- Version 2.1 deleted
#2
@
18 years ago
Those should actually probably just be removed from the docs so people don't use them. I believe they're only there for backwards compatibility.
#3
@
18 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
Agreed. We should deprecate some of these redundant (and immensely confusing) things.
#4
@
18 years ago
- Owner changed from anonymous to rob1n
- Status changed from reopened to new
But is this a code issue, or a documentation issue? We're going to have to keep those legacy options in the code, but we should not even *mention* the legacy options in the documentation. And we probably should add CLEAR comments that these are DEPRECATED and may be REMOVED at any time. Feel free to interchange the caps.
Of course, considering how well our warnings worked for the $table* business...
#5
@
18 years ago
- Keywords dev-feedback 2nd-opinion added; site_url removed
- Status changed from new to assigned
tracked down the get_bloginfo() function:
case 'url' :
case 'home' :
case 'siteurl' :
Not having used Wordpress before now, i was unsure, I've just delved into the 2.1 source, and also the 2.0 source and noticed that it is indeed listed as 'siteurl' in both.. which means its probably just a wiki update instead..
Updating the wiki page..