diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 3c48cc9476..8267ad50be 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -128,12 +128,13 @@ if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message' ), $_SERVER['REQUEST_URI'] ); } -$mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid'; $modes = array( 'grid', 'list' ); if ( isset( $_GET['mode'] ) && in_array( $_GET['mode'], $modes, true ) ) { $mode = $_GET['mode']; update_user_option( get_current_user_id(), 'media_library_mode', $mode ); +} else { + $mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid'; } if ( 'grid' === $mode ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 8097b8f7a6..73a06be9a1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57795'; +$wp_version = '6.6-alpha-57796'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.