#9973 closed defect (bug) (fixed)
execute function apply_filters before wp_mkdir_p
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | low |
Severity: | normal | Version: | 2.7.1 |
Component: | Upload | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description ¶
I'm sorry. I do not understand English so much.
It is a demand of function wp_upload_dir().
I wish execute function apply_filters( ) before wp_mkdir_p( ).
because I wants to change the upload path arbitrarily by changing $uploads by using function add_filters().
Pull Requests
- Loading…
Change History (12)
#1
follow-up:
↓ 2
@
16 years ago
- Milestone Unassigned deleted
- Resolution set to invalid
- Status changed from new to closed
#2
in reply to:
↑ 1
@
16 years ago
- Version changed from 2.8 to 2.7.1
Replying to Denis-de-Bernardy:
there is an upload_dir filter
thanks.
But the upload_dir filter is executed after wp_mkdir_p( ).
And, function wp_mkdir_p makes the folder for the path before it changes.
#3
@ Lead Developer
16 years ago
- Keywords has-patch added
- Milestone set to 2.8
- Resolution invalid deleted
- Status changed from closed to reopened
- Type changed from feature request to defect (bug)
The filter should filter it before any actions are taken on it.
#6
@ Lead Developer
16 years ago
Ok.
Moving that filter looks good.
BTW that plugin doesn't do enough to make it all work as the attachments end up still pointing at the normal url.
And it needed some patching to work around errors:
$path = get_option( 'upload_path' ); $path = trim($path); if ( !$path ) $path = WP_CONTENT_DIR . '/uploads';
#7
follow-up:
↓ 8
@ Lead Developer
16 years ago
- Resolution set to fixed
- Status changed from reopened to closed
there is an upload_dir filter