WordPress.org

Ready to get started?Download WordPress

Forums

Add From Server
Upload Filetime Filter (1 post)

  1. justin_k
    Member
    Posted 2 years ago #

    Hey dd32,

    I've got a very minor request that I hope you'll be willing to toss into the next update. In class.add-from-server.php, below line 342 where you run

    $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) );

    Would you be willing to add another filter as follows?

    $time = apply_filters('afs-attachment-time', $time, $file);

    You've provided a few handy options for how to set the date of the attachment, but I'm using my own directory structure (similar to what you're doing on line 305), so a filter like this would allow me to use my own regexp to parse it and set the date accordingly. Until now I've been editing the plugin source after each update to re-add this filter.

    Thanks!
    J~

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic