WordPress.org

Ready to get started?Download WordPress

Forums

Add From Server
Respect year/month folder option (1 post)

  1. dideldumthecat
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by dideldumthecat
  • This topic is not resolved
  • WordPress version: 3.4.1

Tags

No tags yet.