Replace wp_upload_dir() with the new wp_get_upload_dir() in all cases where a file is not being uploaded. Deprecate _wp_upload_dir_baseurl(), and replace it with wp_get_upload_dir().

See #34359.

git-svn-id: https://develop.svn.wordpress.org/trunk@36569 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2016-02-18 00:23:04 +00:00
parent e2dd03abd4
commit bb49a958d2
6 changed files with 30 additions and 33 deletions

View File

@@ -3716,3 +3716,17 @@ function popuplinks( $text ) {
$text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
return $text;
}
/**
* Returns the base URL of the uploads directory.
*
* @since 4.4.0
* @access private
* @deprecated 4.5.0
*
* @return string The base URL.
*/
function _wp_upload_dir_baseurl() {
$upload_dir = wp_get_upload_dir();
return $upload_dir['baseurl'];
}