Justoverclock for every extension hook with an ItemList, you can specify a priority as the third parameter to add()
, like items.add('name', item, 10)
.
I think a higher number means it's earlier, and a lower number means it's later.
In many places, Flarum specifies priorities, like in the SignUpModal, where you can see priorities 30, 20, 10 and -10 are used. You can use numbers in between to specify where your content should go.
However there are some places that are missing priorities (all have priority 0), in that case any number above zero will put your content before, and any number below zero will put your content after. There's no way to insert in between without removing and re-adding an item.
When multiple items have the same priority, the order in which extensions were loaded determines the order.