Opened 6 years ago
Last modified 2 months ago
#49194 reviewing defect (bug)
Page Template dropdown ordering should be by title, not value
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | minor | Version: | |
| Component: | Posts, Post Types | Keywords: | good-first-bug has-test-info has-patch |
| Focuses: | ui, administration | Cc: |
Description
The ordering of items within the Page Template dropdown field is sorted by the value alphabetically, which often creates what appears to be an unordered display when viewing on the front end.
I this should be changed so the ordering of the dropdown options is based on the alphabetical order of the list items themselves.
Attachments (2)
Change History (7)
#1
@
6 years ago
- Component changed from General to Posts, Post Types
- Focuses ui administration added; accessibility removed
This ticket was mentioned in Slack in #core by sirlouen. View the logs.
3 months ago
#3
@
3 months ago
- Keywords good-first-bug needs-patch has-test-info added
- Milestone changed from Awaiting Review to Future Release
- Type changed from enhancement to defect (bug)
Note: See
TracTickets for help on using
tickets.
Reproduction Report
Description
✅ This report validates that the issue can be reproduced.
Environment
Testing Instructions
a-template.php,b-template.php,c-template.phpget_page_templatesActual Results
Supplemental Artifacts
Added this to functions.php:
function page_templates_admin_menu() { add_menu_page( 'Page Templates', 'Page Templates', 'manage_options', 'page-templates', 'page_templates_admin_page', 'dashicons-media-code', 81 ); } add_action( 'admin_menu', 'page_templates_admin_menu' ); function show_page_templates() { } function page_templates_admin_page() { $templates = get_page_templates(); echo '<div>'; echo '<h1>Page Templates</h1>'; echo '<ul>'; foreach ( $templates as $filename => $name ) { echo '<li>' . $name . ' (' . $filename . ')</li>'; } echo '</ul>'; echo '</div>'; }