Skip to content

Commit 67014be

Browse files
Merge branch 'trunk' into add/trash-child-notes-with-parent
2 parents edfe396 + 4b4e950 commit 67014be

File tree

11 files changed

+91
-88
lines changed

11 files changed

+91
-88
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ module.exports = function(grunt) {
11591159
}
11601160

11611161
// Fetch a list of the files that Twemoji supplies.
1162-
query = 'query={repository(owner: "jdecked", name: "twemoji") {object(expression: "v17.0.1:assets/svg") {... on Tree {entries {name}}}}}';
1162+
query = 'query={repository(owner: "jdecked", name: "twemoji") {object(expression: "gh-pages:v/17.0.2/svg") {... on Tree {entries {name}}}}}';
11631163
files = spawn( 'gh', [ 'api', 'graphql', '-f', query] );
11641164

11651165
if ( 0 !== files.status ) {

src/js/_enqueues/vendor/twemoji.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ var twemoji = (function (
534534
how = {callback: how};
535535
}
536536

537-
// WP start
537+
// WP start
538538
// Allow passing of the doNotParse() callback in the settings.
539539
// The callback is used in `grabAllTextNodes()` (DOM mode only) as a filter
540540
// that allows bypassing of some of the text nodes. It gets the current subnode as argument.

src/wp-admin/includes/class-theme-installer-skin.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,24 @@ public function after() {
121121

122122
$install_actions = array();
123123

124-
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) && ! $theme_info->is_block_theme() ) {
125-
$customize_url = add_query_arg(
126-
array(
127-
'theme' => urlencode( $stylesheet ),
128-
'return' => urlencode( admin_url( 'web' === $this->type ? 'theme-install.php' : 'themes.php' ) ),
129-
),
130-
admin_url( 'customize.php' )
131-
);
124+
if ( current_user_can( 'edit_theme_options' ) && ( $theme_info->is_block_theme() || current_user_can( 'customize' ) ) ) {
125+
if ( $theme_info->is_block_theme() ) {
126+
$customize_url = add_query_arg(
127+
array(
128+
'wp_theme_preview' => urlencode( $stylesheet ),
129+
'return' => urlencode( admin_url( 'web' === $this->type ? 'theme-install.php' : 'themes.php' ) ),
130+
),
131+
admin_url( 'site-editor.php' )
132+
);
133+
} else {
134+
$customize_url = add_query_arg(
135+
array(
136+
'theme' => urlencode( $stylesheet ),
137+
'return' => urlencode( admin_url( 'web' === $this->type ? 'theme-install.php' : 'themes.php' ) ),
138+
),
139+
admin_url( 'customize.php' )
140+
);
141+
}
132142

133143
$install_actions['preview'] = sprintf(
134144
'<a href="%s" class="hide-if-no-customize load-customize">' .

src/wp-admin/includes/dashboard.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ function wp_dashboard_recent_comments( $total_items = 5 ) {
10741074
$comments_query['status'] = 'approve';
10751075
}
10761076

1077+
$comments_count = 0;
10771078
do {
10781079
$possible = get_comments( $comments_query );
10791080

src/wp-admin/options-general.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -480,20 +480,11 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
480480

481481
foreach ( $date_formats as $format ) {
482482
echo "\t<label><input type='radio' name='date_format' value='" . esc_attr( $format ) . "'";
483-
484483
if ( get_option( 'date_format' ) === $format ) { // checked() uses "==" rather than "===".
485484
echo " checked='checked'";
486485
$custom = false;
487486
}
488-
489-
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span>' .
490-
'<code>' . esc_html( $format ) . '</code>';
491-
492-
if ( __( 'F j, Y' ) === $format ) {
493-
echo ' ' . __( '(Site language default)' );
494-
}
495-
496-
echo "</label><br />\n";
487+
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
497488
}
498489

499490
echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
@@ -534,20 +525,11 @@ class="<?php echo esc_attr( $classes_for_button ); ?>"
534525

535526
foreach ( $time_formats as $format ) {
536527
echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
537-
538528
if ( get_option( 'time_format' ) === $format ) { // checked() uses "==" rather than "===".
539529
echo " checked='checked'";
540530
$custom = false;
541531
}
542-
543-
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span>' .
544-
'<code>' . esc_html( $format ) . '</code>';
545-
546-
if ( __( 'g:i a' ) === $format ) {
547-
echo ' ' . __( '(Site language default)' );
548-
}
549-
550-
echo "</label><br />\n";
532+
echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
551533
}
552534

553535
echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';

src/wp-admin/themes.php

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@
645645
><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
646646

647647
<?php
648-
if ( ! $theme['blockTheme'] && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
648+
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
649649
/* translators: %s: Theme name. */
650650
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
651651
?>
@@ -1034,15 +1034,13 @@ function wp_theme_auto_update_setting_template() {
10341034
aria-label="<?php echo esc_attr( $aria_label ); ?>"
10351035
><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
10361036

1037-
<# if ( ! data.blockTheme ) { #>
1038-
<?php
1039-
/* translators: %s: Theme name. */
1040-
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
1041-
?>
1042-
<a class="button button-primary hide-if-no-customize disabled"
1043-
aria-label="<?php echo esc_attr( $live_preview_aria_label ); ?>"
1044-
><?php _e( 'Live Preview' ); ?></a>
1045-
<# } #>
1037+
<?php
1038+
/* translators: %s: Theme name. */
1039+
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
1040+
?>
1041+
<a class="button button-primary hide-if-no-customize disabled"
1042+
aria-label="<?php echo esc_attr( $live_preview_aria_label ); ?>"
1043+
><?php _e( 'Live Preview' ); ?></a>
10461044
<# } #>
10471045
<# } #>
10481046
</div>
@@ -1261,16 +1259,14 @@ function wp_theme_auto_update_setting_template() {
12611259

12621260
<div class="inactive-theme">
12631261
<# if ( data.compatibleWP && data.compatiblePHP ) { #>
1264-
<# if ( ! data.blockTheme ) { #>
1265-
<?php
1266-
/* translators: %s: Theme name. */
1267-
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
1268-
?>
1269-
<a class="button button-primary load-customize hide-if-no-customize"
1270-
href="{{{ data.actions.customize }}}"
1271-
aria-label="<?php echo esc_attr( $live_preview_aria_label ); ?>"
1272-
><?php _e( 'Live Preview' ); ?></a>
1273-
<# } #>
1262+
<?php
1263+
/* translators: %s: Theme name. */
1264+
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
1265+
?>
1266+
<a class="button button-primary load-customize hide-if-no-customize"
1267+
href="{{{ data.actions.customize }}}"
1268+
aria-label="<?php echo esc_attr( $live_preview_aria_label ); ?>"
1269+
><?php _e( 'Live Preview' ); ?></a>
12741270

12751271
<# if ( data.actions.activate ) { #>
12761272
<?php
@@ -1283,15 +1279,13 @@ function wp_theme_auto_update_setting_template() {
12831279
><?php _e( 'Activate' ); ?></a>
12841280
<# } #>
12851281
<# } else { #>
1286-
<# if ( ! data.blockTheme ) { #>
1287-
<?php
1288-
/* translators: %s: Theme name. */
1289-
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
1290-
?>
1291-
<a class="button button-primary hide-if-no-customize disabled"
1292-
aria-label="<?php echo esc_attr( $live_preview_aria_label ); ?>"
1293-
><?php _e( 'Live Preview' ); ?></a>
1294-
<# } #>
1282+
<?php
1283+
/* translators: %s: Theme name. */
1284+
$live_preview_aria_label = sprintf( _x( 'Live Preview %s', 'theme' ), '{{ data.name }}' );
1285+
?>
1286+
<a class="button button-primary hide-if-no-customize disabled"
1287+
aria-label="<?php echo esc_attr( $live_preview_aria_label ); ?>"
1288+
><?php _e( 'Live Preview' ); ?></a>
12951289

12961290
<# if ( data.actions.activate ) { #>
12971291
<?php

src/wp-includes/class-wp-date-query.php

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -482,17 +482,25 @@ public function validate_column( $column ) {
482482
global $wpdb;
483483

484484
$valid_columns = array(
485-
'post_date',
486-
'post_date_gmt',
487-
'post_modified',
488-
'post_modified_gmt',
489-
'comment_date',
490-
'comment_date_gmt',
491-
'user_registered',
492-
'registered',
493-
'last_updated',
485+
'post_date', // Part of $wpdb->posts.
486+
'post_date_gmt', // Part of $wpdb->posts.
487+
'post_modified', // Part of $wpdb->posts.
488+
'post_modified_gmt', // Part of $wpdb->posts.
489+
'comment_date', // Part of $wpdb->comments.
490+
'comment_date_gmt', // Part of $wpdb->comments.
491+
'user_registered', // Part of $wpdb->users.
494492
);
495493

494+
if ( is_multisite() ) {
495+
$valid_columns = array_merge(
496+
$valid_columns,
497+
array(
498+
'registered', // Part of $wpdb->blogs.
499+
'last_updated', // Part of $wpdb->blogs.
500+
)
501+
);
502+
}
503+
496504
// Attempt to detect a table prefix.
497505
if ( ! str_contains( $column, '.' ) ) {
498506
/**
@@ -525,11 +533,14 @@ public function validate_column( $column ) {
525533
$wpdb->users => array(
526534
'user_registered',
527535
),
528-
$wpdb->blogs => array(
536+
);
537+
538+
if ( is_multisite() ) {
539+
$known_columns[ $wpdb->blogs ] = array(
529540
'registered',
530541
'last_updated',
531-
),
532-
);
542+
);
543+
}
533544

534545
// If it's a known column name, add the appropriate table prefix.
535546
foreach ( $known_columns as $table_name => $table_columns ) {

src/wp-includes/class-wpdb.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ class wpdb {
467467
*
468468
* @since 3.0.0
469469
*
470-
* @var string
470+
* @var string|null
471471
*/
472472
public $blogs;
473473

@@ -476,7 +476,7 @@ class wpdb {
476476
*
477477
* @since 5.1.0
478478
*
479-
* @var string
479+
* @var string|null
480480
*/
481481
public $blogmeta;
482482

@@ -485,7 +485,7 @@ class wpdb {
485485
*
486486
* @since 3.0.0
487487
*
488-
* @var string
488+
* @var string|null
489489
*/
490490
public $registration_log;
491491

@@ -494,7 +494,7 @@ class wpdb {
494494
*
495495
* @since 3.0.0
496496
*
497-
* @var string
497+
* @var string|null
498498
*/
499499
public $signups;
500500

@@ -503,7 +503,7 @@ class wpdb {
503503
*
504504
* @since 3.0.0
505505
*
506-
* @var string
506+
* @var string|null
507507
*/
508508
public $site;
509509

@@ -512,7 +512,7 @@ class wpdb {
512512
*
513513
* @since 3.0.0
514514
*
515-
* @var string
515+
* @var string|null
516516
*/
517517
public $sitecategories;
518518

@@ -521,7 +521,7 @@ class wpdb {
521521
*
522522
* @since 3.0.0
523523
*
524-
* @var string
524+
* @var string|null
525525
*/
526526
public $sitemeta;
527527

src/wp-includes/formatting.php

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

tests/phpunit/tests/formatting/emoji.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*/
77
class Tests_Formatting_Emoji extends WP_UnitTestCase {
88

9-
private $png_cdn = 'https://s.w.org/images/core/emoji/17.0.1-1/72x72/';
10-
private $svg_cdn = 'https://s.w.org/images/core/emoji/17.0.1-1/svg/';
9+
private $png_cdn = 'https://s.w.org/images/core/emoji/17.0.2/72x72/';
10+
private $svg_cdn = 'https://s.w.org/images/core/emoji/17.0.2/svg/';
1111

1212
/**
1313
* @ticket 63842
@@ -122,15 +122,15 @@ public function test_wp_emoji_list_returns_data() {
122122
$entities = _wp_emoji_list( 'entities' );
123123
$this->assertNotEmpty( $entities, 'Entities should not be empty' );
124124
$this->assertIsArray( $entities, 'Entities should be an array' );
125-
// Emoji 15 contains 3718 entities, this number will only increase.
126-
$this->assertGreaterThanOrEqual( 3718, count( $entities ), 'Entities should contain at least 3718 items' );
125+
// Emoji 17 contains 4007 entities, this number will only increase.
126+
$this->assertGreaterThanOrEqual( 4007, count( $entities ), 'Entities should contain at least 4007 items' );
127127
$this->assertSame( $default, $entities, 'Entities should be returned by default' );
128128

129129
$partials = _wp_emoji_list( 'partials' );
130130
$this->assertNotEmpty( $partials, 'Partials should not be empty' );
131131
$this->assertIsArray( $partials, 'Partials should be an array' );
132-
// Emoji 15 contains 1424 partials, this number will only increase.
133-
$this->assertGreaterThanOrEqual( 1424, count( $partials ), 'Partials should contain at least 1424 items' );
132+
// Emoji 17 contains 1438 partials, this number will only increase.
133+
$this->assertGreaterThanOrEqual( 1438, count( $partials ), 'Partials should contain at least 1438 items' );
134134

135135
$this->assertNotSame( $default, $partials );
136136
}

0 commit comments

Comments
 (0)