Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#33941 closed defect (bug) (fixed)

Help tabs rendering in wrong order

Reported by: lilaeamedia's profile lilaeamedia Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Help/About Keywords: has-patch
Focuses: Cc:

Description

Tabs are no longer rendering in the order $screen->add_help_tab() is called.

It appears to be random, like keys from an associative array.

Is there a new sort order parameter?

(4.4-alpha-34360)

Attachments (1)

33941.diff (1.7 KB) - added by wonderboymusic 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 in reply to: ↑ description @DrewAPicture
8 years ago

Replying to lilaeamedia:

Tabs are no longer rendering in the order $screen->add_help_tab() is called.

It appears to be random, like keys from an associative array.

Is there a new sort order parameter?

Yes, a priority system was introduced in [33985] for 4.4.

#2 @lilaeamedia
8 years ago

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

#3 @DrewAPicture
8 years ago

  • Milestone Awaiting Review deleted

#4 @helen
8 years ago

  • Milestone set to 4.4
  • Resolution worksforme deleted
  • Status changed from closed to reopened

Can we take at least a few minutes to see what we can do about compat (stable sort, I guess)? Might not be worth it, but we should consciously decide that.

Who thought we'd ever miss something about PHP 4? :)

#5 @wonderboymusic
8 years ago

  • Keywords has-patch added
  • Owner set to wonderboymusic
  • Status changed from reopened to assigned

@wonderboymusic
8 years ago

#6 @wonderboymusic
8 years ago

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

In 34370:

Help Tabs: when returning help tabs, return them in order of priority, but also return the items in each priority in the order that they were added.

Fixes #33941.

#7 @jorbin
8 years ago

In 36089:

Help Tab Order should be based on the Priority Argument

[34370] made the order that tabs are returned respect the order they are added, however it broke the respect of priority. By using a ksort instead of a sort, we can restore that default behavior. This adjusts the unit tests so that both order added and priority are tested.

Props meitar, swissspidy, jorbin
Fixes #35215. See #33941.

#8 @dd32
8 years ago

In 36104:

Help Tab Order should be based on the Priority Argument

[34370] made the order that tabs are returned respect the order they are added, however it broke the respect of priority. By using a ksort instead of a sort, we can restore that default behavior. This adjusts the unit tests so that both order added and priority are tested.

Merges [36089] to the 4.4 branch.
Props meitar, swissspidy, jorbin
Fixes #35215. See #33941.

Note: See TracTickets for help on using tickets.