freegio
Forum Replies Created
-
Adjusted file wp-includes/functions.php
- This reply was modified 4 years, 2 months ago by freegio.
SOLVED!
$subdir = ''; if ( get_option( 'uploads_use_yearmonth_folders' ) ) { // Generate the yearly and monthly directories. // modified to generate subdir y/m/d/h/min if ( ! $time ) { $time = current_time( 'mysql' ); } $y = substr( $time, 0, 4 ); $m = substr( $time, 5, 2 ); $d = substr( $time, 8, 2 ); //added $h = substr( $time, 11, 2 ); //added $min = substr( $time, 14, 2 ); //added $subdir = "/$y/$m/$d/$h/$min"; //modified } $dir .= $subdir; $url .= $subdir;Hi James,
Thanks for your reply. I use the Custom Upload Dir plugin (https://ww.wp.xz.cn/plugins/custom-upload-dir/) for set the path in the “uploads/” folder. The plugin creates physical folders. The plugin works very well for manually uploading files, how for example such as uploading images to a media library. Makes directories and directories path exactly how settings. (my custom settings is /uploads/year/month/day/hour/minute/). With plugin Custom Upload Dir are files saved well in a small amount to more folders.
For that reason I’m need solve saving files importing with Import WP same as with Custom Upload Dir, because when I’m importing xml file everyday, sometimes are upload a lot of images. With WordPress original settings I have after import in folder “uploads/” e.g. more than 18k images files and this not well.
When I used Import WP, all images was succefully imported, but not with path set by Custom Upload Dir, but with original settings WordPress (uploads/year/month/) ie. still I have a lot of files in default folder.
Is this example sufficient?thank you in advance for your help
Gio