From 2b85a1b68bd1651929a7c9486ecd4c7b8e295213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Fri, 23 Jan 2026 11:04:47 +0100 Subject: [PATCH 1/2] Admin: Change default admin color scheme to 'modern'. 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 --- src/wp-admin/includes/misc.php | 2 +- src/wp-admin/includes/upgrade.php | 26 ++++++++++++++++++++++++++ src/wp-includes/user.php | 6 +++--- src/wp-includes/version.php | 2 +- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index 6c00a0ffb1951..6f6b1e2511fda 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -1018,7 +1018,7 @@ function admin_color_scheme_picker( $user_id ) { $current_color = get_user_option( 'admin_color', $user_id ); if ( empty( $current_color ) || ! isset( $_wp_admin_css_colors[ $current_color ] ) ) { - $current_color = 'fresh'; + $current_color = 'modern'; } ?>
diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 04b7016b83bc9..52698a647281a 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -886,6 +886,10 @@ function upgrade_all() { upgrade_682(); } + if ( $wp_current_db_version < 60718 ) { + upgrade_700(); + } + maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -2481,6 +2485,28 @@ function ( $url ) { } } +/** + * Executes changes made in WordPress 7.0. + * + * @ignore + * @since 7.0.0 + * + * @global wpdb $wpdb WordPress database abstraction object. + */ +function upgrade_700() { + global $wpdb; + + // Migrate users with 'fresh' admin color to 'modern'. + $wpdb->query( + $wpdb->prepare( + "UPDATE $wpdb->usermeta SET meta_value = %s WHERE meta_key = %s AND meta_value = %s", + 'modern', + 'admin_color', + 'fresh' + ) + ); +} + /** * Executes network-level upgrade routines. * diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 7885efe531b49..545329d8d776d 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -2184,7 +2184,7 @@ function validate_username( $username ) { * @type string $comment_shortcuts Whether to enable comment moderation keyboard * shortcuts for the user. Accepts 'true' or 'false' * as a string literal, not boolean. Default 'false'. - * @type string $admin_color Admin color scheme for the user. Default 'fresh'. + * @type string $admin_color Admin color scheme for the user. Default 'modern'. * @type bool $use_ssl Whether the user should always access the admin over * https. Default false. * @type string $user_registered Date the user registered in UTC. Format is 'Y-m-d H:i:s'. @@ -2457,7 +2457,7 @@ function wp_insert_user( $userdata ) { $meta['comment_shortcuts'] = empty( $userdata['comment_shortcuts'] ) || 'false' === $userdata['comment_shortcuts'] ? 'false' : 'true'; - $admin_color = empty( $userdata['admin_color'] ) ? 'fresh' : $userdata['admin_color']; + $admin_color = empty( $userdata['admin_color'] ) ? 'modern' : $userdata['admin_color']; $meta['admin_color'] = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $admin_color ); $meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? '0' : '1'; @@ -2546,7 +2546,7 @@ function wp_insert_user( $userdata ) { * @type string $rich_editing Whether to enable the rich-editor for the user. Default 'true'. * @type string $syntax_highlighting Whether to enable the rich code editor for the user. Default 'true'. * @type string $comment_shortcuts Whether to enable keyboard shortcuts for the user. Default 'false'. - * @type string $admin_color The color scheme for a user's admin screen. Default 'fresh'. + * @type string $admin_color The color scheme for a user's admin screen. Default 'modern'. * @type int|bool $use_ssl Whether to force SSL on the user's admin area. 0|false if SSL * is not forced. * @type string $show_admin_bar_front Whether to show the admin bar on the front end for the user. diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index f1d2d950ab737..74a772b2163f3 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -23,7 +23,7 @@ * * @global int $wp_db_version */ -$wp_db_version = 60717; +$wp_db_version = 60718; /** * Holds the TinyMCE version. From 62e4f62dce0d0305138bcba2258184cb6957064d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Fri, 23 Jan 2026 22:03:39 +0100 Subject: [PATCH 2/2] Admin: Rename 'Default' admin color scheme to 'Classic'. --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index f5dacf28f7327..550b7b2f5c281 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -4885,7 +4885,7 @@ function register_admin_color_schemes() { wp_admin_css_color( 'fresh', - _x( 'Default', 'admin color scheme' ), + _x( 'Classic', 'admin color scheme' ), false, array( '#1d2327', '#2c3338', '#2271b1', '#72aee6' ), array(