#9973 closed defect (bug) (fixed)
execute function apply_filters before wp_mkdir_p
| Reported by: | toemon | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 2.8 |
| Component: | Upload | Version: | 2.7.1 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
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().
Attachments (2)
Change History (12)
#2
in reply to: ↑ 1
@
17 years ago
- Version 2.8 → 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
@
17 years ago
- Keywords has-patch added
- Milestone → 2.8
- Resolution invalid
- Status closed → reopened
- Type feature request → defect (bug)
The filter should filter it before any actions are taken on it.
#6
@
17 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';
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
there is an upload_dir filter