Skip to content

Commit f71f028

Browse files
committed
Restore: Sync Gutenberg @ 022d8dd3d461f91b15c1f0410649d3ebb027207f
See changelog in f328908
2 parents 665137e + f328908 commit f71f028

83 files changed

Lines changed: 4312 additions & 1956 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,11 +1575,11 @@ div.error.notice-alt {
15751575

15761576
.notice-info {
15771577
border-left-color: #3858e9;
1578-
background-color: transparent;
1578+
background-color: #fff;
15791579
}
15801580

15811581
.notice-info.notice-alt {
1582-
background-color: transparent;
1582+
background-color: #fff;
15831583
}
15841584

15851585
#plugin-information-footer .update-now:not(.button-disabled):before {

src/wp-admin/css/customize-controls.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ body.trashing #publish-settings {
273273
margin: 0;
274274
position: absolute;
275275
top: 50%;
276-
transform: translateY(-50%);
276+
transform: translateY(-50%) !important;
277277
right: 0;
278+
background: #fff !important;
278279
}
279280

280281
.preview-link-wrapper {
@@ -284,7 +285,7 @@ body.trashing #publish-settings {
284285
.customize-copy-preview-link:before,
285286
.customize-copy-preview-link:after {
286287
content: "";
287-
height: 32px;
288+
height: 40px;
288289
position: absolute;
289290
background: #fff;
290291
top: 0;

src/wp-admin/css/dashboard.css

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,19 @@
219219
}
220220

221221
.welcome-panel .welcome-panel-close {
222+
display: flex;
223+
align-items: center;
222224
position: absolute;
223225
top: 10px;
224226
right: 10px;
225-
padding: 10px 15px 10px 24px;
227+
padding: 10px 15px;
226228
font-size: 13px;
227229
line-height: 1.23076923; /* Chrome rounding, needs to be 16px equivalent */
228230
text-decoration: none;
229231
z-index: 1; /* Raise above the version image. */
230232
}
231233

232234
.welcome-panel .welcome-panel-close:before {
233-
position: absolute;
234-
top: 8px;
235-
left: 0;
236235
transition: all .1s ease-in-out;
237236
content: '\f335';
238237
font-size: 24px;
@@ -721,14 +720,6 @@ body #dashboard-widgets .postbox form .submit {
721720
margin-bottom: 10px;
722721
}
723722

724-
#dashboard_right_now .inside {
725-
padding: 0;
726-
}
727-
728-
#dashboard_right_now .main {
729-
padding: 16px 16px 11px;
730-
}
731-
732723
#dashboard_right_now .main p {
733724
margin: 0;
734725
}

src/wp-admin/css/edit.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,16 @@
7676
pointer-events: none;
7777
}
7878

79+
#titlewrap .skiplink {
80+
background: #fff;
81+
line-height: 2.30769231; /* 30px for 32px min-height */
82+
min-height: 32px;
83+
right: 4px;
84+
}
85+
7986
#titlewrap .skiplink:focus {
8087
clip: inherit;
8188
clip-path: inherit;
82-
right: 4px;
8389
top: 4px;
8490
width: auto;
8591
}
@@ -1061,10 +1067,6 @@ form#tags-filter {
10611067
#edit-slug-box {
10621068
padding: 0;
10631069
}
1064-
1065-
#titlewrap .skiplink:focus {
1066-
top: 5px;
1067-
}
10681070
}
10691071

10701072
@media only screen and (max-width: 1004px) {

src/wp-admin/css/list-tables.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {
14241424
content: "\f463";
14251425
content: "\f463" / '';
14261426
display: inline-block;
1427-
font: normal 20px/1.9 dashicons; /* line-height 1.9 = 38px to match button */
1427+
font: normal 16px/1.875 dashicons; /* line-height 1.875 = 30px to match button */
14281428
margin: 0 5px 0 -2px;
14291429
-webkit-font-smoothing: antialiased;
14301430
-moz-osx-font-smoothing: grayscale;
@@ -1452,6 +1452,14 @@ ul.cat-checklist input[name="post_category[]"]:indeterminate::before {
14521452
content: "\f147" / '';
14531453
}
14541454

1455+
.plugin-card .updated-message:before,
1456+
.plugin-card .updating-message:before {
1457+
line-height: 1;
1458+
position: relative;
1459+
top: -2px;
1460+
vertical-align: middle;
1461+
}
1462+
14551463
.plugin-install-php #the-list {
14561464
display: flex;
14571465
flex-wrap: wrap;
@@ -1567,6 +1575,13 @@ div.action-links,
15671575
margin: 0; /* Override existing margins */
15681576
}
15691577

1578+
/* Use compact size for space-constrained plugin cards */
1579+
.plugin-action-buttons li .button {
1580+
min-height: 32px;
1581+
line-height: 2.30769231; /* 30px for 32px min-height */
1582+
padding: 0 12px;
1583+
}
1584+
15701585
.plugin-card h3 {
15711586
margin: 0 12px 12px 0;
15721587
font-size: 18px;

src/wp-admin/css/login.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ p {
4949
margin-top: 0;
5050
margin-left: 0;
5151
margin-bottom: 20px;
52-
background-color: transparent;
52+
background-color: #fff;
5353
word-wrap: break-word;
5454
}
5555

src/wp-admin/css/themes.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ body.js .theme-browser.search-loading {
114114
}
115115

116116
/* Use compact size for space-constrained theme cards */
117+
.theme-browser .theme .theme-actions .button.updated-message,
118+
.theme-browser .theme .theme-actions .button.updating-message,
117119
.theme-browser .theme .theme-actions .button {
118120
float: none;
119121
margin-left: 3px;
@@ -122,6 +124,14 @@ body.js .theme-browser.search-loading {
122124
padding: 0 12px;
123125
}
124126

127+
.theme-browser .theme .theme-actions .button.updated-message::before,
128+
.theme-browser .theme .theme-actions .button.updating-message::before {
129+
line-height: 1;
130+
vertical-align: text-bottom;
131+
position: relative;
132+
top: 2px;
133+
}
134+
125135
/* Secondary buttons need white background for visibility on semi-transparent overlay */
126136
.theme-browser .theme .theme-actions .button:not(.button-primary) {
127137
background: #fff;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,8 @@ public function column_title( $post ) {
490490

491491
if ( current_user_can( 'edit_post', $post->ID ) && ! $this->is_trash ) {
492492
$link_start = sprintf(
493-
'<a href="%s" aria-label="%s">',
493+
'<a href="%s">',
494494
get_edit_post_link( $post->ID ),
495-
/* translators: %s: Attachment title. */
496-
esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $title ) )
497495
);
498496
$link_end = '</a>';
499497
}

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

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
3737
*
3838
* @see WP_List_Table::__construct() for more information on default arguments.
3939
*
40-
* @global string $status
41-
* @global int $page
40+
* @global string $status The current theme status.
41+
* @global int $page The current page number.
4242
*
4343
* @param array $args An associative array of arguments.
4444
*/
@@ -70,15 +70,19 @@ public function __construct( $args = array() ) {
7070
}
7171

7272
/**
73-
* @return array
73+
* Gets the list of CSS classes for the table tag.
74+
*
75+
* @return string[] The list of CSS classes.
7476
*/
7577
protected function get_table_classes() {
7678
// @todo Remove and add CSS for .themes.
7779
return array( 'widefat', 'plugins' );
7880
}
7981

8082
/**
81-
* @return bool
83+
* Checks if the current user has permissions to perform AJAX actions.
84+
*
85+
* @return bool True if the current user has permissions, false otherwise.
8286
*/
8387
public function ajax_user_can() {
8488
if ( $this->is_site_themes ) {
@@ -89,12 +93,14 @@ public function ajax_user_can() {
8993
}
9094

9195
/**
92-
* @global string $status
93-
* @global array $totals
94-
* @global int $page
95-
* @global string $orderby
96-
* @global string $order
97-
* @global string $s
96+
* Prepares the themes list for display.
97+
*
98+
* @global string $status The current theme status.
99+
* @global array<string, int> $totals An array of theme counts for each status.
100+
* @global int $page The current page number.
101+
* @global string $orderby The column to order the themes list by.
102+
* @global string $order The order of the themes list (ASC or DESC).
103+
* @global string $s The search string.
98104
*/
99105
public function prepare_items() {
100106
global $status, $totals, $page, $orderby, $order, $s;
@@ -261,8 +267,10 @@ public function prepare_items() {
261267
}
262268

263269
/**
264-
* @param WP_Theme $theme
265-
* @return bool
270+
* Filters a theme by the search term.
271+
*
272+
* @param WP_Theme $theme The WP_Theme object to check.
273+
* @return bool True if the theme matches the search term, false otherwise.
266274
*/
267275
public function _search_callback( $theme ) {
268276
static $term = null;
@@ -290,11 +298,14 @@ public function _search_callback( $theme ) {
290298

291299
// Not used by any core columns.
292300
/**
293-
* @global string $orderby
294-
* @global string $order
295-
* @param array $theme_a
296-
* @param array $theme_b
297-
* @return int
301+
* Compares the order of two themes by a specific field.
302+
*
303+
* @global string $orderby The column to order the themes list by.
304+
* @global string $order The order of the themes list (ASC or DESC).
305+
*
306+
* @param WP_Theme $theme_a The first theme to compare.
307+
* @param WP_Theme $theme_b The second theme to compare.
308+
* @return int 0 if equal, -1 if the first is less than the second, 1 if more.
298309
*/
299310
public function _order_callback( $theme_a, $theme_b ) {
300311
global $orderby, $order;
@@ -308,6 +319,7 @@ public function _order_callback( $theme_a, $theme_b ) {
308319
}
309320

310321
/**
322+
* Displays the message when there are no items to list.
311323
*/
312324
public function no_items() {
313325
if ( $this->has_items ) {
@@ -318,7 +330,9 @@ public function no_items() {
318330
}
319331

320332
/**
321-
* @return string[] Array of column titles keyed by their column name.
333+
* Gets the list of columns for the list table.
334+
*
335+
* @return array<string, string> Array of column titles keyed by their column name.
322336
*/
323337
public function get_columns() {
324338
$columns = array(
@@ -335,7 +349,9 @@ public function get_columns() {
335349
}
336350

337351
/**
338-
* @return array
352+
* Gets the list of sortable columns for the list table.
353+
*
354+
* @return array<string, array<int, mixed>> An array of sortable columns.
339355
*/
340356
protected function get_sortable_columns() {
341357
return array(
@@ -355,9 +371,12 @@ protected function get_primary_column_name() {
355371
}
356372

357373
/**
358-
* @global array $totals
359-
* @global string $status
360-
* @return array
374+
* Gets the list of views (statuses) for the list table.
375+
*
376+
* @global array<string, int> $totals An array of theme counts for each status.
377+
* @global string $status The current theme status.
378+
*
379+
* @return array<string, string> The list of views.
361380
*/
362381
protected function get_views() {
363382
global $totals, $status;
@@ -451,9 +470,11 @@ protected function get_views() {
451470
}
452471

453472
/**
454-
* @global string $status
473+
* Gets the list of bulk actions for the list table.
474+
*
475+
* @global string $status The current theme status.
455476
*
456-
* @return array
477+
* @return array<string, string> The list of bulk actions.
457478
*/
458479
protected function get_bulk_actions() {
459480
global $status;
@@ -532,9 +553,9 @@ public function column_cb( $item ) {
532553
*
533554
* @since 4.3.0
534555
*
535-
* @global string $status
536-
* @global int $page
537-
* @global string $s
556+
* @global string $status The current theme status.
557+
* @global int $page The current page number.
558+
* @global string $s The search string.
538559
*
539560
* @param WP_Theme $theme The current WP_Theme object.
540561
*/
@@ -689,8 +710,8 @@ public function column_name( $theme ) {
689710
*
690711
* @since 4.3.0
691712
*
692-
* @global string $status
693-
* @global array $totals
713+
* @global string $status The current theme status.
714+
* @global array<string, int> $totals An array of theme counts for each status.
694715
*
695716
* @param WP_Theme $theme The current WP_Theme object.
696717
*/
@@ -777,8 +798,8 @@ public function column_description( $theme ) {
777798
*
778799
* @since 5.5.0
779800
*
780-
* @global string $status
781-
* @global int $page
801+
* @global string $status The current theme status.
802+
* @global int $page The current page number.
782803
*
783804
* @param WP_Theme $theme The current WP_Theme object.
784805
*/
@@ -979,10 +1000,12 @@ public function single_row_columns( $item ) {
9791000
}
9801001

9811002
/**
982-
* @global string $status
983-
* @global array $totals
1003+
* Handles the output for a single table row.
1004+
*
1005+
* @global string $status The current theme status.
1006+
* @global array<string, int> $totals An array of theme counts for each status.
9841007
*
985-
* @param WP_Theme $theme
1008+
* @param WP_Theme $theme The current WP_Theme object.
9861009
*/
9871010
public function single_row( $theme ) {
9881011
global $status, $totals;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,10 +1138,8 @@ public function column_title( $post ) {
11381138

11391139
if ( $can_edit_post && 'trash' !== $post->post_status ) {
11401140
printf(
1141-
'<a class="row-title" href="%s" aria-label="%s">%s%s</a>',
1141+
'<a class="row-title" href="%s">%s%s</a>',
11421142
get_edit_post_link( $post->ID ),
1143-
/* translators: %s: Post title. */
1144-
esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $title ) ),
11451143
$pad,
11461144
$title
11471145
);

0 commit comments

Comments
 (0)