Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#33963 new enhancement

New function: `upload_url()`

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Upload Keywords: reporter-feedback needs-refresh has-patch
Focuses: Cc:


Retrieve the url to the uploads directory.

Attachments (2)

33963.patch (834 bytes) - added by sebastian.pisula 9 years ago.
33963.2.patch (858 bytes) - added by sebastian.pisula 8 years ago.
Refresh path

Download all attachments as: .zip

Change History (9)

#1 @DrewAPicture
9 years ago

#33964 was marked as a duplicate.

#2 follow-up: @johnbillion
9 years ago

  • Component changed from General to Upload
  • Keywords reporter-feedback added
  • Type changed from defect (bug) to enhancement

Thanks for the patch, Sebastian.

What's the use case for needing the URL for the uploads directory?

#3 @wonderboymusic
9 years ago

  • Keywords needs-refresh added

@sebastian.pisula, minor nitpick: the second part, you can just set it to $upload_dir['url'] instead of adding the string

#4 in reply to: ↑ 2 @swissspidy
9 years ago

What's the use case for needing the URL for the uploads directory?

Perhaps we could use this function at various places in core where $upload_dir['url'] is accessed directly?

$url = upload_url() isn't much of an improvement over $upload_dir = wp_upload_dir(); $url = $upload_dir['url'] though.

8 years ago

Refresh path

#5 @sebastian.pisula
8 years ago

  • Keywords has-patch added

Refresh patch.

This ticket was mentioned in Slack in #core by sebastian.pisula. View the logs.

8 years ago

#7 @desrosj
5 years ago

@sebastianpisula is this still of interest to you? If so, the patch needs refreshing.

Note: See TracTickets for help on using tickets.