Skip to content

Commit

Permalink
Merge branch 'trunk' into fix/cache-key-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Apr 30, 2024
2 parents 4c95d7e + f9e5c6f commit 900df75
Show file tree
Hide file tree
Showing 124 changed files with 25,346 additions and 237 deletions.
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<group>ms-files</group>
<group>ms-required</group>
<group>external-http</group>
<group>html-api-html5lib-tests</group>
</exclude>
</groups>
<logging>
Expand Down
36 changes: 32 additions & 4 deletions src/js/_enqueues/wp/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -2938,13 +2938,41 @@

wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' );

var successMessage = null;

if ( success ) {
if ( 'plugin' === response.update ) {
successMessage = sprintf(
/* translators: %s: Number of plugins. */
_n( '%s plugin successfully updated.', '%s plugins successfully updated.', success ),
success
);
} else {
successMessage = sprintf(
/* translators: %s: Number of themes. */
_n( '%s theme successfully updated.', '%s themes successfully updated.', success ),
success
);
}
}

var errorMessage = null;

if ( error ) {
errorMessage = sprintf(
/* translators: %s: Number of failed updates. */
_n( '%s update failed.', '%s updates failed.', error ),
error
);
}

wp.updates.addAdminNotice( {
id: 'bulk-action-notice',
className: 'bulk-action-notice',
successes: success,
errors: error,
errorMessages: errorMessages,
type: response.update
successMessage: successMessage,
errorMessage: errorMessage,
errorMessages: errorMessages,
type: response.update
} );

$bulkActionNotice = $( '#bulk-action-notice' ).on( 'click', 'button', function() {
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
.privacy-php .about__header-title h1,
.contribute-php .about__header-title h1 {
/* Fluid font size scales on browser size 960px - 1200px. */
font-size: clamp(2rem, 10vw - 3rem, 4rem);
font-size: clamp(2rem, 20vw - 9rem, 4rem);
}

.about__header-text {
Expand Down Expand Up @@ -655,7 +655,7 @@
.privacy-php .about__header-title h1,
.contribute-php .about__header-title h1 {
/* Fluid font size scales on browser size 600px - 960px. */
font-size: clamp(3rem, 6.67vw - 0.5rem, 4.5rem);
font-size: clamp(2rem, 20vw - 9rem, 4rem);
}

.about__header-navigation .nav-tab {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/edit-form-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@

if ( 'post' === $post_type || 'page' === $post_type ) {
$inserting_media = '<p>' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the &#8220;Create a new gallery&#8221; button.' ) . '</p>';
$inserting_media .= '<p>' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. <a href="https://developer.wordpress.org/advanced-administration/wordpress/oembed/">Learn more about embeds</a>.' ) . '</p>';
$inserting_media .= '<p>' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. <a href="https://wordpress.org/documentation/article/embeds/">Learn more about embeds</a>.' ) . '</p>';

get_current_screen()->add_help_tab(
array(
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/erase-personal-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
'title' => __( 'Plugin Data' ),
'content' =>
'<p>' . __( 'Many plugins may collect or store personal data either in the WordPress database or remotely. Any Erase Personal Data request should delete data from plugins as well.' ) . '</p>' .
'<p>' . __( 'If you are a plugin author, you can <a href="https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/" target="_blank">learn more about how to add support for the Personal Data Eraser to a plugin here</a>.' ) . '</p>' .
$privacy_policy_guide,
$privacy_policy_guide .
'<p>' . __( 'If you are a plugin author, you can learn more about <a href="https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/">how to add the Personal Data Eraser to a plugin</a>.' ) . '</p>',
)
);

Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/export-personal-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
'title' => __( 'Plugin Data' ),
'content' =>
'<p>' . __( 'Many plugins may collect or store personal data either in the WordPress database or remotely. Any Export Personal Data request should include data from plugins as well.' ) . '</p>' .
'<p>' . __( 'Plugin authors can <a href="https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-exporter-to-your-plugin/" target="_blank">learn more about how to add the Personal Data Exporter to a plugin here</a>.' ) . '</p>' .
$privacy_policy_guide,
$privacy_policy_guide .
'<p>' . __( 'If you are a plugin author, you can learn more about <a href="https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-exporter-to-your-plugin/">how to add the Personal Data Exporter to a plugin</a>.' ) . '</p>',
)
);

Expand Down
20 changes: 14 additions & 6 deletions src/wp-admin/includes/class-language-pack-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,26 +332,34 @@ public function check_package( $source, $remote_source ) {
// Check that the folder contains a valid language.
$files = $wp_filesystem->dirlist( $remote_source );

// Check to see if a .po and .mo exist in the folder.
$po = false;
$mo = false;
// Check to see if the expected files exist in the folder.
$po = false;
$mo = false;
$php = false;
foreach ( (array) $files as $file => $filedata ) {
if ( str_ends_with( $file, '.po' ) ) {
$po = true;
} elseif ( str_ends_with( $file, '.mo' ) ) {
$mo = true;
} elseif ( str_ends_with( $file, '.l10n.php' ) ) {
$php = true;
}
}

if ( $php ) {
return $source;
}

if ( ! $mo || ! $po ) {
return new WP_Error(
'incompatible_archive_pomo',
$this->strings['incompatible_archive'],
sprintf(
/* translators: 1: .po, 2: .mo */
__( 'The language pack is missing either the %1$s or %2$s files.' ),
/* translators: 1: .po, 2: .mo, 3: .l10n.php */
__( 'The language pack is missing either the %1$s, %2$s, or %3$s files.' ),
'<code>.po</code>',
'<code>.mo</code>'
'<code>.mo</code>',
'<code>.l10n.php</code>'
)
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/wp-admin/includes/class-wp-upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public function generic_strings() {
/* translators: %s: Directory name. */
$this->strings['fs_no_folder'] = __( 'Unable to locate needed folder (%s).' );

$this->strings['no_package'] = __( 'Package not available.' );
$this->strings['download_failed'] = __( 'Download failed.' );
$this->strings['installing_package'] = __( 'Installing the latest version&#8230;' );
$this->strings['no_files'] = __( 'The package contains no files.' );
Expand Down Expand Up @@ -527,7 +528,10 @@ public function install_package( $args = array() ) {
set_time_limit( 300 );
}

if ( empty( $source ) || empty( $destination ) ) {
if (
( ! is_string( $source ) || '' === $source || trim( $source ) !== $source ) ||
( ! is_string( $destination ) || '' === $destination || trim( $destination ) !== $destination )
) {
return new WP_Error( 'bad_request', $this->strings['bad_request'] );
}
$this->skin->feedback( 'installing_package' );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function wxr_term_meta( $term ) {
*
* @param int[] $post_ids Optional. Array of post IDs to filter the query by.
*/
function wxr_authors_list( array $post_ids = null ) {
function wxr_authors_list( ?array $post_ids = null ) {
global $wpdb;

if ( ! empty( $post_ids ) ) {
Expand Down
46 changes: 6 additions & 40 deletions src/wp-admin/includes/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,48 +923,14 @@ function wp_print_admin_notice_templates() {
<div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
</script>
<script id="tmpl-wp-bulk-updates-admin-notice" type="text/html">
<div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
<div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errorMessage ) { #>notice-error<# } else { #>notice-success<# } #>">
<p>
<# if ( data.successes ) { #>
<# if ( 1 === data.successes ) { #>
<# if ( 'plugin' === data.type ) { #>
<?php
/* translators: %s: Number of plugins. */
printf( __( '%s plugin successfully updated.' ), '{{ data.successes }}' );
?>
<# } else { #>
<?php
/* translators: %s: Number of themes. */
printf( __( '%s theme successfully updated.' ), '{{ data.successes }}' );
?>
<# } #>
<# } else { #>
<# if ( 'plugin' === data.type ) { #>
<?php
/* translators: %s: Number of plugins. */
printf( __( '%s plugins successfully updated.' ), '{{ data.successes }}' );
?>
<# } else { #>
<?php
/* translators: %s: Number of themes. */
printf( __( '%s themes successfully updated.' ), '{{ data.successes }}' );
?>
<# } #>
<# } #>
<# if ( data.successMessage ) { #>
{{{ data.successMessage }}}
<# } #>
<# if ( data.errors ) { #>
<# if ( data.errorMessage ) { #>
<button class="button-link bulk-action-errors-collapsed" aria-expanded="false">
<# if ( 1 === data.errors ) { #>
<?php
/* translators: %s: Number of failed updates. */
printf( __( '%s update failed.' ), '{{ data.errors }}' );
?>
<# } else { #>
<?php
/* translators: %s: Number of failed updates. */
printf( __( '%s updates failed.' ), '{{ data.errors }}' );
?>
<# } #>
{{{ data.errorMessage }}}
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
Expand All @@ -975,7 +941,7 @@ function wp_print_admin_notice_templates() {
</button>
<# } #>
</p>
<# if ( data.errors ) { #>
<# if ( data.errorMessages ) { #>
<ul class="bulk-action-errors hidden">
<# _.each( data.errorMessages, function( errorMessage ) { #>
<li>{{ errorMessage }}</li>
Expand Down
2 changes: 0 additions & 2 deletions src/wp-content/themes/twentyeleven/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2831,8 +2831,6 @@ p.comment-form-comment {
#ie7 article.intro {
margin-left: -7.6%;
margin-right: -7.6%;
padding-left: -7.6%;
padding-right: -7.6%;
max-width: 1000px;
}
#ie7 .featured-posts {
Expand Down
12 changes: 12 additions & 0 deletions src/wp-content/themes/twentyfourteen/css/blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@ p.has-drop-cap:not(:focus)::first-letter {
margin: 0;
}

:where(.wp-block-pullquote[class*="-font-size"], .wp-block-pullquote[style*="font-size"]) blockquote {
font-size: inherit;
}

:where(.wp-block-pullquote[style*="font-style"]) blockquote {
font-style: inherit;
}

:where(.wp-block-pullquote[style*="font-weight"]) blockquote {
font-weight: inherit;
}

.wp-block-pullquote cite {
color: #2b2b2b;
font-size: 16px;
Expand Down
13 changes: 13 additions & 0 deletions src/wp-content/themes/twentyfourteen/css/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,19 @@ p.has-drop-cap:not(:focus)::first-letter {
border: 0;
}

.wp-block-pullquote[class*="-font-size"] blockquote,
.wp-block-pullquote[style*="font-size"] blockquote {
font-size: inherit;
}

.wp-block-pullquote[style*="font-style"] blockquote {
font-style: inherit;
}

.wp-block-pullquote[style*="font-weight"] blockquote {
font-weight: inherit;
}

.wp-block-pullquote .wp-block-pullquote__citation {
color: #2b2b2b;
font-size: 16px;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyfourteen/css/editor-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ q:after {

blockquote {
color: #767676;
font-size: inherit;
font-size: 19px;
font-style: italic;
font-weight: 300;
line-height: 1.2631578947;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyfourteen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ q:after {

blockquote {
color: #767676;
font-size: inherit;
font-size: 19px;
font-style: italic;
font-weight: 300;
line-height: 1.2631578947;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwelve/inc/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<p class="has-drop-cap">' . esc_html__( 'Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.', 'twentytwelve' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>' . esc_html__( 'The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn&#8217;t listen. She packed her seven versalia, put her initial into the belt and made herself on the way. When she reached the first hills of the Italic Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove, the headline of Alphabet Village and the subline of her own road, the Line Lane. Pityful a rhetoric question ran over her cheek, then.', 'twentytwelve' ) . '</p>
<p>' . esc_html__( 'The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didn&#8217;t listen. She packed her seven versalia, put her initial into the belt and made herself on the way. When she reached the first hills of the Italic Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove, the headline of Alphabet Village and the subline of her own road, the Line Lane.', 'twentytwelve' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>' . esc_html__( 'It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar. Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.', 'twentytwelve' ) . '</p>
Expand Down
6 changes: 5 additions & 1 deletion src/wp-content/themes/twentytwentythree/parts/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"var:preset|spacing|40"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide" style="padding-bottom:var(--wp--preset--spacing--40)">
<!-- wp:site-title {"level":0} /-->
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"}} /-->
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"left"}} -->
<div class="wp-block-group">
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/wp-content/themes/twentytwentytwo/parts/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

<!-- wp:site-title /--></div>
<!-- /wp:group -->

<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"left"}} -->
<div class="wp-block-group">
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"}} -->
<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
<!-- /wp:navigation --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
4 changes: 2 additions & 2 deletions src/wp-includes/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
}

/**
* Adds the "Edit site" link to the Toolbar.
* Adds the "Site Editor" link to the Toolbar.
*
* @since 5.9.0
* @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar.
Expand All @@ -476,7 +476,7 @@ function wp_admin_bar_edit_site_menu( $wp_admin_bar ) {
$wp_admin_bar->add_node(
array(
'id' => 'site-editor',
'title' => __( 'Edit site' ),
'title' => __( 'Site Editor' ),
'href' => add_query_arg(
array(
'postType' => 'wp_template',
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ function _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy,
* It is self-sufficient in that it only uses information passed as arguments; it does not
* query the database for additional information.
*
* @since 6.5.1
* @since 6.5.3
* @access private
*
* @param WP_Post $post Template post.
Expand Down Expand Up @@ -1505,7 +1505,7 @@ function get_template_hierarchy( $slug, $is_custom = false, $template_prefix = '
*/
function inject_ignored_hooked_blocks_metadata_attributes( $changes, $deprecated = null ) {
if ( null !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '6.5.1' );
_deprecated_argument( __FUNCTION__, '6.5.3' );
}

$hooked_blocks = get_hooked_blocks();
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-avif-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private function get_item_features( $target_item_id, $tile_depth ) {
if ( $tile->parent_item_id != $target_item_id ) {
continue;
}
$status = get_item_features( $tile->tile_item_id, $tile_depth + 1 );
$status = $this->get_item_features( $tile->tile_item_id, $tile_depth + 1 );
if ( $status != NOT_FOUND ) {
return $status;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-block-bindings-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Core class used for interacting with block bindings sources.
*
* @since 6.5.0
* @since 6.5.0
*/
final class WP_Block_Bindings_Registry {

Expand Down

0 comments on commit 900df75

Please sign in to comment.