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.
- The topic ‘[Plugin: Add From Server] Upload Filetime Filter’ is closed to new replies.