Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#23091 closed enhancement (wontfix)

Need to remove deprecated get_bloginfo('url') from _fix_attachment_links() function

Reported by: hexalys Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Administration Keywords: has-patch
Focuses: Cc:


get_bloginfo('url'); is deprecated.
Should be home_url();

Attachments (2)

23091.diff (520 bytes) - added by MikeHansenMe 3 years ago.
23091.2.diff (1009 bytes) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 @alexvorn23 years ago


Last edited 3 years ago by alexvorn2 (previous) (diff)

@MikeHansenMe3 years ago

comment:2 @MikeHansenMe3 years ago

  • Cc mdhansen@… added
  • Keywords has-patch needs-testing added; needs-patch removed

comment:3 @alexvorn23 years ago

  • Keywords needs-testing removed

@SergeyBiryukov3 years ago

comment:4 @SergeyBiryukov3 years 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:

url is still a valid parameter. We use get_bloginfo( 'url' ) in some other places as well.

comment:5 @MikeHansenMe3 years 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.

comment:6 @c3mdigital2 years ago

  • Keywords close removed
  • Resolution set to wontfix
  • Status changed from new to closed
if ( get_bloginfo( 'url' ) == home_url() )
      $ticket = 'wontfix';

get_bloginfo('url') is not deprecated and returns home_url(). No reason to change internally.

comment:7 @SergeyBiryukov2 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.