Skip to content

Commit 6c1a23b

Browse files
author
Felix Arntz
committed
Merge branch 'trunk' into add/view-transitions-theme-support
2 parents 260b377 + a1bce5f commit 6c1a23b

13 files changed

Lines changed: 142 additions & 75 deletions

src/wp-admin/includes/misc.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,11 +1483,12 @@ function update_option_new_admin_email( $old_value, $value ) {
14831483
* Filters the text of the email sent when a change of site admin email address is attempted.
14841484
*
14851485
* The following strings have a special meaning and will get replaced dynamically:
1486-
* - ###USERNAME### The current user's username.
1487-
* - ###ADMIN_URL### The link to click on to confirm the email change.
1488-
* - ###EMAIL### The proposed new site admin email address.
1489-
* - ###SITENAME### The name of the site.
1490-
* - ###SITEURL### The URL to the site.
1486+
*
1487+
* - `###USERNAME###` The current user's username.
1488+
* - `###ADMIN_URL###` The link to click on to confirm the email change.
1489+
* - `###EMAIL###` The proposed new site admin email address.
1490+
* - `###SITENAME###` The name of the site.
1491+
* - `###SITEURL###` The URL to the site.
14911492
*
14921493
* @since MU (3.0.0)
14931494
* @since 4.9.0 This filter is no longer Multisite specific.

src/wp-admin/includes/privacy-tools.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {
613613

614614
/**
615615
* Filters the recipient of the personal data export email notification.
616-
* Should be used with great caution to avoid sending the data export link to wrong emails.
616+
* Should be used with great caution to avoid sending the data export link to the wrong email.
617617
*
618618
* @since 5.3.0
619619
*
@@ -678,10 +678,11 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {
678678
* Filters the text of the email sent with a personal data export file.
679679
*
680680
* The following strings have a special meaning and will get replaced dynamically:
681-
* ###EXPIRATION### The date when the URL will be automatically deleted.
682-
* ###LINK### URL of the personal data export file for the user.
683-
* ###SITENAME### The name of the site.
684-
* ###SITEURL### The URL to the site.
681+
*
682+
* - `###EXPIRATION###` The date when the URL will be automatically deleted.
683+
* - `###LINK###` URL of the personal data export file for the user.
684+
* - `###SITENAME###` The name of the site.
685+
* - `###SITEURL###` The URL to the site.
685686
*
686687
* @since 4.9.6
687688
* @since 5.3.0 Introduced the `$email_data` array.

src/wp-admin/ms-delete-site.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
/**
7676
* Filters the text for the email sent to the site admin when a request to delete a site in a Multisite network is submitted.
7777
*
78+
* The following strings have a special meaning and will get replaced dynamically:
79+
*
80+
* - `###USERNAME###` The current user's username.
81+
* - `###URL_DELETE###` The link to click on to confirm the site deletion.
82+
* - `###SITENAME###` The name of the site.
83+
* - `###SITEURL###` The URL to the site.
84+
*
7885
* @since 3.0.0
7986
*
8087
* @param string $content The email text.

src/wp-includes/blocks.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,8 +1248,25 @@ function apply_block_hooks_to_content_from_post_object( $content, $post = null,
12481248
$content
12491249
);
12501250

1251+
/*
1252+
* We need to avoid inserting any blocks hooked into the `before` and `after` positions
1253+
* of the temporary wrapper block that we create to wrap the content.
1254+
* See https://core.trac.wordpress.org/ticket/63287 for more details.
1255+
*/
1256+
$suppress_blocks_from_insertion_before_and_after_wrapper_block = static function ( $hooked_block_types, $relative_position, $anchor_block_type ) use ( $wrapper_block_type ) {
1257+
if (
1258+
$wrapper_block_type === $anchor_block_type &&
1259+
in_array( $relative_position, array( 'before', 'after' ), true )
1260+
) {
1261+
return array();
1262+
}
1263+
return $hooked_block_types;
1264+
};
1265+
12511266
// Apply Block Hooks.
1267+
add_filter( 'hooked_block_types', $suppress_blocks_from_insertion_before_and_after_wrapper_block, PHP_INT_MAX, 3 );
12521268
$content = apply_block_hooks_to_content( $content, $post, $callback );
1269+
remove_filter( 'hooked_block_types', $suppress_blocks_from_insertion_before_and_after_wrapper_block, PHP_INT_MAX );
12531270

12541271
// Finally, we need to remove the temporary wrapper block.
12551272
$content = remove_serialized_parent_block( $content );

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class WP_Meta_Query {
165165
* }
166166
* }
167167
*/
168-
public function __construct( $meta_query = false ) {
168+
public function __construct( $meta_query = array() ) {
169169
if ( ! $meta_query ) {
170170
return;
171171
}

src/wp-includes/class-wp-user.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class WP_User {
125125
* @param string $name Optional. User's username
126126
* @param int $site_id Optional Site ID, defaults to current site.
127127
*/
128-
public function __construct( $id = 0, $name = '', $site_id = '' ) {
128+
public function __construct( $id = 0, $name = '', $site_id = 0 ) {
129129
global $wpdb;
130130

131131
if ( ! isset( self::$back_compat_keys ) ) {
@@ -175,7 +175,7 @@ public function __construct( $id = 0, $name = '', $site_id = '' ) {
175175
* @param object $data User DB row object.
176176
* @param int $site_id Optional. The site ID to initialize for.
177177
*/
178-
public function init( $data, $site_id = '' ) {
178+
public function init( $data, $site_id = 0 ) {
179179
if ( ! isset( $data->ID ) ) {
180180
$data->ID = 0;
181181
}
@@ -852,7 +852,7 @@ public function translate_level_to_cap( $level ) {
852852
*
853853
* @param int $blog_id Optional. Site ID, defaults to current site.
854854
*/
855-
public function for_blog( $blog_id = '' ) {
855+
public function for_blog( $blog_id = 0 ) {
856856
_deprecated_function( __METHOD__, '4.9.0', 'WP_User::for_site()' );
857857

858858
$this->for_site( $blog_id );
@@ -867,7 +867,7 @@ public function for_blog( $blog_id = '' ) {
867867
*
868868
* @param int $site_id Site ID to initialize user capabilities for. Default is the current site.
869869
*/
870-
public function for_site( $site_id = '' ) {
870+
public function for_site( $site_id = 0 ) {
871871
global $wpdb;
872872

873873
if ( ! empty( $site_id ) ) {

src/wp-includes/class-wp-xmlrpc-server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ public function wp_deleteTerm( $args ) {
23452345
$result = wp_delete_term( $term_id, $taxonomy->name );
23462346

23472347
if ( is_wp_error( $result ) ) {
2348-
return new IXR_Error( 500, $term->get_error_message() );
2348+
return new IXR_Error( 500, $result->get_error_message() );
23492349
}
23502350

23512351
if ( ! $result ) {

src/wp-includes/functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8180,10 +8180,10 @@ function wp_site_admin_email_change_notification( $old_email, $new_email, $optio
81808180
* @type string $subject The subject of the email.
81818181
* @type string $message The content of the email.
81828182
* The following strings have a special meaning and will get replaced dynamically:
8183-
* - ###OLD_EMAIL### The old site admin email address.
8184-
* - ###NEW_EMAIL### The new site admin email address.
8185-
* - ###SITENAME### The name of the site.
8186-
* - ###SITEURL### The URL to the site.
8183+
* - `###OLD_EMAIL###` The old site admin email address.
8184+
* - `###NEW_EMAIL###` The new site admin email address.
8185+
* - `###SITENAME###` The name of the site.
8186+
* - `###SITEURL###` The URL to the site.
81878187
* @type string $headers Headers.
81888188
* }
81898189
* @param string $old_email The old site admin email address.

src/wp-includes/ms-functions.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,11 +2816,12 @@ function update_network_option_new_admin_email( $old_value, $value ) {
28162816
* Filters the text of the email sent when a change of network admin email address is attempted.
28172817
*
28182818
* The following strings have a special meaning and will get replaced dynamically:
2819-
* ###USERNAME### The current user's username.
2820-
* ###ADMIN_URL### The link to click on to confirm the email change.
2821-
* ###EMAIL### The proposed new network admin email address.
2822-
* ###SITENAME### The name of the network.
2823-
* ###SITEURL### The URL to the network.
2819+
*
2820+
* - `###USERNAME###` The current user's username.
2821+
* - `###ADMIN_URL###` The link to click on to confirm the email change.
2822+
* - `###EMAIL###` The proposed new network admin email address.
2823+
* - `###SITENAME###` The name of the network.
2824+
* - `###SITEURL###` The URL to the network.
28242825
*
28252826
* @since 4.9.0
28262827
*
@@ -2927,10 +2928,10 @@ function wp_network_admin_email_change_notification( $option_name, $new_email, $
29272928
* @type string $subject The subject of the email.
29282929
* @type string $message The content of the email.
29292930
* The following strings have a special meaning and will get replaced dynamically:
2930-
* - ###OLD_EMAIL### The old network admin email address.
2931-
* - ###NEW_EMAIL### The new network admin email address.
2932-
* - ###SITENAME### The name of the network.
2933-
* - ###SITEURL### The URL to the site.
2931+
* - `###OLD_EMAIL###` The old network admin email address.
2932+
* - `###NEW_EMAIL###` The new network admin email address.
2933+
* - `###SITENAME###` The name of the network.
2934+
* - `###SITEURL###` The URL to the site.
29342935
* @type string $headers Headers.
29352936
* }
29362937
* @param string $old_email The old network admin email address.

src/wp-includes/rest-api/class-wp-rest-server.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,11 +1353,7 @@ protected function get_json_last_error() {
13531353
*
13541354
* @since 4.4.0
13551355
*
1356-
* @param array $request {
1357-
* Request.
1358-
*
1359-
* @type string $context Context.
1360-
* }
1356+
* @param WP_REST_Request $request Request data.
13611357
* @return WP_REST_Response The API root index data.
13621358
*/
13631359
public function get_index( $request ) {

0 commit comments

Comments
 (0)