Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#36375 closed task (blessed) (fixed)

Remove _wp_upload_dir_baseurl()

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

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 10 years ago.
Remove deprecated _wp_upload_dir_baseurl() from core.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
11 years ago

  • Component General → Media

#2 @joemcgill
10 years ago

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

#3 follow-up: @joemcgill
10 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
10 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 10 years ago by azaozz (previous) (diff)

#5 @kirasong
10 years ago

Let's do it.

@joemcgill
10 years ago

Remove deprecated _wp_upload_dir_baseurl() from core.

#6 @joemcgill
10 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
10 years ago

  • Resolution → fixed
  • Status assigned → 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.