-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Admin: Change default admin color scheme to 'modern' #10782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Admin: Change default admin color scheme to 'modern' #10782
Conversation
Updates the default admin color scheme from 'fresh' to 'modern' for WordPress 7.0. - Bumps database version to trigger upgrade routine. - Adds upgrade_700() to migrate existing users with 'fresh' to 'modern'. - Updates default in wp_insert_user() for new users. - Updates fallback in admin_color_scheme_picker(). props: karmatosed
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Do we needs to change admin color here https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/admin-header.php#L196?
62e4f62 to
5c1f47a
Compare
|
@mukeshpanchal27 Great catch! I found a few more similar instances where |
peterwilsoncc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a note inline.
On the profile page fresh was given the display name default and moved to the first item in the list. I think it would be good to keep the default scheme there to avoid the need for people to guess if they try another scheme and decided to go back to the default.
Hacked mock up from screen grab:
Wrap the 'fresh' to 'modern' admin color migration in a database version check to prevent re-running on subsequent version bumps during the release cycle. Also refactors to use `$wpdb->update()` for cleaner code. Props peterwilsoncc.
Moves the Modern color scheme (the new default) to the first position in the Administration Color Scheme picker on the profile page. Classic and Light follow immediately after, making it easy for users to find and return to familiar schemes after trying other options. Props peterwilsoncc.
|
@peterwilsoncc thanks for the feedback :) all items should now be covered. Would love another review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request changes the default WordPress admin color scheme from 'fresh' to 'modern' as part of WordPress 7.0. The existing 'fresh' color scheme is renamed to 'Classic' and a database migration ensures existing users are transitioned to the new 'modern' default.
Changes:
- Updated default admin color scheme from 'fresh' to 'modern' across all core files
- Renamed 'fresh' color scheme display name to 'Classic'
- Added database migration (upgrade_700) to update existing users from 'fresh' to 'modern'
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/wp-includes/version.php | Increments database version to 60718 for the upgrade routine |
| src/wp-includes/user.php | Updates default admin_color value from 'fresh' to 'modern' in wp_insert_user() and documentation |
| src/wp-includes/script-loader.php | Changes fallback color scheme from 'fresh' to 'modern' in wp_style_loader_src() |
| src/wp-includes/general-template.php | Renames 'fresh' color scheme label from 'Default' to 'Classic' |
| src/wp-admin/includes/user.php | Updates default admin_color fallback from 'fresh' to 'modern' in edit_user() |
| src/wp-admin/includes/upgrade.php | Adds upgrade_700() function to migrate users from 'fresh' to 'modern' color scheme |
| src/wp-admin/includes/misc.php | Reorders color schemes to show 'modern' first and updates fallback from 'fresh' to 'modern' |
| src/wp-admin/customize.php | Changes sanitize_html_class fallback from 'fresh' to 'modern' |
| src/wp-admin/admin-header.php | Changes sanitize_html_class fallback from 'fresh' to 'modern' |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Trac ticket: https://core.trac.wordpress.org/ticket/64546
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.