WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#962 closed defect (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)

#1 @Otto42
4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [10038-dotorg].

#2 @Otto42
4 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 @hlashbrooke
4 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...)

#4 @Otto42
4 years ago

The plugin directory code isn't in there. That won't be openly available until we rewrite that system.

#5 @hlashbrooke
4 years ago

Oh right - good to know!

Note: See TracTickets for help on using tickets.