WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15468 closed defect (bug) (invalid)

Options upload_path and fileupload_url are ignored in function wp_upload_dir in multisite

Reported by: jottlieb Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Multisite Keywords: attachment, media, wp_upload_dir
Focuses: multisite Cc:

Description

I've noticed, that the options upload_path and fileupload_url are ignored in the function wp_upload_dir when multisite is activated and the function is used in sub blogs.

So, every time wp_upload_dir is used (e.g. in manage media) the stored options a ignored and default sub blog uploads folder is forced.

This causes problems in special applications (e.g. sitewide attachments).

Change History (3)

comment:1 @jottlieb5 years ago

And another question is:
Why uses wp_get_attachment_url() the function wp_upload_dir() and not the guid-field or _wp_attached_file-field?

comment:2 @jottlieb5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

comment:3 @scribu5 years ago

  • Milestone Awaiting Review deleted

You can filter the values returned by wp_upload_dir() as needed.

Note: See TracTickets for help on using tickets.