Skip to content

Commit 5b89f6e

Browse files
committed
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develop into trac-64704
2 parents 7f38a18 + d45dc6b commit 5b89f6e

14 files changed

Lines changed: 186 additions & 113 deletions

File tree

src/js/_enqueues/admin/common.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,9 +1350,11 @@ $( function() {
13501350
event.stopPropagation();
13511351
$( 'html, body' ).animate( { scrollTop: 0 } );
13521352

1353-
var errorMessage = __( 'Please select at least one item to perform this action on.' );
1353+
var errorMessage = value !== '-1' ?
1354+
__( 'Please select at least one item to perform this action on.' ) :
1355+
__( 'Please select a bulk action to perform.' );
13541356
addAdminNotice( {
1355-
id: 'no-items-selected',
1357+
id: value !== '-1' ? 'no-items-selected' : 'no-bulk-action-selected',
13561358
type: 'error',
13571359
message: errorMessage,
13581360
dismissible: true,

src/wp-admin/css/site-icon.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
button.reset.remove-site-icon {
182182
color: var(--site-icon-removal);
183183
text-decoration: none;
184-
border-color: transparent;
184+
border-color: currentColor;
185185
box-shadow: none;
186186
background: transparent;
187187
}

src/wp-admin/options-general.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
202202
<button
203203
id="js-remove-site-icon"
204204
type="button"
205-
<?php echo has_site_icon() ? 'class="button button-secondary reset remove-site-icon"' : 'class="button button-secondary reset hidden"'; ?>
205+
<?php echo has_site_icon() ? 'class="button button-secondary reset remove-site-icon"' : 'class="button button-secondary reset remove-site-icon hidden"'; ?>
206206
>
207207
<?php _e( 'Remove Site Icon' ); ?>
208208
</button>

src/wp-includes/Requests/src/IdnaEncoder.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,18 @@ protected static function utf8_to_codepoints($input) {
216216
}
217217

218218
if (// Non-shortest form sequences are invalid
219-
$length > 1 && $character <= 0x7F
220-
|| $length > 2 && $character <= 0x7FF
221-
|| $length > 3 && $character <= 0xFFFF
219+
($length > 1 && $character <= 0x7F)
220+
|| ($length > 2 && $character <= 0x7FF)
221+
|| ($length > 3 && $character <= 0xFFFF)
222222
// Outside of range of ucschar codepoints
223223
// Noncharacters
224224
|| ($character & 0xFFFE) === 0xFFFE
225-
|| $character >= 0xFDD0 && $character <= 0xFDEF
225+
|| ($character >= 0xFDD0 && $character <= 0xFDEF)
226226
|| (
227227
// Everything else not in ucschar
228-
$character > 0xD7FF && $character < 0xF900
228+
($character > 0xD7FF && $character < 0xF900)
229229
|| $character < 0x20
230-
|| $character > 0x7E && $character < 0xA0
230+
|| ($character > 0x7E && $character < 0xA0)
231231
|| $character > 0xEFFFD
232232
)
233233
) {

src/wp-includes/Requests/src/Ipv6.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static function check_ipv6($ip) {
161161
list($ipv6, $ipv4) = self::split_v6_v4($ip);
162162
$ipv6 = explode(':', $ipv6);
163163
$ipv4 = explode('.', $ipv4);
164-
if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4) {
164+
if ((count($ipv6) === 8 && count($ipv4) === 1) || (count($ipv6) === 6 && count($ipv4) === 4)) {
165165
foreach ($ipv6 as $ipv6_part) {
166166
// The section can't be empty
167167
if ($ipv6_part === '') {

src/wp-includes/Requests/src/Iri.php

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function __get($name) {
214214
$return = null;
215215
}
216216

217-
if ($return === null && isset($this->normalization[$this->scheme][$name])) {
217+
if ($return === null && isset($this->scheme, $this->normalization[$this->scheme][$name])) {
218218
return $this->normalization[$this->scheme][$name];
219219
}
220220
else {
@@ -669,27 +669,29 @@ protected function remove_iunreserved_percent_encoded($regex_match) {
669669
}
670670

671671
protected function scheme_normalization() {
672-
if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) {
673-
$this->iuserinfo = null;
674-
}
675-
if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) {
676-
$this->ihost = null;
677-
}
678-
if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) {
679-
$this->port = null;
680-
}
681-
if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) {
682-
$this->ipath = '';
672+
if (isset($this->scheme, $this->normalization[$this->scheme])) {
673+
if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) {
674+
$this->iuserinfo = null;
675+
}
676+
if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) {
677+
$this->ihost = null;
678+
}
679+
if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) {
680+
$this->port = null;
681+
}
682+
if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) {
683+
$this->ipath = '';
684+
}
685+
if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) {
686+
$this->iquery = null;
687+
}
688+
if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) {
689+
$this->ifragment = null;
690+
}
683691
}
684692
if (isset($this->ihost) && empty($this->ipath)) {
685693
$this->ipath = '/';
686694
}
687-
if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) {
688-
$this->iquery = null;
689-
}
690-
if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) {
691-
$this->ifragment = null;
692-
}
693695
}
694696

695697
/**

src/wp-includes/Requests/src/Requests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class Requests {
148148
*
149149
* @var string
150150
*/
151-
const VERSION = '2.0.11';
151+
const VERSION = '2.0.17';
152152

153153
/**
154154
* Selected transport name

src/wp-includes/Requests/src/Response/Headers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function offsetGet($offset) {
3535
$offset = strtolower($offset);
3636
}
3737

38-
if (!isset($this->data[$offset])) {
38+
if (!isset($offset, $this->data[$offset])) {
3939
return null;
4040
}
4141

src/wp-includes/Requests/src/Transport/Curl.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public function __construct() {
126126
*/
127127
public function __destruct() {
128128
if (is_resource($this->handle)) {
129+
// phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated
129130
curl_close($this->handle);
130131
}
131132
}
@@ -306,7 +307,10 @@ public function request_multiple($requests, $options) {
306307
}
307308

308309
curl_multi_remove_handle($multihandle, $done['handle']);
309-
curl_close($done['handle']);
310+
if (is_resource($done['handle'])) {
311+
// phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated
312+
curl_close($done['handle']);
313+
}
310314

311315
if (!is_string($responses[$key])) {
312316
$options['hooks']->dispatch('multiple.request.complete', [&$responses[$key], $key]);

src/wp-includes/Requests/src/Transport/Fsockopen.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ public function request($url, $headers = [], $data = [], $options = []) {
148148
// Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#stream_context_set_option
149149
if (function_exists('stream_context_set_options')) {
150150
// PHP 8.3+.
151+
// phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.stream_context_set_optionsFound
151152
stream_context_set_options($context, ['ssl' => $context_options]);
152153
} else {
153154
// PHP < 8.3.
155+
// phpcs:ignore PHPCompatibility.FunctionUse.OptionalToRequiredFunctionParameters
154156
stream_context_set_option($context, ['ssl' => $context_options]);
155157
}
156158
} else {

0 commit comments

Comments
 (0)