Skip to content

Commit fff8dc1

Browse files
authored
Merge branch 'trunk' into fix/30049
2 parents 3f34e28 + 95eb879 commit fff8dc1

File tree

104 files changed

+2663
-729
lines changed

Some content is hidden

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

104 files changed

+2663
-729
lines changed

.github/workflows/pull-request-comments.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ jobs:
195195
const prBody = pr.body ?? '';
196196
const prTitle = pr.title ?? '';
197197
198-
const tracTicketRegex = new RegExp( '(https?://core.trac.wordpress.org/ticket/|Core-)([0-9]+)', 'g' );
198+
const tracTicketRegex = new RegExp( '(https?://core.trac.wordpress.org/ticket/|Core-|ticket:)([0-9]+)', 'g' );
199199
const tracTicketMatches = prBody.match( tracTicketRegex ) || prTitle.match( tracTicketRegex );
200200
201201
if ( ! tracTicketMatches ) {

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
Aaron D. Campbell <[email protected]> <aaroncampbell@602fd350-edb4-49c9-b593-d223f7449a82>
1010
Aaron Jorbin <[email protected]> <jorbin@602fd350-edb4-49c9-b593-d223f7449a82>
1111
Adam Silverstein <[email protected]> <adamsilverstein@602fd350-edb4-49c9-b593-d223f7449a82>
12+
Adam Zieliński <[email protected]> <zieladam@602fd350-edb4-49c9-b593-d223f7449a82>
13+
Adam Zieliński <[email protected]>
1214
Alex King <[email protected]> <alexkingorg@602fd350-edb4-49c9-b593-d223f7449a82>
1315
Alex Shiels <[email protected]> <tellyworth@602fd350-edb4-49c9-b593-d223f7449a82>
1416

package-lock.json

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,11 @@
148148
"clipboard": "2.0.11",
149149
"core-js-url-browser": "3.6.4",
150150
"element-closest": "^3.0.2",
151-
"es-module-shims": "1.8.2",
152151
"formdata-polyfill": "4.0.10",
153152
"hoverintent": "2.2.1",
154153
"imagesloaded": "5.0.0",
155154
"jquery": "3.7.1",
156-
"jquery-color": "2.2.0",
155+
"jquery-color": "3.0.0",
157156
"jquery-form": "4.3.0",
158157
"jquery-hoverintent": "1.10.2",
159158
"json2php": "^0.0.7",

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262
in the parsing, and distance the code from its standard. -->
263263
<rule ref="Generic.PHP.DiscourageGoto.Found">
264264
<exclude-pattern>/wp-includes/html-api/class-wp-html-processor\.php</exclude-pattern>
265+
<exclude-pattern>/wp-includes/html-api/class-wp-html-doctype-info\.php</exclude-pattern>
265266
</rule>
266267

267268
<!-- Exclude sample config from modernization to prevent breaking CI workflows based on WP-CLI scaffold.

src/js/_enqueues/admin/edit-comments.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,7 @@ window.commentReply = {
11881188
if ( er ) {
11891189
$errorNotice.removeClass( 'hidden' );
11901190
$error.html( er );
1191+
wp.a11y.speak( er );
11911192
}
11921193
},
11931194

src/js/_enqueues/admin/site-icon.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@
188188
$iconPreview.removeClass( 'hidden' );
189189
$removeButton.removeClass( 'hidden' );
190190

191+
// Set the global CSS variable for --site-icon-url to the selected image URL.
192+
document.documentElement.style.setProperty(
193+
'--site-icon-url',
194+
'url(' + attributes.url + ')'
195+
);
196+
191197
// If the choose button is not in the update state, swap the classes.
192198
if ( $chooseButton.attr( 'data-state' ) !== '1' ) {
193199
$chooseButton.attr( {

src/js/_enqueues/lib/image-edit.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,16 @@
296296
* Navigate popup menu by arrow keys.
297297
*
298298
* @since 6.3.0
299+
* @since 6.7.0 Added the event parameter.
299300
*
300301
* @memberof imageEdit
301302
*
303+
* @param {Event} event The key or click event.
302304
* @param {HTMLElement} el The current element.
303305
*
304306
* @return {boolean} Always returns false.
305307
*/
306-
browsePopup : function(el) {
308+
browsePopup : function(event, el) {
307309
var $el = $( el );
308310
var $collection = $( el ).parent( '.imgedit-popup-menu' ).find( 'button' );
309311
var $index = $collection.index( $el );
@@ -316,14 +318,14 @@
316318
if ( $next === $last ) {
317319
$next = 0;
318320
}
319-
var $target = false;
321+
var target = false;
320322
if ( event.keyCode === 40 ) {
321-
$target = $collection.get( $next );
323+
target = $collection.get( $next );
322324
} else if ( event.keyCode === 38 ) {
323-
$target = $collection.get( $prev );
325+
target = $collection.get( $prev );
324326
}
325-
if ( $target ) {
326-
$target.focus();
327+
if ( target ) {
328+
target.focus();
327329
event.preventDefault();
328330
}
329331

src/js/_enqueues/wp/updates.js

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@
141141
*/
142142
wp.updates.searchTerm = '';
143143

144+
/**
145+
* Minimum number of characters before an ajax search is fired.
146+
*
147+
* @since 6.7.0
148+
*
149+
* @type {number}
150+
*/
151+
wp.updates.searchMinCharacters = 2;
152+
144153
/**
145154
* Whether filesystem credentials need to be requested from the user.
146155
*
@@ -2977,14 +2986,24 @@
29772986
$pluginInstallSearch.attr( 'aria-describedby', 'live-search-desc' );
29782987
}
29792988

2989+
// Track the previous search string length.
2990+
var previousSearchStringLength = 0;
2991+
wp.updates.shouldSearch = function( searchStringLength ) {
2992+
var shouldSearch = searchStringLength >= wp.updates.searchMinCharacters ||
2993+
previousSearchStringLength > wp.updates.searchMinCharacters;
2994+
previousSearchStringLength = searchStringLength;
2995+
return shouldSearch;
2996+
};
2997+
29802998
/**
29812999
* Handles changes to the plugin search box on the new-plugin page,
29823000
* searching the repository dynamically.
29833001
*
29843002
* @since 4.6.0
29853003
*/
29863004
$pluginInstallSearch.on( 'keyup input', _.debounce( function( event, eventtype ) {
2987-
var $searchTab = $( '.plugin-install-search' ), data, searchLocation;
3005+
var $searchTab = $( '.plugin-install-search' ), data, searchLocation,
3006+
searchStringLength = $pluginInstallSearch.val().length;
29883007

29893008
data = {
29903009
_ajax_nonce: wp.updates.ajaxNonce,
@@ -2995,6 +3014,14 @@
29953014
};
29963015
searchLocation = location.href.split( '?' )[ 0 ] + '?' + $.param( _.omit( data, [ '_ajax_nonce', 'pagenow' ] ) );
29973016

3017+
// Set the autocomplete attribute, turning off autocomplete 1 character before ajax search kicks in.
3018+
if ( wp.updates.shouldSearch( searchStringLength ) ) {
3019+
$pluginInstallSearch.attr( 'autocomplete', 'off' );
3020+
} else {
3021+
$pluginInstallSearch.attr( 'autocomplete', 'on' );
3022+
return;
3023+
}
3024+
29983025
// Clear on escape.
29993026
if ( 'keyup' === event.type && 27 === event.which ) {
30003027
event.target.value = '';
@@ -3054,6 +3081,7 @@
30543081

30553082
if ( $pluginSearch.length ) {
30563083
$pluginSearch.attr( 'aria-describedby', 'live-search-desc' );
3084+
30573085
}
30583086

30593087
/**
@@ -3069,7 +3097,16 @@
30693097
pagenow: pagenow,
30703098
plugin_status: 'all'
30713099
},
3072-
queryArgs;
3100+
queryArgs,
3101+
searchStringLength = $pluginSearch.val().length;
3102+
3103+
// Set the autocomplete attribute, turning off autocomplete 1 character before ajax search kicks in.
3104+
if ( wp.updates.shouldSearch( searchStringLength ) ) {
3105+
$pluginSearch.attr( 'autocomplete', 'off' );
3106+
} else {
3107+
$pluginSearch.attr( 'autocomplete', 'on' );
3108+
return;
3109+
}
30733110

30743111
// Clear on escape.
30753112
if ( 'keyup' === event.type && 27 === event.which ) {

src/js/media/views/site-icon-preview.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var View = wp.media.View,
1515
* @augments Backbone.View
1616
*/
1717
SiteIconPreview = View.extend(/** @lends wp.media.view.SiteIconPreview.prototype */{
18-
className: 'site-icon-preview',
19-
template: wp.template( 'site-icon-preview' ),
18+
className: 'site-icon-preview-crop-modal',
19+
template: wp.template( 'site-icon-preview-crop' ),
2020

2121
ready: function() {
2222
this.controller.imgSelect.setOptions({
@@ -34,8 +34,8 @@ SiteIconPreview = View.extend(/** @lends wp.media.view.SiteIconPreview.prototype
3434
updatePreview: function( img, coords ) {
3535
var rx = 64 / coords.width,
3636
ry = 64 / coords.height,
37-
preview_rx = 16 / coords.width,
38-
preview_ry = 16 / coords.height;
37+
preview_rx = 24 / coords.width,
38+
preview_ry = 24 / coords.height;
3939

4040
$( '#preview-app-icon' ).css({
4141
width: Math.round(rx * this.imageWidth ) + 'px',

0 commit comments

Comments
 (0)