Appending hyphen before numbers when creating a create unique filename in wp_unique_filename()
|Reported by:||husobj||Owned by:|
|Severity:||normal||Keywords:||has-patch 3.9-early needs-testing|
When WordPress appends a number to a file to create a unique filename, it just adds a number to the file.
ie If "photo.jpg" exists then "photo1.jpg" is created
I suggest that it should include a hyphen so the file would be called "photo-1.jpg"
The main reason is that if you upload files ending in numbers then then the new filename is less easy to read.
ie If "photo234.jpg" exists then "photo2341.jpg" is created
Would be nicer if it produced "photo234-1.jpg"
It's only cosmetic but it does make it easier to search for images in the uploads folder if you need to for any reason, especially if you have uploaded a load of images from a camera DSC123.jpg, DSC124.jpg etc
Change History (5)
comment:3 mikejolley — 10 days ago
- Keywords has-patch needs-testing added; needs-patch removed
- Version 2.5 deleted