#962 closed defect (bug) (fixed)
Plugin screenshots do not use natural ordering
Reported by: | hlashbrooke | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | needs-patch |
Cc: |
Description
When adding more than 9 screenshots to a plugin, the natural order supplied in the plugin's readme.txt as well as the numbered order in the screenshot file names (screenshot-#.png) is on longer respected. Instead, the order ends up looking like this: 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9 (I'm not sure what type of ordering is called, but it's the default programmatic ordering as opposed to natural ordering).
Example: https://wordpress.org/plugins/seriously-simple-podcasting/screenshots/ - the three widget screenshots are numbered 10, 11 and 12, yet they appear right after the first screenshot. The file names are correct and the readme.txt ordering is correct.
I'm checking out the meta environment at the moment and will look into a patch this week when I get a chance.
Change History (5)
#2
@
10 years ago
The code was already breaking them into an array by the numeric key, so all it needed was a ksort() in the right place.
#3
@
10 years ago
Great stuff - I assumed that was the issue, but I haven't had a chance to look at the code yet (Vagrant is still provisioning...)
Fixed in [10038-dotorg].