Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#36375 closed task (blessed) (fixed)

Remove _wp_upload_dir_baseurl()

Reported by: azaozz's profile azaozz Owned by: joemcgill's profile joemcgill
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords:
Focuses: Cc:

Description

This is a follow up from #36371.

_wp_upload_dir_baseurl() is a private function introduced in 4.4 as part of the "responsive images" feature. It was for runtime caching of the URL to the uploads directory. It is deprecated in 4.5 with the introduction of wp_get_upload_dir(), and currently it is only used in an older version of the feature plugin.

Attachments (1)

36375.diff (790 bytes) - added by joemcgill 9 years ago.
Remove deprecated _wp_upload_dir_baseurl() from core.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
9 years ago

  • Component changed from General to Media

#2 @joemcgill
9 years ago

  • Keywords needs-patch added
  • Milestone changed from Future Release to 4.6
  • Owner set to joemcgill
  • Status changed from new to assigned

#3 follow-up: @joemcgill
9 years ago

We missed this at the end of 4.5. Going to see if we can make this happen in 4.6.

#4 in reply to: ↑ 3 @azaozz
9 years ago

Replying to joemcgill:

If still no calls to it in the plugins directory, I'd go for it now (the sooner, the better).

Last edited 9 years ago by azaozz (previous) (diff)

#5 @kirasong
9 years ago

Let's do it.

@joemcgill
9 years ago

Remove deprecated _wp_upload_dir_baseurl() from core.

#6 @joemcgill
9 years ago

  • Keywords needs-patch removed

36375.diff removes this function from core. I checked the feature plugin, RICG Responsive Images plugin, which is the only place this is used outside of core, and there it is used as part of a back-compat shim that only gets loaded on pre-4.4 versions of WordPress. The plugin also includes its own version of this function definition for those cases as well, so it is safe to remove from core without any changes to the plugin.

#8 @joemcgill
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 37676:

Media: remove _wp_upload_dir_baseurl().

_wp_upload_dir_baseurl() is a private function introduced in 4.4
as part of the "responsive images" feature. It was for runtime
caching of the URL to the uploads directory. It is deprecated in
4.5 with the introduction of wp_get_upload_dir().

Outside core, it's only used as part of a back-compat shim in the
original feature plugin for responsive images (ricg-responsive-images),
which includes its own version of the function definition, so it's
safe to remove from core.

Fixes #36375.

Note: See TracTickets for help on using tickets.