#48411 closed enhancement (worksforme)
Sorting Block Items in Ascending Order
| Reported by: | vinoth06 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 5.2.3 |
| Severity: | normal | Keywords: | 2nd-opinion |
| Cc: | Focuses: |
Description
The Block items are not sorting in any order, it would be good to sort in Ascending order
Example Photo
To sort
- Open wp-includes/js/dist/block-editor.js
- Find the method BlockTypesList()
- Replace var items = _ref.items, with
var items = _ref.items.sort(function (a, b) {
var a1 = a.title, b1 = b.title;
if (a1 == b1) return 0;
return a1 > b1 ? 1 : -1;
}),
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the ticket!
I think the blocks are currently ordered in the supposed usage frequency. Not sure if ordering them by title would provide better experience here.