Skip to content

Commit 8bcd8c1

Browse files
committed
Merge branch 'trunk' into 63443-zip-tests-not-checking-potential-clean-directory
2 parents b8041f3 + c09b7fb commit 8bcd8c1

27 files changed

+530
-142
lines changed

Gruntfile.js

Lines changed: 1 addition & 4 deletions
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 ) {
@@ -1785,9 +1785,6 @@ module.exports = function(grunt) {
17851785
const ignoredFiles = [
17861786
'build/wp-includes/js/dist/components.js',
17871787
'build/wp-includes/js/dist/data.js',
1788-
// We have a problem where Yjs is being bundled in core-data.
1789-
// Ignoring this file until we find a solution.
1790-
'build/wp-includes/js/dist/core-data.js',
17911788
];
17921789
const files = buildFiles.reduce( ( acc, path ) => {
17931790
// Skip excluded paths and any path that isn't a file.

src/js/_enqueues/vendor/twemoji.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ var twemoji = (function (
44
https://github.com/jdecked/twemoji/blob/gh-pages/LICENSE
55
*/
66

7+
/*
8+
* Note: this file was modified in two places to add support for a doNotParse() callback.
9+
* The modifications are surrounded by `// WP start` and `// WP end` comments.
10+
*/
11+
712
// WARNING: this file is generated automatically via
813
// `node scripts/build.js`
914
// please update its `createTwemoji` function
@@ -305,6 +310,14 @@ var twemoji = (function (
305310
// should not be parsed as script, style, and others
306311
else if (nodeType === 1 && !('ownerSVGElement' in subnode) &&
307312
!shouldntBeParsed.test(subnode.nodeName.toLowerCase())) {
313+
314+
// WP start
315+
// Use doNotParse() callback if set.
316+
if ( twemoji.doNotParse && twemoji.doNotParse( subnode ) ) {
317+
continue;
318+
}
319+
// WP end
320+
308321
grabAllTextNodes(subnode, allText);
309322
}
310323
}
@@ -520,6 +533,14 @@ var twemoji = (function (
520533
if (!how || typeof how === 'function') {
521534
how = {callback: how};
522535
}
536+
537+
// WP start
538+
// Allow passing of the doNotParse() callback in the settings.
539+
// The callback is used in `grabAllTextNodes()` (DOM mode only) as a filter
540+
// that allows bypassing of some of the text nodes. It gets the current subnode as argument.
541+
twemoji.doNotParse = how.doNotParse;
542+
// WP end
543+
523544
// if first argument is string, inject html <img> tags
524545
// otherwise use the DOM tree and parse text nodes only
525546
return (typeof what === 'string' ? parseString : parseNode)(what, {

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/class-wp-comments-list-table.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ public function prepare_items() {
9999
$comment_status = 'all';
100100
}
101101

102-
$comment_type = ! empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
102+
$comment_type = '';
103+
104+
if ( ! empty( $_REQUEST['comment_type'] ) && 'note' !== $_REQUEST['comment_type'] ) {
105+
$comment_type = $_REQUEST['comment_type'];
106+
}
103107

104108
$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
105109

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/includes/schema.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,10 @@ function populate_options( array $options = array() ) {
560560

561561
// 6.4.0
562562
'wp_attachment_pages_enabled' => 0,
563+
564+
// 6.9.0
565+
'wp_notes_notify' => 1,
566+
563567
);
564568

565569
// 3.3.0

src/wp-admin/options-discussion.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@
160160
<label for="moderation_notify">
161161
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked( '1', get_option( 'moderation_notify' ) ); ?> />
162162
<?php _e( 'A comment is held for moderation' ); ?> </label>
163+
<br />
164+
<label for="wp_notes_notify">
165+
<input name="wp_notes_notify" type="checkbox" id="wp_notes_notify" value="1" <?php checked( '1', get_option( 'wp_notes_notify' ) ); ?> />
166+
<?php _e( 'Anyone posts a note' ); ?> </label>
167+
163168
</fieldset></td>
164169
</tr>
165170
<?php $before_comment_appears_title = __( 'Before a comment appears' ); ?>

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/options.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
'comment_order',
126126
'comment_registration',
127127
'show_comments_cookies_opt_in',
128+
'wp_notes_notify',
128129
),
129130
'media' => array(
130131
'thumbnail_size_w',

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

0 commit comments

Comments
 (0)