WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Add From Server] Respect year/month folder option

[Plugin: Add From Server] Respect year/month folder option

  • Hi there,

    thanks for this plugin, it really helped us a lot. However, we discovered that it always uses the year/month folder structure for new imports, even if the option is not set in the current blog. We were importing from a blog that had the option enabled, but wanted all the files in one single folder in the new blog.

    I’ve written a small patch for this which worked well for us- maybe this would be a useful addition to the plugin’s features?

    To patch this, find the function “handle_import_file” and wrap the first if else elseif clause in the follwing code:

    // Check if the option for month- and year-based folders is checked
    $upload_dir_settings = wp_upload_dir();
    if (isset($upload_dir_settings[‘subdir’]) && trim($upload_dir_settings[‘subdir’]) != ”) {

    }
    else {
    $time = null;
    }

    http://wordpress.org/extend/plugins/add-from-server/

  • The topic ‘[Plugin: Add From Server] Respect year/month folder option’ is closed to new replies.