Skip to content

Commit 5d49607

Browse files
authored
Merge branch 'WordPress:trunk' into trunk
2 parents 774a0ae + 7573385 commit 5d49607

55 files changed

Lines changed: 1087 additions & 594 deletions

Some content is hidden

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

Gruntfile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,9 +1246,6 @@ module.exports = function(grunt) {
12461246
* Update any non-@wordpress deps to the same version as required in the @wordpress packages (e.g. react 16 -> 17).
12471247
*/
12481248
grunt.task.run( 'wp-packages:refresh-deps' );
1249-
1250-
// Build the files stored in the src/ directory.
1251-
grunt.task.run( 'build' );
12521249
} );
12531250

12541251
grunt.renameTask( 'watch', '_watch' );
@@ -1698,6 +1695,12 @@ module.exports = function(grunt) {
16981695
} );
16991696
} );
17001697

1698+
grunt.registerTask( 'wp-packages:sync-stable-blocks', 'Refresh the PHP files referring to stable @wordpress/block-library blocks.', function() {
1699+
grunt.log.writeln( `Syncing stable blocks from @wordpress/block-library to src/` );
1700+
const { main } = require( './tools/release/sync-stable-blocks' );
1701+
main();
1702+
} );
1703+
17011704
// Patch task.
17021705
grunt.renameTask('patch_wordpress', 'patch');
17031706

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
"test:php": "node ./tools/local-env/scripts/docker.js run -T php composer update -W && node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit",
176176
"test:e2e": "node ./tests/e2e/run-tests.js",
177177
"test:visual": "node ./tests/visual-regression/run-tests.js",
178-
"sync-gutenberg-packages": "grunt sync-gutenberg-packages --dev"
178+
"sync-gutenberg-packages": "grunt sync-gutenberg-packages",
179+
"postsync-gutenberg-packages": "grunt wp-packages:sync-stable-blocks && grunt build --dev && grunt build"
179180
}
180181
}

src/js/_enqueues/lib/ajax-response.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,27 @@ window.wpAjax = jQuery.extend( {
5353
parsed.responses.push( response );
5454
} );
5555
if ( err.length ) {
56-
re.html( '<div class="error">' + err + '</div>' );
56+
re.html( '<div class="notice notice-error">' + err + '</div>' );
5757
wp.a11y.speak( err );
5858
} else if ( noticeMessage.length ) {
59-
re.html( '<div class="updated notice is-dismissible"><p>' + noticeMessage + '</p></div>');
59+
re.html( '<div class="notice notice-success is-dismissible"><p>' + noticeMessage + '</p></div>');
6060
jQuery(document).trigger( 'wp-updates-notice-added' );
6161
wp.a11y.speak( noticeMessage );
6262
}
6363
return parsed;
6464
}
65-
if ( isNaN(x) ) { return !re.html('<div class="error"><p>' + x + '</p></div>'); }
66-
x = parseInt(x,10);
67-
if ( -1 === x ) { return !re.html('<div class="error"><p>' + wpAjax.noPerm + '</p></div>'); }
68-
else if ( 0 === x ) { return !re.html('<div class="error"><p>' + wpAjax.broken + '</p></div>'); }
65+
if ( isNaN( x ) ) {
66+
wp.a11y.speak( x );
67+
return ! re.html( '<div class="notice notice-error"><p>' + x + '</p></div>' );
68+
}
69+
x = parseInt( x, 10 );
70+
if ( -1 === x ) {
71+
wp.a11y.speak( wpAjax.noPerm );
72+
return ! re.html( '<div class="notice notice-error"><p>' + wpAjax.noPerm + '</p></div>' );
73+
} else if ( 0 === x ) {
74+
wp.a11y.speak( wpAjax.broken );
75+
return ! re.html( '<div class="notice notice-error"><p>' + wpAjax.broken + '</p></div>' );
76+
}
6977
return true;
7078
},
7179
invalidateForm: function ( selector ) {

src/wp-admin/css/forms.css

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,11 +1070,33 @@ table.form-table td .updated p {
10701070
vertical-align: middle;
10711071
}
10721072

1073+
.form-table.permalink-structure .available-structure-tags {
1074+
margin-top: 8px;
1075+
}
1076+
10731077
.form-table.permalink-structure .available-structure-tags li {
10741078
float: left;
10751079
margin-right: 5px;
10761080
}
10771081

1082+
.form-table.permalink-structure .structure-selection .row {
1083+
margin-bottom: 16px;
1084+
}
1085+
1086+
.form-table.permalink-structure .structure-selection .row > div {
1087+
max-width: calc(100% - 24px);
1088+
display: inline-flex;
1089+
flex-direction: column;
1090+
}
1091+
1092+
.form-table.permalink-structure .structure-selection .row label {
1093+
font-weight: 600;
1094+
}
1095+
1096+
.form-table.permalink-structure .structure-selection .row p {
1097+
margin-top: 0;
1098+
}
1099+
10781100
/*------------------------------------------------------------------------------
10791101
21.0 - Network Admin
10801102
------------------------------------------------------------------------------*/
@@ -1577,14 +1599,20 @@ table.form-table td .updated p {
15771599
}
15781600

15791601
.form-table.permalink-structure td code {
1580-
margin-left: 32px;
15811602
display: inline-block;
15821603
}
15831604

1605+
.form-table.permalink-structure .structure-selection {
1606+
margin-top: 8px;
1607+
}
1608+
1609+
.form-table.permalink-structure .structure-selection .row > div {
1610+
max-width: calc(100% - 36px);
1611+
width: 100%;
1612+
}
1613+
15841614
.form-table.permalink-structure td input[type="text"] {
1585-
margin-left: 32px;
15861615
margin-top: 4px;
1587-
width: 96%;
15881616
}
15891617

15901618
.form-table input.regular-text {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct( $opt = '' ) {
4040

4141
// This class uses the timeout on a per-connection basis, others use it on a per-action basis.
4242
if ( ! defined( 'FS_TIMEOUT' ) ) {
43-
define( 'FS_TIMEOUT', 240 );
43+
define( 'FS_TIMEOUT', 4 * MINUTE_IN_SECONDS );
4444
}
4545

4646
if ( empty( $opt['port'] ) ) {

src/wp-admin/includes/file.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,10 +2007,10 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own
20072007
* to allow for per-transport overriding of the default.
20082008
*/
20092009
if ( ! defined( 'FS_CONNECT_TIMEOUT' ) ) {
2010-
define( 'FS_CONNECT_TIMEOUT', 30 );
2010+
define( 'FS_CONNECT_TIMEOUT', MINUTE_IN_SECONDS / 2 );
20112011
}
20122012
if ( ! defined( 'FS_TIMEOUT' ) ) {
2013-
define( 'FS_TIMEOUT', 30 );
2013+
define( 'FS_TIMEOUT', MINUTE_IN_SECONDS / 2 );
20142014
}
20152015

20162016
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->has_errors() ) {

src/wp-admin/includes/misc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {
11901190

11911191
if ( $user ) {
11921192
$error = array(
1193+
'name' => $user->display_name,
11931194
/* translators: %s: User's display name. */
11941195
'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ),
11951196
);

src/wp-admin/includes/update.php

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ function find_core_update( $version, $locale ) {
220220
}
221221

222222
/**
223+
* Returns core update footer message.
224+
*
223225
* @since 2.3.0
224226
*
225227
* @param string $msg
@@ -275,6 +277,8 @@ function core_update_footer( $msg = '' ) {
275277
}
276278

277279
/**
280+
* Returns core update notification message.
281+
*
278282
* @since 2.3.0
279283
*
280284
* @global string $pagenow The filename of the current screen.
@@ -370,6 +374,8 @@ function update_right_now_message() {
370374
}
371375

372376
/**
377+
* Retrieves plugins with updates available.
378+
*
373379
* @since 2.9.0
374380
*
375381
* @return array
@@ -389,6 +395,8 @@ function get_plugin_updates() {
389395
}
390396

391397
/**
398+
* Adds a callback to display update information for plugins with updates available.
399+
*
392400
* @since 2.9.0
393401
*/
394402
function wp_plugin_update_rows() {
@@ -585,6 +593,8 @@ function wp_plugin_update_row( $file, $plugin_data ) {
585593
}
586594

587595
/**
596+
* Retrieves themes with updates available.
597+
*
588598
* @since 2.9.0
589599
*
590600
* @return array
@@ -606,6 +616,8 @@ function get_theme_updates() {
606616
}
607617

608618
/**
619+
* Adds a callback to display update information for themes with updates available.
620+
*
609621
* @since 3.1.0
610622
*/
611623
function wp_theme_update_rows() {
@@ -801,6 +813,8 @@ function wp_theme_update_row( $theme_key, $theme ) {
801813
}
802814

803815
/**
816+
* Displays maintenance nag HTML message.
817+
*
804818
* @since 2.7.0
805819
*
806820
* @global int $upgrading
@@ -849,6 +863,8 @@ function maintenance_nag() {
849863
/**
850864
* Prints the JavaScript templates for update admin notices.
851865
*
866+
* @since 4.6.0
867+
*
852868
* Template takes one argument with four values:
853869
*
854870
* param {object} data {
@@ -859,8 +875,6 @@ function maintenance_nag() {
859875
* @type string message The notice's message.
860876
* @type string type The type of update the notice is for. Either 'plugin' or 'theme'.
861877
* }
862-
*
863-
* @since 4.6.0
864878
*/
865879
function wp_print_admin_notice_templates() {
866880
?>
@@ -930,6 +944,8 @@ function wp_print_admin_notice_templates() {
930944
/**
931945
* Prints the JavaScript templates for update and deletion rows in list tables.
932946
*
947+
* @since 4.6.0
948+
*
933949
* The update template takes one argument with four values:
934950
*
935951
* param {object} data {
@@ -951,8 +967,6 @@ function wp_print_admin_notice_templates() {
951967
* @type string name Plugin name.
952968
* @type string colspan The number of table columns this row spans.
953969
* }
954-
*
955-
* @since 4.6.0
956970
*/
957971
function wp_print_update_row_templates() {
958972
?>

src/wp-admin/nav-menus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ function wp_nav_menu_max_depth( $classes ) {
652652
);
653653
else : // Locations tab.
654654
$locations_overview = '<p>' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '</p>';
655-
$locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s dropdown.</strong> When you are finished, <strong>click Save Changes</strong>' ) . '</li>';
655+
$locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s dropdown</strong>. When you are finished, <strong>click Save Changes</strong>' ) . '</li>';
656656
$locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
657657
$locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that theme location' ) . '</li></ul>';
658658

0 commit comments

Comments
 (0)