Skip to content

Commit

Permalink
All Sites: Use UPLOADS if set for uploads path, else use the WP defaults
Browse files Browse the repository at this point in the history
Fixes gh-291
Closes gh-292
  • Loading branch information
ryanneufeld authored and scottgonzalez committed Feb 25, 2014
1 parent 68fa4fd commit 95061db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mu-plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ function jquery_unfiltered_html_for_term_descriptions() {

add_filter( 'option_uploads_use_yearmonth_folders', '__return_false' );
add_filter( 'upload_dir', function( $upload_dir ) {
$upload_dir['path'] = $upload_dir['basedir'] = WP_CONTENT_DIR . '/uploads';
if ( defined( 'UPLOADS' ) ) {
$upload_dir['path'] = $upload_dir['basedir'] = UPLOADS;
} else {
$upload_dir['path'] = $upload_dir['basedir'] = WP_CONTENT_DIR . '/uploads';
}

return $upload_dir;
});

1 comment on commit 95061db

@jzaefferer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this fixed resource uploads for me.

Please sign in to comment.