massedge / wordpress-plugin-export-media-library

WordPress plugin that allows users to export media library files as a compressed zip archive.
https://wordpress.org/plugins/export-media-library/
GNU General Public License v3.0
10 stars 3 forks source link

Feature Request: More descriptive file name for zip #32

Closed MadtownLems closed 4 years ago

MadtownLems commented 4 years ago

I think it would be great if the zip's name could include the blog's name. Something maybe like:

$name = strtolower( get_option('blogname') ); $name = str_replace( ' ', '-', $name ); $name = preg_replace('/[^a-z-]/i','',$name ); $name = sanitize_file_name( $name );

$zip_name = $name . '-media-files-' . date('Y-M-d') . '-' . time() . '.zip';

This would be useful for most people, I imagine, but especially useful for people who manage multiple sites (including MultiSite).

andrejpavlovic commented 4 years ago

Good idea, I'll look into it.

andrejpavlovic commented 4 years ago

version 3.0.1 includes timestamp and blog name in the exported filename