Opened 19 months ago
Last modified 4 weeks ago
#61752 new enhancement
Plugin and theme editors should show files in alpha order
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch needs-unit-tests has-test-info |
| Focuses: | Cc: |
Description (last modified by )
I've been informed this is supposedly "Date created" order. But in my opinion that's not very practical for navigating files.
I would prefer to see the folders in alpha order and then the files in alpha order.
Attachments (4)
Change History (15)
This ticket was mentioned in PR #7161 on WordPress/wordpress-develop by @iflairwebtechnologies.
18 months ago
#2
- Keywords has-patch added
#3
@
18 months ago
Hello @helgatheviking
We have add change in code so we can see alpha order in plugin file and theme file
Attachment :-
https://tinyurl.com/2y2vxzwg
https://tinyurl.com/2d5h62g9
#4
@
18 months ago
That's a huge improvement! Would it be too much to ask that
- All folders are alpha sorted and then all files...
Folder A/
Folder B/
a-file.php
b-file.php
- files like Theme Functions are displayed by their actual file name.
comments.php (Comments)
footer.php (Theme Footers)
functions.php (Theme Functions)
instead of
Comments (comments.php)
Theme Footer (footer.php)
Theme Functions (functions.php)
Though I think they might be getting sorted by their file, I am always looking for functions.php and never for Theme Functions. It may matter less with actual alpha sorting, but I think it would be a nice touch to make this area more usable. (Might be entirely out of scope for this ticket though)
#5
@
5 weeks ago
Thanks for the feedback.
I agree that folders should be listed first (alphabetically), followed by files (alphabetically).
To keep the scope minimal, I’m happy to limit this ticket to basic alphabetical ordering only, without changing display labels (e.g., “Theme Functions”).
I can update the patch accordingly. Please let me know if that direction works.
#6
@
5 weeks ago
- Keywords needs-testing needs-unit-tests added
Updated patch to sort folders first and files second, both alphabetically.
No label or UI changes included to keep scope minimal.
#7
@
5 weeks ago
Cool! Nice improvement. Will the files all be sorted by their name and not their label? If so, I think it's fine to handle reversing label in another patch. But at the same time,
Theme Functions (functions.php)
to
functions.php (Theme Functions)
does fit it with alphabetizing in my opinion.
#8
@
5 weeks ago
Thanks! Yes — the sorting is based strictly on the actual filenames and directory names, not on their display labels. The goal of this patch is to improve consistency and predictability by alphabetizing entries without altering existing labels or UI text.
I agree that reversing the label format (e.g. functions.php (Theme Functions)) could better align with alphabetization, but that would be a UI/UX change and feels better suited for a separate follow-up patch to keep this change focused.
#9
@
5 weeks ago
This patch alphabetizes the theme and plugin editor file lists based on actual filenames for consistent ordering. UI labels remain unchanged.
#10
@
4 weeks ago
Test Report
Patch tested: https://core.trac.wordpress.org/attachment/ticket/61752/plugin-theme-editor-alpha-order.patch
Steps to Reproduce or Test
- Navigate to Tools in the WordPress admin dashboard.
- Open Theme File Editor and Plugin File Editor.
- 🐞 Observe that the files are not sorted alphabetically.
Expected Results
- ✅ Files should be displayed in alphabetical order.
Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 143.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.1
Actual Results
Before applying the patch
- ❌ Files were not sorted alphabetically.
After applying the bugfix patch
- ✅ Issue resolved. Files are now displayed in alphabetical order.
Screenshots
| Before Apply Patch | After Apply Patch ✅ |
|
|
|
|




Plugin editor file order