Skip to content

Commit edf7bda

Browse files
committed
Merge remote-tracking branch 'upstream' into add/twemoji-17.0
2 parents 3f82687 + 4d43703 commit edf7bda

File tree

24 files changed

+1014
-267
lines changed

24 files changed

+1014
-267
lines changed

package-lock.json

Lines changed: 121 additions & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,32 +82,32 @@
8282
"@wordpress/autop": "4.33.1",
8383
"@wordpress/base-styles": "6.9.1",
8484
"@wordpress/blob": "4.33.1",
85-
"@wordpress/block-directory": "5.33.3",
86-
"@wordpress/block-editor": "15.6.1",
87-
"@wordpress/block-library": "9.33.2",
85+
"@wordpress/block-directory": "5.33.5",
86+
"@wordpress/block-editor": "15.6.3",
87+
"@wordpress/block-library": "9.33.4",
8888
"@wordpress/block-serialization-default-parser": "5.33.1",
8989
"@wordpress/blocks": "15.6.1",
9090
"@wordpress/commands": "1.33.1",
9191
"@wordpress/components": "30.6.1",
9292
"@wordpress/compose": "7.33.1",
93-
"@wordpress/core-commands": "1.33.1",
94-
"@wordpress/core-data": "7.33.1",
95-
"@wordpress/customize-widgets": "5.33.2",
93+
"@wordpress/core-commands": "1.33.3",
94+
"@wordpress/core-data": "7.33.3",
95+
"@wordpress/customize-widgets": "5.33.4",
9696
"@wordpress/data": "10.33.1",
9797
"@wordpress/data-controls": "4.33.1",
98-
"@wordpress/dataviews": "10.1.1",
98+
"@wordpress/dataviews": "10.1.2",
9999
"@wordpress/date": "5.33.1",
100100
"@wordpress/deprecated": "4.33.1",
101101
"@wordpress/dom": "4.33.1",
102102
"@wordpress/dom-ready": "4.33.1",
103-
"@wordpress/edit-post": "8.33.3",
104-
"@wordpress/edit-site": "6.33.3",
105-
"@wordpress/edit-widgets": "6.33.2",
106-
"@wordpress/editor": "14.33.3",
103+
"@wordpress/edit-post": "8.33.5",
104+
"@wordpress/edit-site": "6.33.5",
105+
"@wordpress/edit-widgets": "6.33.4",
106+
"@wordpress/editor": "14.33.5",
107107
"@wordpress/element": "6.33.1",
108108
"@wordpress/escape-html": "3.33.1",
109-
"@wordpress/fields": "0.25.3",
110-
"@wordpress/format-library": "5.33.1",
109+
"@wordpress/fields": "0.25.5",
110+
"@wordpress/format-library": "5.33.3",
111111
"@wordpress/hooks": "4.33.1",
112112
"@wordpress/html-entities": "4.33.1",
113113
"@wordpress/i18n": "6.6.1",
@@ -123,15 +123,15 @@
123123
"@wordpress/media-utils": "5.33.1",
124124
"@wordpress/notices": "5.33.1",
125125
"@wordpress/nux": "9.33.1",
126-
"@wordpress/patterns": "2.33.1",
126+
"@wordpress/patterns": "2.33.3",
127127
"@wordpress/plugins": "7.33.1",
128128
"@wordpress/preferences": "4.33.1",
129129
"@wordpress/preferences-persistence": "2.33.1",
130130
"@wordpress/primitives": "4.33.1",
131131
"@wordpress/priority-queue": "3.33.1",
132132
"@wordpress/private-apis": "1.33.1",
133133
"@wordpress/redux-routine": "5.33.1",
134-
"@wordpress/reusable-blocks": "5.33.1",
134+
"@wordpress/reusable-blocks": "5.33.3",
135135
"@wordpress/rich-text": "7.33.1",
136136
"@wordpress/router": "1.33.1",
137137
"@wordpress/server-side-render": "6.9.1",
@@ -143,9 +143,9 @@
143143
"@wordpress/upload-media": "0.18.1",
144144
"@wordpress/url": "4.33.1",
145145
"@wordpress/viewport": "6.33.1",
146-
"@wordpress/views": "1.0.2",
146+
"@wordpress/views": "1.0.3",
147147
"@wordpress/warning": "3.33.1",
148-
"@wordpress/widgets": "4.33.1",
148+
"@wordpress/widgets": "4.33.3",
149149
"@wordpress/wordcount": "4.33.1",
150150
"backbone": "1.6.0",
151151
"clipboard": "2.0.11",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
1717

1818
/**
1919
* @since 2.5.0
20-
* @var resource
20+
* @var FTP\Connection|resource|false
2121
*/
2222
public $link;
2323

src/wp-admin/includes/class-wp-site-health.php

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@ public function get_test_php_version() {
728728

729729
$result = array(
730730
'label' => sprintf(
731-
/* translators: %s: The recommended PHP version. */
732-
__( 'Your site is running a recommended version of PHP (%s)' ),
731+
/* translators: %s: The server PHP version. */
732+
__( 'Your site is running PHP %s' ),
733733
PHP_VERSION
734734
),
735735
'status' => 'good',
@@ -739,11 +739,7 @@ public function get_test_php_version() {
739739
),
740740
'description' => sprintf(
741741
'<p>%s</p>',
742-
sprintf(
743-
/* translators: %s: The minimum recommended PHP version. */
744-
__( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site&#8217;s performance. The minimum recommended version of PHP is %s.' ),
745-
$response ? $response['recommended_version'] : ''
746-
)
742+
__( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site&#8217;s performance.' )
747743
),
748744
'actions' => sprintf(
749745
'<p><a href="%s" target="_blank">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
@@ -755,8 +751,36 @@ public function get_test_php_version() {
755751
'test' => 'php_version',
756752
);
757753

754+
if ( ! $response ) {
755+
$result['label'] = sprintf(
756+
/* translators: %s: The server PHP version. */
757+
__( 'Unable to determine the status of the current PHP version (%s)' ),
758+
PHP_VERSION
759+
);
760+
$result['status'] = 'recommended';
761+
$result['description'] = '<p><em>' . sprintf(
762+
/* translators: %s is the URL to the Serve Happy docs page. */
763+
__( 'Unable to access the WordPress.org API for <a href="%s">Serve Happy</a>.' ),
764+
'https://codex.wordpress.org/WordPress.org_API#Serve_Happy'
765+
) . '</em></p>' . $result['description'];
766+
return $result;
767+
}
768+
769+
$result['description'] .= '<p>' . sprintf(
770+
/* translators: %s: The minimum recommended PHP version. */
771+
__( 'The minimum recommended version of PHP is %s.' ),
772+
$response['recommended_version']
773+
) . '</p>';
774+
758775
// PHP is up to date.
759-
if ( ! $response || version_compare( PHP_VERSION, $response['recommended_version'], '>=' ) ) {
776+
if ( version_compare( PHP_VERSION, $response['recommended_version'], '>=' ) ) {
777+
$result['label'] = sprintf(
778+
/* translators: %s: The server PHP version. */
779+
__( 'Your site is running a recommended version of PHP (%s)' ),
780+
PHP_VERSION
781+
);
782+
$result['status'] = 'good';
783+
760784
return $result;
761785
}
762786

src/wp-includes/assets/script-loader-packages.min.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/wp-includes/block-supports/typography.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ function wp_typography_get_preset_inline_style_value( $style_value, $css_propert
306306
* @return string Filtered block content.
307307
*/
308308
function wp_render_typography_support( $block_content, $block ) {
309-
if ( ! empty( $block['attrs']['fitText'] ) ) {
309+
if ( ! empty( $block['attrs']['fitText'] ) && ! is_admin() ) {
310310
wp_enqueue_script_module( '@wordpress/block-editor/utils/fit-text-frontend' );
311311
}
312312
if ( ! isset( $block['attrs']['style']['typography']['fontSize'] ) ) {

src/wp-includes/blocks/accordion-heading/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "core/accordion-heading",
55
"title": "Accordion Heading",
66
"category": "design",
7-
"description": "Toggles the accordion panel.",
7+
"description": "Displays a heading that toggles the accordion panel.",
88
"parent": [ "core/accordion-item" ],
99
"usesContext": [
1010
"core/accordion-icon-position",

src/wp-includes/blocks/archives.php

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ function render_block_core_archives( $attributes ) {
6666
$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
6767

6868
$block_content = '<label for="' . $dropdown_id . '" class="wp-block-archives__label' . $show_label . '">' . esc_html( $title ) . '</label>
69-
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
69+
<select id="' . esc_attr( $dropdown_id ) . '" name="archive-dropdown">
7070
<option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';
7171

72+
// Inject the dropdown script immediately after the select dropdown.
73+
$block_content .= block_core_archives_build_dropdown_script( $dropdown_id );
74+
7275
return sprintf(
7376
'<div %1$s>%2$s</div>',
7477
$wrapper_attributes,
@@ -106,6 +109,55 @@ function render_block_core_archives( $attributes ) {
106109
);
107110
}
108111

112+
/**
113+
* Generates the inline script for an archives dropdown field.
114+
*
115+
* @since 6.9.0
116+
*
117+
* @param string $dropdown_id ID of the dropdown field.
118+
*
119+
* @return string Returns the dropdown onChange redirection script.
120+
*/
121+
function block_core_archives_build_dropdown_script( $dropdown_id ) {
122+
ob_start();
123+
124+
$exports = array( $dropdown_id, home_url() );
125+
?>
126+
<script>
127+
( ( [ dropdownId, homeUrl ] ) => {
128+
const dropdown = document.getElementById( dropdownId );
129+
function onSelectChange() {
130+
setTimeout( () => {
131+
if ( 'escape' === dropdown.dataset.lastkey ) {
132+
return;
133+
}
134+
if ( dropdown.value ) {
135+
location.href = dropdown.value;
136+
}
137+
}, 250 );
138+
}
139+
function onKeyUp( event ) {
140+
if ( 'Escape' === event.key ) {
141+
dropdown.dataset.lastkey = 'escape';
142+
} else {
143+
delete dropdown.dataset.lastkey;
144+
}
145+
}
146+
function onClick() {
147+
delete dropdown.dataset.lastkey;
148+
}
149+
dropdown.addEventListener( 'keyup', onKeyUp );
150+
dropdown.addEventListener( 'click', onClick );
151+
dropdown.addEventListener( 'change', onSelectChange );
152+
} )( <?php echo wp_json_encode( $exports, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
153+
</script>
154+
<?php
155+
return wp_get_inline_script_tag(
156+
trim( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) ) .
157+
"\n//# sourceURL=" . rawurlencode( __FUNCTION__ )
158+
);
159+
}
160+
109161
/**
110162
* Register archives block.
111163
*

src/wp-includes/blocks/blocks-json.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
'name' => 'core/accordion-heading',
105105
'title' => 'Accordion Heading',
106106
'category' => 'design',
107-
'description' => 'Toggles the accordion panel.',
107+
'description' => 'Displays a heading that toggles the accordion panel.',
108108
'parent' => array(
109109
'core/accordion-item'
110110
),
@@ -2516,9 +2516,13 @@
25162516
)
25172517
),
25182518
'supports' => array(
2519+
'html' => false,
25192520
'className' => false,
25202521
'customClassName' => false,
2521-
'reusable' => false
2522+
'lock' => false,
2523+
'reusable' => false,
2524+
'renaming' => false,
2525+
'blockVisibility' => false
25222526
),
25232527
'editorStyle' => 'wp-block-freeform-editor'
25242528
),
@@ -3825,7 +3829,10 @@
38253829
'customClassName' => false,
38263830
'inserter' => false,
38273831
'html' => false,
3832+
'lock' => false,
38283833
'reusable' => false,
3834+
'renaming' => false,
3835+
'blockVisibility' => false,
38293836
'interactivity' => array(
38303837
'clientNavigation' => true
38313838
)

src/wp-includes/blocks/categories.php

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,32 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
104104
?>
105105
<script>
106106
( ( [ dropdownId, homeUrl ] ) => {
107-
document.getElementById( dropdownId ).addEventListener( 'change', ( event ) => {
108-
const dropdown = /** @type {HTMLSelectElement} */ ( event.target );
109-
if ( dropdown.value && dropdown.value !== '-1' ) {
110-
const url = new URL( homeUrl );
111-
url.searchParams.set( dropdown.name, dropdown.value );
112-
location.href = url.href;
107+
const dropdown = document.getElementById( dropdownId );
108+
function onSelectChange() {
109+
setTimeout( () => {
110+
if ( 'escape' === dropdown.dataset.lastkey ) {
111+
return;
112+
}
113+
if ( dropdown.value && dropdown instanceof HTMLSelectElement ) {
114+
const url = new URL( homeUrl );
115+
url.searchParams.set( dropdown.name, dropdown.value );
116+
location.href = url.href;
117+
}
118+
}, 250 );
119+
}
120+
function onKeyUp( event ) {
121+
if ( 'Escape' === event.key ) {
122+
dropdown.dataset.lastkey = 'escape';
123+
} else {
124+
delete dropdown.dataset.lastkey;
113125
}
114-
} );
126+
}
127+
function onClick() {
128+
delete dropdown.dataset.lastkey;
129+
}
130+
dropdown.addEventListener( 'keyup', onKeyUp );
131+
dropdown.addEventListener( 'click', onClick );
132+
dropdown.addEventListener( 'change', onSelectChange );
115133
} )( <?php echo wp_json_encode( $exports, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
116134
</script>
117135
<?php

0 commit comments

Comments
 (0)