Skip to content

Commit fcd1f21

Browse files
committed
Restore: Sync Gutenberg @ b441348bb7e05af351c250b74283f253acaf9138
See changelog in 0544d56
2 parents 6ff7a32 + 0544d56 commit fcd1f21

206 files changed

Lines changed: 19749 additions & 4279 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/wp-admin/css/common.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@
155155
font-weight: 600;
156156
padding: 15px 23px 14px;
157157
/* Background and color set to prevent false positives in automated accessibility tests. */
158-
background: #f0f0f1;
159-
color: #2271b1;
158+
background: #ffffff;
159+
color: var(--wp-admin-theme-color, #3858e9);
160160
z-index: 100000;
161161
line-height: normal;
162162
}
163163

164164
.screen-reader-shortcut:focus {
165165
top: -25px;
166166
/* Overrides a:focus in the admin. See ticket #56789. */
167-
color: #2271b1;
168-
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
167+
color: var(--wp-admin-theme-color, #3858e9);
168+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
169169
text-decoration: none;
170170
/* Only visible in Windows High Contrast mode */
171171
outline: 2px solid transparent;
@@ -1894,8 +1894,8 @@ p.auto-update-status {
18941894
}
18951895

18961896
#screen-meta-links .show-settings:focus {
1897-
border-color: #2271b1;
1898-
box-shadow: 0 0 0 1px #2271b1;
1897+
border-color: var(--wp-admin-theme-color, #3858e9);
1898+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
18991899
/* Only visible in Windows High Contrast mode */
19001900
outline: 2px solid transparent;
19011901
}
@@ -3445,7 +3445,7 @@ img {
34453445
/* Reset default focus style. */
34463446
box-shadow: none;
34473447
/* Use an inset outline instead, so it's visible also over the current file item. */
3448-
outline: 2px solid #2271b1;
3448+
outline: 2px solid var(--wp-admin-theme-color, #3858e9);
34493449
outline-offset: -2px;
34503450
}
34513451

src/wp-admin/css/login.css

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ body {
1515
}
1616

1717
a {
18-
color: #2271b1;
18+
color: var(--wp-admin-theme-color-darker-10);
1919
transition-property: border, background, color;
2020
transition-duration: .05s;
2121
transition-timing-function: ease-in-out;
@@ -27,7 +27,7 @@ a {
2727

2828
a:hover,
2929
a:active {
30-
color: #135e96;
30+
color: var(--wp-admin-theme-color-darker-20);
3131
}
3232

3333
a:focus {
@@ -44,22 +44,32 @@ p {
4444
.login .message,
4545
.login .notice,
4646
.login .success {
47-
border-left: 4px solid #72aee6;
48-
padding: 12px;
47+
border-left: 4px solid #3858e9;
48+
padding: 8px 12px;
49+
margin-top: 0;
4950
margin-left: 0;
5051
margin-bottom: 20px;
51-
background-color: #fff;
52-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
52+
background-color: transparent;
5353
word-wrap: break-word;
5454
}
5555

56+
.login .message p,
57+
.login .notice p,
58+
.login .success p {
59+
font-size: 13px;
60+
line-height: 1.54;
61+
margin: 0.5em 0;
62+
}
63+
5664
.login .success {
57-
border-left-color: #00a32a;
65+
border-left-color: #4ab866;
66+
background-color: #eff9f1;
5867
}
5968

6069
/* Match border color from common.css */
6170
.login .notice-error {
62-
border-left-color: #d63638;
71+
border-left-color: #cc1818;
72+
background-color: #fcf0f0;
6373
}
6474

6575
.login .login-error-list {
@@ -113,8 +123,8 @@ p {
113123

114124
.login .button.wp-hide-pw:focus {
115125
background: transparent;
116-
border-color: #3582c4;
117-
box-shadow: 0 0 0 1px #3582c4;
126+
border-color: var(--wp-admin-theme-color);
127+
box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
118128
/* Only visible in Windows High Contrast mode */
119129
outline: 2px solid transparent;
120130
}
@@ -360,12 +370,6 @@ p {
360370
padding-right: 2.5rem;
361371
}
362372

363-
.login form .input,
364-
.login input[type="text"],
365-
.login form input[type="checkbox"] {
366-
background: #fff;
367-
}
368-
369373
.js.login-action-resetpass input[type="text"],
370374
.js.login-action-resetpass input[type="password"],
371375
.js.login-action-rp input[type="text"],

src/wp-admin/css/nav-menus.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ input.bulk-select-switcher:focus + .bulk-select-button-label {
221221

222222
.menu-settings-group {
223223
margin: 0 0 10px;
224-
overflow: hidden;
225224
padding-left: 20%;
226225
}
227226

src/wp-admin/css/widgets.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,12 @@ div#widgets-right .closed .widgets-sortables {
582582
padding: 0 15px;
583583
}
584584

585+
.widget-control-actions {
586+
display: flex;
587+
align-items: center;
588+
justify-content: space-between;
589+
}
590+
585591
.editwidget .widget-control-actions {
586592
margin-top: 20px;
587593
}
@@ -724,7 +730,7 @@ div#widgets-right .widget-top:hover,
724730
}
725731

726732
.widgets-chooser .widgets-chooser-selected .widgets-chooser-button {
727-
background: #2271b1;
733+
background: var(--wp-admin-theme-color, #3858e9);
728734
color: #fff;
729735
}
730736

src/wp-admin/edit-form-blocks.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ static function ( $classes ) {
9292
'description',
9393
'gmt_offset',
9494
'home',
95+
'image_sizes',
96+
'image_size_threshold',
97+
'image_output_formats',
98+
'jpeg_interlaced',
99+
'png_interlaced',
100+
'gif_interlaced',
95101
'name',
96102
'site_icon',
97103
'site_icon_url',

src/wp-admin/includes/class-wp-filesystem-ssh2.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,9 +670,11 @@ public function size( $file ) {
670670
* Default 0.
671671
* @param int $atime Optional. Access time to set for file.
672672
* Default 0.
673+
* @return false Always returns false because not implemented.
673674
*/
674675
public function touch( $file, $time = 0, $atime = 0 ) {
675676
// Not implemented.
677+
return false;
676678
}
677679

678680
/**

src/wp-admin/includes/class-wp-media-list-table.php

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,20 @@ class WP_Media_List_Table extends WP_List_Table {
2323
*/
2424
protected $comment_pending_count = array();
2525

26+
/**
27+
* Whether the list table is for detached media.
28+
*
29+
* @since 3.1.0
30+
* @var bool
31+
*/
2632
private $detached;
2733

34+
/**
35+
* Whether the list table is for trash.
36+
*
37+
* @since 3.1.0
38+
* @var bool
39+
*/
2840
private $is_trash;
2941

3042
/**
@@ -53,17 +65,25 @@ public function __construct( $args = array() ) {
5365
}
5466

5567
/**
68+
* Checks if the current user has permissions to upload files.
69+
*
70+
* @since 3.1.0
71+
*
5672
* @return bool Whether the user can upload files.
5773
*/
5874
public function ajax_user_can() {
5975
return current_user_can( 'upload_files' );
6076
}
6177

6278
/**
79+
* Prepares the list of items for displaying.
80+
*
81+
* @since 3.1.0
82+
*
6383
* @global string $mode List table view mode.
6484
* @global WP_Query $wp_query WordPress Query object.
65-
* @global array $post_mime_types
66-
* @global array $avail_post_mime_types
85+
* @global array $post_mime_types An array of post mime types.
86+
* @global array $avail_post_mime_types An array of available post mime types.
6787
*/
6888
public function prepare_items() {
6989
global $mode, $wp_query, $post_mime_types, $avail_post_mime_types;
@@ -117,8 +137,12 @@ public function prepare_items() {
117137
}
118138

119139
/**
120-
* @global array $post_mime_types
121-
* @global array $avail_post_mime_types
140+
* Gets an array of links for the available views on this table.
141+
*
142+
* @since 3.1.0
143+
*
144+
* @global array $post_mime_types An array of post mime types.
145+
* @global array $avail_post_mime_types An array of available post mime types.
122146
* @return array<string, string> An array of links for the available views.
123147
*/
124148
protected function get_views() {
@@ -198,7 +222,11 @@ protected function get_bulk_actions() {
198222
}
199223

200224
/**
201-
* @param string $which
225+
* Displays extra controls between bulk actions and pagination.
226+
*
227+
* @since 3.1.0
228+
*
229+
* @param string $which The location of the extra table nav: 'top' or 'bottom'.
202230
*/
203231
protected function extra_tablenav( $which ) {
204232
if ( 'bar' !== $which ) {
@@ -253,6 +281,9 @@ public function has_items() {
253281
}
254282

255283
/**
284+
* Displays a message when no media items are found.
285+
*
286+
* @since 3.1.0
256287
*/
257288
public function no_items() {
258289
if ( $this->is_trash ) {
@@ -762,8 +793,12 @@ protected function get_default_primary_column_name() {
762793
}
763794

764795
/**
765-
* @param WP_Post $post
766-
* @param string $att_title
796+
* Gets the row actions for a media item.
797+
*
798+
* @since 3.1.0
799+
*
800+
* @param WP_Post $post The current WP_Post object.
801+
* @param string $att_title The attachment title.
767802
* @return array<string, string> An array of row actions.
768803
*/
769804
private function _get_row_actions( $post, $att_title ) {

src/wp-admin/includes/class-wp-ms-sites-list-table.php

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public function __construct( $args = array() ) {
5050
}
5151

5252
/**
53-
* @return bool
53+
* Checks if the current user has permissions to manage sites.
54+
*
55+
* @since 3.1.0
56+
*
57+
* @return bool Whether the user can manage sites.
5458
*/
5559
public function ajax_user_can() {
5660
return current_user_can( 'manage_sites' );
@@ -62,7 +66,7 @@ public function ajax_user_can() {
6266
* @since 3.1.0
6367
*
6468
* @global string $mode List table view mode.
65-
* @global string $s
69+
* @global string $s Search string.
6670
* @global wpdb $wpdb WordPress database abstraction object.
6771
*/
6872
public function prepare_items() {
@@ -206,6 +210,9 @@ public function prepare_items() {
206210
}
207211

208212
/**
213+
* Displays a message when no sites are found.
214+
*
215+
* @since 3.1.0
209216
*/
210217
public function no_items() {
211218
_e( 'No sites found.' );
@@ -286,7 +293,11 @@ protected function get_views() {
286293
}
287294

288295
/**
289-
* @return array
296+
* Gets an associative array of bulk actions for this table.
297+
*
298+
* @since 3.1.0
299+
*
300+
* @return array<string, string> An associative array of bulk actions.
290301
*/
291302
protected function get_bulk_actions() {
292303
$actions = array();
@@ -300,6 +311,10 @@ protected function get_bulk_actions() {
300311
}
301312

302313
/**
314+
* Displays the pagination.
315+
*
316+
* @since 3.1.0
317+
*
303318
* @global string $mode List table view mode.
304319
*
305320
* @param string $which The location of the pagination nav markup: Either 'top' or 'bottom'.
@@ -359,6 +374,10 @@ protected function extra_tablenav( $which ) {
359374
}
360375

361376
/**
377+
* Gets an array of column titles keyed by their column name.
378+
*
379+
* @since 3.1.0
380+
*
362381
* @return string[] Array of column titles keyed by their column name.
363382
*/
364383
public function get_columns() {
@@ -386,7 +405,11 @@ public function get_columns() {
386405
}
387406

388407
/**
389-
* @return array
408+
* Gets an array of sortable columns.
409+
*
410+
* @since 3.1.0
411+
*
412+
* @return array<string, mixed> An array of sortable columns.
390413
*/
391414
protected function get_sortable_columns() {
392415

@@ -640,7 +663,7 @@ public function display_rows() {
640663
*
641664
* @since 5.3.0
642665
*
643-
* @param array $site
666+
* @param array<string, mixed> $site An array of site data.
644667
*/
645668
protected function site_states( $site ) {
646669
$site_states = array();

0 commit comments

Comments
 (0)