--- pr-38.wordpress.master.PEAR.Functions.FunctionCallSignature.diff 2024-01-17 14:47:20.497618841 +0000 +++ pr-38.wordpress.whitespace-incompatibility.PEAR.Functions.FunctionCallSignature.diff 2024-01-17 15:03:15.032705026 +0000 @@ -12,7 +12,7 @@ /** Loads the WordPress Environment and Template */ require __DIR__ . '/wp-blog-header.php'; diff --git a/wp-activate.php b/wp-activate.php -index 36772a2d9d..e2a3211d2c 100644 +index 36772a2d9d..774609cf51 100644 --- a/wp-activate.php +++ b/wp-activate.php @@ -6,7 +6,7 @@ @@ -176,12 +176,13 @@ - $signup->user_login, - $signup->user_email, - wp_lostpassword_url() +- ); + __('Your account has been activated. You may now log in to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.'), + network_site_url($blog_details->path . 'wp-login.php', 'login'), + $signup->user_login, + $signup->user_email, + wp_lostpassword_url() - ); ++ ); } else { printf( /* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */ @@ -190,12 +191,13 @@ - $signup->user_login, - $signup->user_email, - wp_lostpassword_url() +- ); + __('Your site at %1$s is active. You may now log in to your site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can reset your password.'), + sprintf('%1$s%2$s', $signup->domain, $blog_details->path), + $signup->user_login, + $signup->user_email, + wp_lostpassword_url() - ); ++ ); } echo '
'; - } elseif ( null === $result || is_wp_error( $result ) ) { @@ -263,7 +265,7 @@ -get_footer( 'wp-activate' ); +get_footer('wp-activate'); diff --git a/wp-admin/about.php b/wp-admin/about.php -index 03ff7a6d96..72ef89f7ff 100644 +index 03ff7a6d96..c11b13dd86 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -11,9 +11,9 @@ require_once __DIR__ . '/admin.php'; @@ -545,15 +547,14 @@ /* translators: 1: WordPress Release Notes link, 2: WordPress version number. */ - __( 'Read the WordPress %2$s Release Notes for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes.' ), - sprintf( -- /* translators: %s: WordPress version number. */ ++ __('Read the WordPress %2$s Release Notes for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes.'), ++ sprintf( + /* translators: %s: WordPress version number. */ - esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), - '6-4' - ), - '6.4' - ); -+ __('Read the WordPress %2$s Release Notes for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes.'), -+ sprintf( -+ /* translators: %s: WordPress version number. */ + esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')), + '6-4' + ), @@ -572,25 +573,27 @@ - '%2$s | ', - esc_url( self_admin_url( 'update-core.php' ) ), - is_multisite() ? __( 'Go to Updates' ) : __( 'Go to Dashboard → Updates' ) +- ); + '%2$s | ', + esc_url(self_admin_url('update-core.php')), + is_multisite() ? __('Go to Updates') : __('Go to Dashboard → Updates') - ); ++ ); } - printf( -+printf( - '%2$s', +- '%2$s', - esc_url( self_admin_url() ), - is_blog_admin() ? __( 'Go to Dashboard → Home' ) : __( 'Go to Dashboard' ) - ); -+ esc_url(self_admin_url()), -+ is_blog_admin() ? __('Go to Dashboard → Home') : __('Go to Dashboard') ++printf( ++ '%2$s', ++ esc_url(self_admin_url()), ++ is_blog_admin() ? __('Go to Dashboard → Home') : __('Go to Dashboard') +); ?> -@@ -302,49 +302,49 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -302,19 +302,19 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; // These are strings we may use to describe maintenance/security releases, where we aim for no new strings. return; @@ -618,26 +621,7 @@ /* translators: 1: WordPress version number, 2: Plural number of bugs. */ _n_noop( -- 'Version %1$s addressed %2$s bug.', -- 'Version %1$s addressed %2$s bugs.' -+ 'Version %1$s addressed %2$s bug.', -+ 'Version %1$s addressed %2$s bugs.' - ); - - /* translators: 1: WordPress version number, 2: Plural number of bugs. Singular security issue. */ - _n_noop( -- 'Version %1$s addressed a security issue and fixed %2$s bug.', -- 'Version %1$s addressed a security issue and fixed %2$s bugs.' -+ 'Version %1$s addressed a security issue and fixed %2$s bug.', -+ 'Version %1$s addressed a security issue and fixed %2$s bugs.' - ); - - /* translators: 1: WordPress version number, 2: Plural number of bugs. More than one security issue. */ - _n_noop( -- 'Version %1$s addressed some security issues and fixed %2$s bug.', -- 'Version %1$s addressed some security issues and fixed %2$s bugs.' -+ 'Version %1$s addressed some security issues and fixed %2$s bug.', -+ 'Version %1$s addressed some security issues and fixed %2$s bugs.' +@@ -335,16 +335,16 @@ _n_noop( ); /* translators: %s: Documentation URL. */ @@ -876,7 +860,7 @@ /** WordPress Administration API: Includes all Administration functions. */ require_once ABSPATH . 'wp-admin/includes/admin.php'; diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php -index fc836c20a2..a244578475 100644 +index fc836c20a2..51d07201b3 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -6,8 +6,8 @@ @@ -933,10 +917,12 @@ +$screen_title = sprintf( /* translators: Editor admin screen title. 1: "Edit item" text for the post type, 2: Post title. */ - __( '%1$s “%2$s”' ), -+ __('%1$s “%2$s”'), - $post_type_obj->labels->edit_item, - $post_title +- $post_type_obj->labels->edit_item, +- $post_title - ); ++ __('%1$s “%2$s”'), ++ $post_type_obj->labels->edit_item, ++ $post_title +); } } @@ -1263,7 +1249,7 @@ } } diff --git a/wp-admin/admin.php b/wp-admin/admin.php -index 455620f1c7..298458395c 100644 +index 455620f1c7..7fc6fb54d7 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -11,48 +11,48 @@ @@ -1348,9 +1334,10 @@ require_once ABSPATH . WPINC . '/http.php'; - $response = wp_remote_get( - admin_url( 'upgrade.php?step=1' ), +- array( +$response = wp_remote_get( -+ admin_url('upgrade.php?step=1'), - array( ++ admin_url('upgrade.php?step=1'), ++ array( 'timeout' => 120, 'httpversion' => '1.1', ) @@ -1664,7 +1651,7 @@ + do_action("admin_action_{$action}"); } diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php -index 864f2be654..665d666b50 100644 +index 864f2be654..bc415cc9e2 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -6,44 +6,44 @@ @@ -1776,10 +1763,12 @@ case 2: - add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 ); - echo get_media_item( +- $id, +- array( + add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2); +echo get_media_item( - $id, - array( ++ $id, ++ array( 'send' => false, 'delete' => true, ) @@ -1819,19 +1808,6 @@ - __( 'Dismiss' ) - ), - sprintf( -- /* translators: %s: Name of the file that failed to upload. */ -- __( '“%s” has failed to upload.' ), -- esc_html( $_FILES['async-upload']['name'] ) -- ), -- esc_html( $id->get_error_message() ) -- ); -- wp_admin_notice( -- $message, -- array( -- 'additional_classes' => array( 'error-div', 'error' ), -- 'paragraph_wrap' => false, -- ) -- ); +$id = media_handle_upload('async-upload', $post_id); +if ( is_wp_error($id) ) { +$message = sprintf( @@ -1841,7 +1817,15 @@ + __('Dismiss') + ), + sprintf( -+ /* translators: %s: Name of the file that failed to upload. */ + /* translators: %s: Name of the file that failed to upload. */ +- __( '“%s” has failed to upload.' ), +- esc_html( $_FILES['async-upload']['name'] ) +- ), +- esc_html( $id->get_error_message() ) +- ); +- wp_admin_notice( +- $message, +- array( + __('“%s” has failed to upload.'), + esc_html($_FILES['async-upload']['name']) + ), @@ -1850,9 +1834,10 @@ +wp_admin_notice( + $message, + array( -+ 'additional_classes' => array( 'error-div', 'error' ), -+ 'paragraph_wrap' => false, -+ ) + 'additional_classes' => array( 'error-div', 'error' ), + 'paragraph_wrap' => false, + ) +- ); +); exit; } @@ -1865,7 +1850,7 @@ + echo apply_filters("async_upload_{$type}", $id); } diff --git a/wp-admin/authorize-application.php b/wp-admin/authorize-application.php -index 8d931f4666..c860810e32 100644 +index 8d931f4666..5160e975f2 100644 --- a/wp-admin/authorize-application.php +++ b/wp-admin/authorize-application.php @@ -13,8 +13,8 @@ $error = null; @@ -1879,7 +1864,7 @@ $success_url = $_POST['success_url']; $reject_url = $_POST['reject_url']; -@@ -22,34 +22,34 @@ if ( isset( $_POST['action'] ) && 'authorize_application_password' === $_POST['a +@@ -22,104 +22,104 @@ if ( isset( $_POST['action'] ) && 'authorize_application_password' === $_POST['a $app_id = $_POST['app_id']; $redirect = ''; @@ -1900,9 +1885,8 @@ + array( 'name' => $app_name, 'app_id' => $app_id, -- ) + ) - ); -+ ) +); - if ( is_wp_error( $created ) ) { @@ -1917,18 +1901,18 @@ - 'site_url' => urlencode( site_url() ), - 'user_login' => urlencode( wp_get_current_user()->user_login ), - 'password' => urlencode( $new_password ), -- ), -- $success_url + array( -+ 'site_url' => urlencode(site_url()), -+ 'user_login' => urlencode(wp_get_current_user()->user_login), -+ 'password' => urlencode($new_password), -+ ), ++ 'site_url' => urlencode(site_url()), ++ 'user_login' => urlencode(wp_get_current_user()->user_login), ++ 'password' => urlencode($new_password), + ), +- $success_url +- ); + $success_url - ); ++ ); } } -@@ -57,143 +57,143 @@ if ( isset( $_POST['action'] ) && 'authorize_application_password' === $_POST['a + } if ( $redirect ) { // Explicitly not using wp_safe_redirect b/c sends to arbitrary domain. @@ -1983,20 +1967,18 @@ - __( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords.' ), - __( 'Cannot Authorize Application' ), - array( -- 'response' => 501, -- 'link_text' => __( 'Go Back' ), -- 'link_url' => $reject_url ? add_query_arg( 'error', 'disabled', $reject_url ) : admin_url(), -- ) -- ); +if ( wp_is_site_protected_by_basic_auth('front') ) { +wp_die( + __('Your website appears to use Basic Authentication, which is not currently compatible with application passwords.'), + __('Cannot Authorize Application'), + array( -+ 'response' => 501, -+ 'link_text' => __('Go Back'), -+ 'link_url' => $reject_url ? add_query_arg('error', 'disabled', $reject_url) : admin_url(), -+ ) + 'response' => 501, +- 'link_text' => __( 'Go Back' ), +- 'link_url' => $reject_url ? add_query_arg( 'error', 'disabled', $reject_url ) : admin_url(), ++ 'link_text' => __('Go Back'), ++ 'link_url' => $reject_url ? add_query_arg('error', 'disabled', $reject_url) : admin_url(), + ) +- ); +); } @@ -2014,44 +1996,26 @@ - $message, - __( 'Cannot Authorize Application' ), - array( -- 'response' => 501, -- 'link_text' => __( 'Go Back' ), -- 'link_url' => $reject_url ? add_query_arg( 'error', 'disabled', $reject_url ) : admin_url(), -- ) -- ); +wp_die( + $message, + __('Cannot Authorize Application'), + array( -+ 'response' => 501, -+ 'link_text' => __('Go Back'), -+ 'link_url' => $reject_url ? add_query_arg('error', 'disabled', $reject_url) : admin_url(), -+ ) + 'response' => 501, +- 'link_text' => __( 'Go Back' ), +- 'link_url' => $reject_url ? add_query_arg( 'error', 'disabled', $reject_url ) : admin_url(), ++ 'link_text' => __('Go Back'), ++ 'link_url' => $reject_url ? add_query_arg('error', 'disabled', $reject_url) : admin_url(), + ) +- ); +); } -wp_enqueue_script( 'auth-app' ); +wp_enqueue_script('auth-app'); wp_localize_script( -- 'auth-app', -- 'authApp', -- array( -- 'site_url' => site_url(), -- 'user_login' => $user->user_login, -- 'success' => $success_url, -- 'reject' => $reject_url ? $reject_url : admin_url(), -- ) -+ 'auth-app', -+ 'authApp', -+ array( -+ 'site_url' => site_url(), -+ 'user_login' => $user->user_login, -+ 'success' => $success_url, -+ 'reject' => $reject_url ? $reject_url : admin_url(), -+ ) - ); - - require_once ABSPATH . 'wp-admin/admin-header.php'; + 'auth-app', + 'authApp', +@@ -135,65 +135,65 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?>
' . esc_html(
- add_query_arg(
- array(
-- 'site_url' => site_url(),
-- 'user_login' => $user->user_login,
-- 'password' => '[------]',
-- ),
-- $success_url
-- )
-- ) . '
'
-- );
+ __('You will be sent to %s'),
+ '' . esc_html(
+ add_query_arg(
+ array(
-+ 'site_url' => site_url(),
-+ 'user_login' => $user->user_login,
-+ 'password' => '[------]',
-+ ),
+ 'site_url' => site_url(),
+ 'user_login' => $user->user_login,
+ 'password' => '[------]',
+ ),
+- $success_url
+- )
+- ) . '
'
+- );
+ $success_url
+ )
+ ) . ''
@@ -2273,16 +2232,15 @@
- 'reject',
- false,
- array(
-- 'aria-describedby' => 'description-reject',
-- )
+ __('No, I do not approve of this connection'),
+ 'secondary',
+ 'reject',
+ false,
+ array(
-+ 'aria-describedby' => 'description-reject',
-+ )
- );
+ 'aria-describedby' => 'description-reject',
+ )
+- );
++ );
?>
diff --git a/wp-admin/comment.php b/wp-admin/comment.php -index 349a32a43e..ae281ea5e1 100644 +index 349a32a43e..5d186bc926 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -16,9 +16,9 @@ $submenu_file = 'edit-comments.php'; @@ -2367,27 +2325,24 @@ 'content' => - '
' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '
' . - '' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '
', -- ) ++ '' . __('You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.') . '
' . ++ '' . __('You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.') . '
', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Comments' ) . '
' . - '' . __( 'Support forums' ) . '
' - ); -- -- wp_enqueue_script( 'comment' ); -+ '' . __('You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.') . '
' . -+ '' . __('You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.') . '
', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '' . __('For more information:') . '
' . -+ '' . __('Documentation on Comments') . '
' . -+ '' . __('Support forums') . '
' ++ '' . __('Documentation on Comments') . '
' . ++ '' . __('Support forums') . '
' +); -+ + +- wp_enqueue_script( 'comment' ); + wp_enqueue_script('comment'); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -2495,15 +2450,13 @@ wp_admin_notice( - $message, - array( -- 'type' => 'info', -- 'id' => 'message', -- ) + $message, + array( -+ 'type' => 'info', -+ 'id' => 'message', -+ ) - ); + 'type' => 'info', + 'id' => 'message', + ) +- ); ++ ); } } - wp_admin_notice( @@ -2514,9 +2467,8 @@ + array( 'type' => 'warning', 'id' => 'message', -- ) + ) - ); -+ ) +); ?> @@ -2574,9 +2526,10 @@ +printf( /* translators: %s: Comment link. */ - ' | ' . __( 'In reply to %s.' ), -+ ' | ' . __('In reply to %s.'), - '' . $name . '' +- '' . $name . '' - ); ++ ' | ' . __('In reply to %s.'), ++ '' . $name . '' +); } ?> @@ -2600,9 +2553,9 @@ - echo '' . $submitted . ''; + __('%1$s at %2$s'), + /* translators: Comment date format. See https://www.php.net/manual/datetime.format.php */ -+ get_comment_date(__('Y/m/d'), $comment), ++ get_comment_date(__('Y/m/d'), $comment), + /* translators: Comment time format. See https://www.php.net/manual/datetime.format.php */ -+ get_comment_date(__('g:i a'), $comment) ++ get_comment_date(__('g:i a'), $comment) +); + if ( 'approved' === wp_get_comment_status($comment) && ! empty($comment->comment_post_ID) ) { + echo '' . $submitted . ''; @@ -2703,16 +2656,14 @@ + wp_trash_comment($comment); $redir = add_query_arg( - array( -- 'trashed' => '1', -- 'ids' => $comment_id, -- ), -- $redir + array( -+ 'trashed' => '1', -+ 'ids' => $comment_id, -+ ), + 'trashed' => '1', + 'ids' => $comment_id, + ), +- $redir +- ); + $redir - ); ++ ); break; case 'untrashcomment': - wp_untrash_comment( $comment ); @@ -2725,16 +2676,14 @@ + wp_spam_comment($comment); $redir = add_query_arg( - array( -- 'spammed' => '1', -- 'ids' => $comment_id, -- ), -- $redir + array( -+ 'spammed' => '1', -+ 'ids' => $comment_id, -+ ), + 'spammed' => '1', + 'ids' => $comment_id, + ), +- $redir +- ); + $redir - ); ++ ); break; case 'unspamcomment': - wp_unspam_comment( $comment ); @@ -2939,7 +2888,7 @@' . __('Sorry, you are not allowed to customize this site.') . '
', ++ '' . __('Sorry, you are not allowed to customize this site.') . '
', + 403 +); } @@ -68663,7 +68613,7 @@ + if ( ! current_user_can(get_post_type_object('customize_changeset')->cap->edit_post, $changeset_post->ID) ) { +wp_die( + '' . __('Sorry, you are not allowed to edit this changeset.') . '
', ++ '' . __('Sorry, you are not allowed to edit this changeset.') . '
', + 403 +); } @@ -68695,7 +68645,7 @@ - ); +wp_die( + '' . __('Customize New Changes') . '
' . $script, ++ '' . __('Customize New Changes') . '
' . $script, + 200 +); } @@ -68710,8 +68660,8 @@ + if ( in_array(get_post_status($changeset_post->ID), array( 'publish', 'trash' ), true) ) { +wp_die( + '' . __('This changeset cannot be further modified.') . '
' . -+ '' . __('Customize New Changes') . '
', ++ '' . __('This changeset cannot be further modified.') . '
' . ++ '', + 403 +); } @@ -68953,7 +68903,7 @@