Opened 5 months ago
Last modified 4 months ago
#23091 new enhancement
Need to remove deprecated get_bloginfo('url') from _fix_attachment_links() function
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch close |
| Cc: | mdhansen@… |
Description
get_bloginfo('url'); is deprecated.
Should be home_url();
Attachments (2)
Change History (7)
MikeHansenMe — 4 months ago
comment:2
MikeHansenMe — 4 months ago
- Cc mdhansen@… added
- Keywords has-patch needs-testing added; needs-patch removed
SergeyBiryukov — 4 months ago
comment:4
SergeyBiryukov — 4 months ago
- Component changed from Warnings/Notices to Administration
- Keywords close added
- Type changed from defect (bug) to enhancement
23091.2.diff also renames $site_url to $home_url, to prevent confusion.
However, get_bloginfo( 'url' ) is not deprecated, only home and siteurl parameters are:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/general-template.php#L407
url is still a valid parameter. We use get_bloginfo( 'url' ) in some other places as well.
comment:5
MikeHansenMe — 4 months ago
This is confusing in the codex as it states 'home' is deprecated but 'url' is on the same line. Then states consider using home_url() instead. I think the patch is still an improvement as get_bloginfo( 'url' ) returns home_url() anyway. Seems removing a step is good and could be done other places in core as well.

from where? a old theme?