Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
?>
<fieldset id="color-picker" class="scheme-list">
Expand Down
26 changes: 26 additions & 0 deletions src/wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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.
*
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @global int $wp_db_version
*/
$wp_db_version = 60717;
$wp_db_version = 60718;

/**
* Holds the TinyMCE version.
Expand Down
Loading