--- 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'; ?>
@@ -2068,9 +2032,8 @@ + $error->get_error_message(), + array( 'type' => 'error', -- ) + ) - ); -+ ) +); } ?> @@ -2085,9 +2048,10 @@ /* translators: %s: Application name. */ - __( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the application in question.' ), - '' . esc_html( $app_name ) . '' +- ); + __('Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the application in question.'), + '' . esc_html($app_name) . '' - ); ++ ); ?>

@@ -2156,8 +2120,8 @@ - esc_html__( 'Your new password for %s is:' ), - '' . esc_html( $app_name ) . '' - ) . ' -+ esc_html__('Your new password for %s is:'), -+ '' . esc_html($app_name) . '' ++ esc_html__('Your new password for %s is:'), ++ '' . esc_html($app_name) . '' +) . ' - @@ -2218,16 +2182,15 @@ - 'approve', - false, - array( -- 'aria-describedby' => 'description-approve', -- ) + __('Yes, I approve of this connection'), + 'primary', + 'approve', + false, + array( -+ 'aria-describedby' => 'description-approve', -+ ) - ); + 'aria-describedby' => 'description-approve', + ) +- ); ++ ); ?>

' . 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 @@
diff --git a/wp-admin/credits.php b/wp-admin/credits.php -index efd619c6bb..adc679ec9b 100644 +index efd619c6bb..e8df14ea6f 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -11,9 +11,9 @@ require_once __DIR__ . '/admin.php'; @@ -2987,9 +2936,10 @@ /* translators: 1: https://wordpress.org/about/ */ - __( 'WordPress is created by a worldwide team of passionate individuals.' ), - __( 'https://wordpress.org/about/' ) +- ); + __('WordPress is created by a worldwide team of passionate individuals.'), + __('https://wordpress.org/about/') - ); ++ ); ?>
- @@ -68618,7 +68568,7 @@ /** Custom_Image_Header class */ require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php'; diff --git a/wp-admin/customize.php b/wp-admin/customize.php -index 2f0bc87b86..87573f755e 100644 +index 2f0bc87b86..7c000042d8 100644 --- a/wp-admin/customize.php +++ b/wp-admin/customize.php @@ -7,17 +7,17 @@ @@ -68640,7 +68590,7 @@ +if ( ! current_user_can('customize') ) { +wp_die( + '

' . __('You need a higher level of permission.') . '

' . -+ '

' . __('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( + '

' . __('You need a higher level of permission.') . '

' . -+ '

' . __('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( + '

' . __('Your scheduled changes just published') . '

' . -+ '

' . __('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( + '

' . __('Something went wrong.') . '

' . -+ '

' . __('This changeset cannot be further modified.') . '

' . -+ '

' . __('Customize New Changes') . '

', ++ '

' . __('This changeset cannot be further modified.') . '

' . ++ '

' . __('Customize New Changes') . '

', + 403 +); } @@ -68953,7 +68903,7 @@ diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php -index 262e2d9c35..b42ae55b3a 100644 +index 262e2d9c35..0901a264bf 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -8,46 +8,46 @@ @@ -68969,7 +68919,7 @@ +if ( ! current_user_can('edit_posts') ) { +wp_die( + '

' . __('You need a higher level of permission.') . '

' . -+ '

' . __('Sorry, you are not allowed to edit comments.') . '

', ++ '

' . __('Sorry, you are not allowed to edit comments.') . '

', + 403 +); } @@ -69025,41 +68975,29 @@ exit; } -@@ -59,104 +59,104 @@ if ( $doaction ) { +@@ -59,8 +59,8 @@ if ( $doaction ) { $untrashed = 0; $deleted = 0; - $redirect_to = remove_query_arg( - array( -- 'trashed', -- 'untrashed', -- 'deleted', -- 'spammed', -- 'unspammed', -- 'approved', -- 'unapproved', -- 'ids', -- ), ++$redirect_to = remove_query_arg( ++ array( + 'trashed', + 'untrashed', + 'deleted', +@@ -70,93 +70,93 @@ if ( $doaction ) { + 'unapproved', + 'ids', + ), - wp_get_referer() - ); - $redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to ); -- -- wp_defer_comment_counting( true ); -+$redirect_to = remove_query_arg( -+ array( -+ 'trashed', -+ 'untrashed', -+ 'deleted', -+ 'spammed', -+ 'unspammed', -+ 'approved', -+ 'unapproved', -+ 'ids', -+ ), + wp_get_referer() +); + $redirect_to = add_query_arg('paged', $pagenum, $redirect_to); -+ + +- wp_defer_comment_counting( true ); + wp_defer_comment_counting(true); foreach ( $comment_ids as $comment_id ) { // Check the permissions on each. @@ -69169,7 +69107,7 @@ enqueue_comment_hotkeys_js(); /** -@@ -165,79 +165,79 @@ enqueue_comment_hotkeys_js(); +@@ -165,78 +165,78 @@ enqueue_comment_hotkeys_js(); global $post_id; if ( $post_id ) { @@ -69228,42 +69166,34 @@ +add_screen_option('per_page'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the bulk actions.' ) . '

', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

' . __('You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the bulk actions.') . '

', -+ ) + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'moderating-comments', + array( + 'id' => 'moderating-comments', - 'title' => __( 'Moderating Comments' ), -- 'content' => ++ 'title' => __('Moderating Comments'), + 'content' => - '

' . __( 'A red bar on the left means the comment is waiting for you to moderate it.' ) . '

' . - '

' . __( 'In the Author column, in addition to the author’s name, email address, and site URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '

' . - '

' . __( 'In the Comment column, hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '

' . - '

' . __( 'In the In response to column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If there are pending comments, a red notification circle with the number of pending comments is displayed. Clicking the notification circle will filter the comments screen to show only pending comments on that post.' ) . '

' . - '

' . __( 'In the Submitted on column, the date and time the comment was left on your site appears. Clicking on the date/time link will take you to that comment on your live site.' ) . '

' . - '

' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '

', -- ) -+ array( -+ 'id' => 'moderating-comments', -+ 'title' => __('Moderating Comments'), -+ 'content' => + '

' . __('A red bar on the left means the comment is waiting for you to moderate it.') . '

' . + '

' . __('In the Author column, in addition to the author’s name, email address, and site URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.') . '

' . + '

' . __('In the Comment column, hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.') . '

' . + '

' . __('In the In response to column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If there are pending comments, a red notification circle with the number of pending comments is displayed. Clicking the notification circle will filter the comments screen to show only pending comments on that post.') . '

' . + '

' . __('In the Submitted on column, the date and time the comment was left on your site appears. Clicking on the date/time link will take you to that comment on your live site.') . '

' . + '

' . __('Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.') . '

', -+ ) + ) ); get_current_screen()->set_help_sidebar( @@ -69272,27 +69202,24 @@ - '

' . __( 'Documentation on Comment Spam' ) . '

' . - '

' . __( 'Documentation on Keyboard Shortcuts' ) . '

' . - '

' . __( 'Support forums' ) . '

' -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Comments') . '

' . -+ '

' . __('Documentation on Comment Spam') . '

' . -+ '

' . __('Documentation on Keyboard Shortcuts') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Comments') . '

' . ++ '

' . __('Documentation on Comment Spam') . '

' . ++ '

' . __('Documentation on Keyboard Shortcuts') . '

' . ++ '

' . __('Support forums') . '

' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter comments list' ), - 'heading_pagination' => __( 'Comments list navigation' ), - 'heading_list' => __( 'Comments list' ), -- ) -+ array( -+ 'heading_views' => __('Filter comments list'), -+ 'heading_pagination' => __('Comments list navigation'), -+ 'heading_list' => __('Comments list'), -+ ) ++ 'heading_views' => __('Filter comments list'), ++ 'heading_pagination' => __('Comments list navigation'), ++ 'heading_list' => __('Comments list'), + ) ); - require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -247,41 +247,41 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

'moderated', 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) +); } } @@ -69425,9 +69351,10 @@ +$messages[] = sprintf( /* translators: %s: Number of comments. */ - _n( '%s comment approved.', '%s comments approved.', $approved ), -+ _n('%s comment approved.', '%s comments approved.', $approved), - $approved +- $approved - ); ++ _n('%s comment approved.', '%s comments approved.', $approved), ++ $approved +); } @@ -69439,16 +69366,18 @@ +$messages[] = sprintf( /* translators: %s: Number of comments. */ - _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), -+ _n('%s comment marked as spam.', '%s comments marked as spam.', $spammed), - $spammed +- $spammed - ) . sprintf( -+) . sprintf( - ' %2$s
', +- ' %2$s
', - esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", 'bulk-comments' ) ), - __( 'Undo' ) - ); -+ esc_url(wp_nonce_url("edit-comments.php?doaction=undo&action=unspam&ids=$ids", 'bulk-comments')), -+ __('Undo') ++ _n('%s comment marked as spam.', '%s comments marked as spam.', $spammed), ++ $spammed ++) . sprintf( ++ ' %2$s
', ++ esc_url(wp_nonce_url("edit-comments.php?doaction=undo&action=unspam&ids=$ids", 'bulk-comments')), ++ __('Undo') +); } @@ -69457,9 +69386,10 @@ +$messages[] = sprintf( /* translators: %s: Number of comments. */ - _n( '%s comment restored from the spam.', '%s comments restored from the spam.', $unspammed ), -+ _n('%s comment restored from the spam.', '%s comments restored from the spam.', $unspammed), - $unspammed +- $unspammed - ); ++ _n('%s comment restored from the spam.', '%s comments restored from the spam.', $unspammed), ++ $unspammed +); } @@ -69471,16 +69401,18 @@ +$messages[] = sprintf( /* translators: %s: Number of comments. */ - _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), -+ _n('%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed), - $trashed +- $trashed - ) . sprintf( -+) . sprintf( - ' %2$s
', +- ' %2$s
', - esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", 'bulk-comments' ) ), - __( 'Undo' ) - ); -+ esc_url(wp_nonce_url("edit-comments.php?doaction=undo&action=untrash&ids=$ids", 'bulk-comments')), -+ __('Undo') ++ _n('%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed), ++ $trashed ++) . sprintf( ++ ' %2$s
', ++ esc_url(wp_nonce_url("edit-comments.php?doaction=undo&action=untrash&ids=$ids", 'bulk-comments')), ++ __('Undo') +); } @@ -69489,9 +69421,10 @@ +$messages[] = sprintf( /* translators: %s: Number of comments. */ - _n( '%s comment restored from the Trash.', '%s comments restored from the Trash.', $untrashed ), -+ _n('%s comment restored from the Trash.', '%s comments restored from the Trash.', $untrashed), - $untrashed +- $untrashed - ); ++ _n('%s comment restored from the Trash.', '%s comments restored from the Trash.', $untrashed), ++ $untrashed +); } @@ -69500,9 +69433,10 @@ +$messages[] = sprintf( /* translators: %s: Number of comments. */ - _n( '%s comment permanently deleted.', '%s comments permanently deleted.', $deleted ), -+ _n('%s comment permanently deleted.', '%s comments permanently deleted.', $deleted), - $deleted +- $deleted - ); ++ _n('%s comment permanently deleted.', '%s comments permanently deleted.', $deleted), ++ $deleted +); } @@ -69560,9 +69494,8 @@ 'id' => 'moderated', 'additional_classes' => array( 'updated' ), 'dismissible' => true, -- ) + ) - ); -+ ) +); } } @@ -69606,7 +69539,7 @@ wp_comment_trashnotice(); require_once ABSPATH . 'wp-admin/admin-footer.php'; ?> diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php -index 16b699ca39..43668fb79e 100644 +index 16b699ca39..b5be5bc796 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -7,8 +7,8 @@ @@ -69633,20 +69566,16 @@ } else { - $check_users = get_users( - array( -- 'fields' => 'ID', -- 'number' => 2, -- ) -- ); -- -- if ( count( $check_users ) > 1 ) { -- add_action( 'admin_footer', '_admin_notice_post_locked' ); +$check_users = get_users( + array( -+ 'fields' => 'ID', -+ 'number' => 2, -+ ) + 'fields' => 'ID', + 'number' => 2, + ) +- ); +); -+ + +- if ( count( $check_users ) > 1 ) { +- add_action( 'admin_footer', '_admin_notice_post_locked' ); + if ( count($check_users) > 1 ) { + add_action('admin_footer', '_admin_notice_post_locked'); } @@ -69829,15 +69758,13 @@ $scheduled_date = sprintf( /* translators: Publish box date string. 1: Date, 2: Time. */ - __( '%1$s at %2$s' ), -- /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ ++ __('%1$s at %2$s'), + /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ - date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $post->post_date ) ), -- /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ ++ date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)), + /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ - date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $post->post_date ) ) -+ __('%1$s at %2$s'), -+ /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ -+ date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)), -+ /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ -+ date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date)) ++ date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date)) ); $messages['post'] = array( @@ -69915,7 +69842,7 @@ $message = $messages['post'][ $_GET['message'] ]; } } -@@ -237,189 +237,189 @@ if ( 'auto-draft' === $post->post_status ) { +@@ -237,38 +237,38 @@ if ( 'auto-draft' === $post->post_status ) { $autosave = false; $form_extra .= ""; } else { @@ -69941,8 +69868,8 @@ - __( 'There is an autosave of this post that is more recent than the version below. View the autosave' ), - get_edit_post_link( $autosave->ID ) - ); -+ __('There is an autosave of this post that is more recent than the version below. View the autosave'), -+ get_edit_post_link($autosave->ID) ++ __('There is an autosave of this post that is more recent than the version below. View the autosave'), ++ get_edit_post_link($autosave->ID) +); break; } @@ -69966,27 +69893,23 @@ +register_and_do_post_meta_boxes($post); add_screen_option( -- 'layout_columns', -- array( -- 'max' => 2, -- 'default' => 2, -- ) -+ 'layout_columns', -+ array( -+ 'max' => 2, -+ 'default' => 2, -+ ) + 'layout_columns', +@@ -279,147 +279,147 @@ add_screen_option( ); if ( 'post' === $post_type ) { - $customize_display = '

' . __( 'The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.' ) . '

'; -- ++ $customize_display = '

' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '

'; + - get_current_screen()->add_help_tab( - array( -- 'id' => 'customize-display', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'customize-display', - 'title' => __( 'Customizing This Display' ), -- 'content' => $customize_display, -- ) ++ 'title' => __('Customizing This Display'), + 'content' => $customize_display, + ) - ); - - $title_and_editor = '

' . __( 'Title — Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.' ) . '

'; @@ -69996,14 +69919,6 @@ - $title_and_editor .= '

' . __( 'You can insert media files by clicking the button above the post editor and following the directions. You can align or edit images using the inline formatting toolbar available in Visual mode.' ) . '

'; - $title_and_editor .= '

' . __( 'You can enable distraction-free writing mode using the icon to the right. This feature is not available for old browsers or devices with small screens, and requires that the full-height editor be enabled in Screen Options.' ) . '

'; - $title_and_editor .= '

' . sprintf( -+ $customize_display = '

' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '

'; -+ -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'customize-display', -+ 'title' => __('Customizing This Display'), -+ 'content' => $customize_display, -+ ) +); + + $title_and_editor = '

' . __('Title — Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.') . '

'; @@ -70017,18 +69932,27 @@ - __( 'Keyboard users: When you are working in the visual editor, you can use %s to access the toolbar.' ), - 'Alt + F10' - ) . '

'; -- ++ __('Keyboard users: When you are working in the visual editor, you can use %s to access the toolbar.'), ++ 'Alt + F10' ++) . '

'; + - get_current_screen()->add_help_tab( - array( -- 'id' => 'title-post-editor', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'title-post-editor', - 'title' => __( 'Title and Post Editor' ), -- 'content' => $title_and_editor, -- ) ++ 'title' => __('Title and Post Editor'), + 'content' => $title_and_editor, + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

' . sprintf( -- /* translators: %s: URL to Press This bookmarklet. */ ++get_current_screen()->set_help_sidebar( ++ '

' . sprintf( + /* translators: %s: URL to Press This bookmarklet. */ - __( 'You can also create posts with the Press This bookmarklet.' ), - 'tools.php' - ) . '

' . @@ -70036,38 +69960,28 @@ - '

' . __( 'Documentation on Writing and Editing Posts' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+ __('Keyboard users: When you are working in the visual editor, you can use %s to access the toolbar.'), -+ 'Alt + F10' -+) . '

'; -+ -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'title-post-editor', -+ 'title' => __('Title and Post Editor'), -+ 'content' => $title_and_editor, -+ ) -+); -+ -+get_current_screen()->set_help_sidebar( -+ '

' . sprintf( -+ /* translators: %s: URL to Press This bookmarklet. */ + __('You can also create posts with the Press This bookmarklet.'), + 'tools.php' + ) . '

' . -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Writing and Editing Posts') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Writing and Editing Posts') . '

' . ++ '

' . __('Support forums') . '

' +); } elseif ( 'page' === $post_type ) { - $about_pages = '

' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.' ) . '

' . - '

' . __( 'Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.' ) . '

'; -- ++ $about_pages = '

' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.') . '

' . ++ '

' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.') . '

'; + - get_current_screen()->add_help_tab( - array( -- 'id' => 'about-pages', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'about-pages', - 'title' => __( 'About Pages' ), -- 'content' => $about_pages, -- ) ++ 'title' => __('About Pages'), + 'content' => $about_pages, + ) - ); - - get_current_screen()->set_help_sidebar( @@ -70076,80 +69990,63 @@ - '

' . __( 'Documentation on Editing Pages' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+ $about_pages = '

' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.') . '

' . -+ '

' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.') . '

'; -+ -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'about-pages', -+ 'title' => __('About Pages'), -+ 'content' => $about_pages, -+ ) +); + +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Adding New Pages') . '

' . -+ '

' . __('Documentation on Editing Pages') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('Documentation on Adding New Pages') . '

' . ++ '

' . __('Documentation on Editing Pages') . '

' . ++ '

' . __('Support forums') . '

' +); } elseif ( 'attachment' === $post_type ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'This screen allows you to edit fields for metadata in a file within the media library.' ) . '

' . - '

' . __( 'For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.' ) . '

' . - '

' . __( 'Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.' ) . '

' . - '

' . __( 'Remember to click Update to save metadata entered or changed.' ) . '

', -- ) ++ '

' . __('This screen allows you to edit fields for metadata in a file within the media library.') . '

' . ++ '

' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '

' . ++ '

' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '

' . ++ '

' . __('Remember to click Update to save metadata entered or changed.') . '

', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Edit Media' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

' . __('This screen allows you to edit fields for metadata in a file within the media library.') . '

' . -+ '

' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '

' . -+ '

' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '

' . -+ '

' . __('Remember to click Update to save metadata entered or changed.') . '

', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Edit Media') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('Documentation on Edit Media') . '

' . ++ '

' . __('Support forums') . '

' +); } if ( 'post' === $post_type || 'page' === $post_type ) { - $inserting_media = '

' . __( '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 “Create a new gallery” button.' ) . '

'; - $inserting_media .= '

' . __( '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. Learn more about embeds.' ) . '

'; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'inserting-media', -- 'title' => __( 'Inserting Media' ), -- 'content' => $inserting_media, -- ) -- ); + $inserting_media = '

' . __('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 “Create a new gallery” button.') . '

'; + $inserting_media .= '

' . __('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. Learn more about embeds.') . '

'; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'inserting-media', -+ 'title' => __('Inserting Media'), -+ 'content' => $inserting_media, -+ ) + 'id' => 'inserting-media', +- 'title' => __( 'Inserting Media' ), ++ 'title' => __('Inserting Media'), + 'content' => $inserting_media, + ) +- ); +); } @@ -70184,62 +70081,50 @@ - get_current_screen()->add_help_tab( - array( -- 'id' => 'publish-box', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'publish-box', - 'title' => __( 'Publish Settings' ), -- 'content' => $publish_box, -- ) ++ 'title' => __('Publish Settings'), + 'content' => $publish_box, + ) - ); -- ++); + - $discussion_settings = '

' . __( 'Send Trackbacks — Trackbacks are a way to notify legacy blog systems that you’ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.' ) . '

'; - $discussion_settings .= '

' . __( 'Discussion — You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.' ) . '

'; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'discussion-settings', -- 'title' => __( 'Discussion Settings' ), -- 'content' => $discussion_settings, -- ) -- ); -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'publish-box', -+ 'title' => __('Publish Settings'), -+ 'content' => $publish_box, -+ ) -+); -+ + $discussion_settings = '

' . __('Send Trackbacks — Trackbacks are a way to notify legacy blog systems that you’ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.') . '

'; + $discussion_settings .= '

' . __('Discussion — You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.') . '

'; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'discussion-settings', -+ 'title' => __('Discussion Settings'), -+ 'content' => $discussion_settings, -+ ) + 'id' => 'discussion-settings', +- 'title' => __( 'Discussion Settings' ), ++ 'title' => __('Discussion Settings'), + 'content' => $discussion_settings, + ) +- ); +); } elseif ( 'page' === $post_type ) { - $page_attributes = '

' . __( 'Parent — You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how many levels you can nest pages.' ) . '

' . - '

' . __( 'Template — Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them in this dropdown menu.' ) . '

' . - '

' . __( 'Order — Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.' ) . '

'; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'page-attributes', -- 'title' => __( 'Page Attributes' ), -- 'content' => $page_attributes, -- ) -- ); + $page_attributes = '

' . __('Parent — You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how many levels you can nest pages.') . '

' . + '

' . __('Template — Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them in this dropdown menu.') . '

' . + '

' . __('Order — Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '

'; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'page-attributes', -+ 'title' => __('Page Attributes'), -+ 'content' => $page_attributes, -+ ) + 'id' => 'page-attributes', +- 'title' => __( 'Page Attributes' ), ++ 'title' => __('Page Attributes'), + 'content' => $page_attributes, + ) +- ); +); } @@ -70261,71 +70146,48 @@ } ?> -@@ -442,39 +442,39 @@ if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create +@@ -442,31 +442,31 @@ if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create ' . $notice . '

', - array( -- 'type' => 'warning', -- 'id' => 'notice', -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + '

' . $notice . '

', + array( -+ 'type' => 'warning', -+ 'id' => 'notice', -+ 'paragraph_wrap' => false, -+ ) + 'type' => 'warning', + 'id' => 'notice', + 'paragraph_wrap' => false, + ) +- ); +); endif; if ( $message ) : - wp_admin_notice( - $message, - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- 'additional_classes' => array( 'updated' ), -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ 'additional_classes' => array( 'updated' ), -+ ) + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + ) +- ); +); endif; $connection_lost_message = sprintf( -- ' %1$s %2$s', + ' %1$s %2$s', - __( 'Connection lost. Saving has been disabled until you are reconnected.' ), - __( 'This post is being backed up in your browser, just in case.' ) -+ ' %1$s %2$s', -+ __('Connection lost. Saving has been disabled until you are reconnected.'), -+ __('This post is being backed up in your browser, just in case.') ++ __('Connection lost. Saving has been disabled until you are reconnected.'), ++ __('This post is being backed up in your browser, just in case.') ); wp_admin_notice( -- $connection_lost_message, -- array( -- 'id' => 'lost-connection-notice', -- 'additional_classes' => array( 'error', 'hidden' ), -- ) -+ $connection_lost_message, -+ array( -+ 'id' => 'lost-connection-notice', -+ 'additional_classes' => array( 'error', 'hidden' ), -+ ) - ); - ?> -
post_content, - 'content', - array( -- '_content_editor_dfw' => $_content_editor_dfw, -- 'drag_drop_upload' => true, -- 'tabfocus_elements' => 'content-html,save-post', -- 'editor_height' => 300, -- 'tinymce' => array( +wp_editor( + $post->post_content, + 'content', + array( -+ '_content_editor_dfw' => $_content_editor_dfw, -+ 'drag_drop_upload' => true, -+ 'tabfocus_elements' => 'content-html,save-post', -+ 'editor_height' => 300, -+ 'tinymce' => array( - 'resize' => false, - 'wp_autoresize_on' => $_wp_editor_expand, - 'add_unload_trigger' => false, + '_content_editor_dfw' => $_content_editor_dfw, + 'drag_drop_upload' => true, + 'tabfocus_elements' => 'content-html,save-post', +@@ -630,16 +630,16 @@ if ( post_type_supports( $post_type, 'editor' ) ) { 'wp_keep_scroll_position' => ! $is_IE, -- ), -- ) + ), + ) - ); -+ ), -+ ) +); ?> @@ -70522,10 +70373,10 @@ - mysql2date( __( 'F j, Y' ), $post->post_modified ), - mysql2date( __( 'g:i a' ), $post->post_modified ) - ); -+ __('Last edited by %1$s on %2$s at %3$s'), -+ esc_html($last_user->display_name), -+ mysql2date(__('F j, Y'), $post->post_modified), -+ mysql2date(__('g:i a'), $post->post_modified) ++ __('Last edited by %1$s on %2$s at %3$s'), ++ esc_html($last_user->display_name), ++ mysql2date(__('F j, Y'), $post->post_modified), ++ mysql2date(__('g:i a'), $post->post_modified) +); } else { - printf( @@ -70535,9 +70386,9 @@ - mysql2date( __( 'F j, Y' ), $post->post_modified ), - mysql2date( __( 'g:i a' ), $post->post_modified ) - ); -+ __('Last edited on %1$s at %2$s'), -+ mysql2date(__('F j, Y'), $post->post_modified), -+ mysql2date(__('g:i a'), $post->post_modified) ++ __('Last edited on %1$s at %2$s'), ++ mysql2date(__('F j, Y'), $post->post_modified), ++ mysql2date(__('g:i a'), $post->post_modified) +); } echo ''; @@ -70630,7 +70481,7 @@ try{document.post.title.focus();}catch(e){} diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php -index 93dea2eb91..bafa497626 100644 +index 93dea2eb91..380e1bd208 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -9,8 +9,8 @@ @@ -70644,7 +70495,7 @@ } /** -@@ -22,64 +22,64 @@ if ( ! defined( 'ABSPATH' ) ) { +@@ -22,11 +22,11 @@ if ( ! defined( 'ABSPATH' ) ) { */ global $post_type, $post_type_object, $post, $title, $wp_meta_boxes; @@ -70658,16 +70509,7 @@ // Default to is-fullscreen-mode to avoid jumps in the UI. add_filter( -- 'admin_body_class', -- static function ( $classes ) { -- return "$classes is-fullscreen-mode"; -- } -+ 'admin_body_class', -+ static function ( $classes ) { -+ return "$classes is-fullscreen-mode"; -+ } - ); - +@@ -39,46 +39,46 @@ add_filter( /* * Emoji replacement is disabled for now, until it plays nicely with React. */ @@ -70694,18 +70536,15 @@ '/wp/v2/taxonomies?context=view', - add_query_arg( - array( -- 'context' => 'edit', -- 'per_page' => -1, -- ), ++add_query_arg( ++ array( + 'context' => 'edit', + 'per_page' => -1, + ), - rest_get_route_for_post_type_items( 'wp_block' ) - ), - add_query_arg( 'context', 'edit', $rest_path ), - sprintf( '/wp/v2/types/%s?context=edit', $post_type ), -+add_query_arg( -+ array( -+ 'context' => 'edit', -+ 'per_page' => -1, -+ ), + rest_get_route_for_post_type_items('wp_block') +), + add_query_arg('context', 'edit', $rest_path), @@ -70729,16 +70568,13 @@ +block_editor_rest_api_preload($preload_paths, $block_editor_context); wp_add_inline_script( -- 'wp-blocks', + 'wp-blocks', - sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $post ) ) ), -- 'after' -+ 'wp-blocks', -+ sprintf('wp.blocks.setCategories( %s );', wp_json_encode(get_block_categories($post))), -+ 'after' ++ sprintf('wp.blocks.setCategories( %s );', wp_json_encode(get_block_categories($post))), + 'after' ); - /* -@@ -91,40 +91,40 @@ $is_new_post = false; +@@ -91,15 +91,15 @@ $is_new_post = false; if ( 'auto-draft' === $post->post_status ) { $is_new_post = true; // Override "(Auto Draft)" new post default title with empty string, or filtered value. @@ -70757,62 +70593,48 @@ $initial_edits['excerpt'] = $post->post_excerpt; } } - +@@ -107,23 +107,23 @@ if ( 'auto-draft' === $post->post_status ) { // Preload server-registered block schemas. wp_add_inline_script( -- 'wp-blocks', + 'wp-blocks', - 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' -+ 'wp-blocks', -+ 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode(get_block_editor_server_block_settings()) . ');' ++ 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode(get_block_editor_server_block_settings()) . ');' ); // Get admin url for handling meta boxes. -$meta_box_url = admin_url( 'post.php' ); +$meta_box_url = admin_url('post.php'); $meta_box_url = add_query_arg( -- array( -- 'post' => $post->ID, -- 'action' => 'edit', -- 'meta-box-loader' => true, + array( + 'post' => $post->ID, + 'action' => 'edit', + 'meta-box-loader' => true, - 'meta-box-loader-nonce' => wp_create_nonce( 'meta-box-loader' ), -- ), -- $meta_box_url -+ array( -+ 'post' => $post->ID, -+ 'action' => 'edit', -+ 'meta-box-loader' => true, -+ 'meta-box-loader-nonce' => wp_create_nonce('meta-box-loader'), -+ ), -+ $meta_box_url ++ 'meta-box-loader-nonce' => wp_create_nonce('meta-box-loader'), + ), + $meta_box_url ); wp_add_inline_script( -- 'wp-editor', + 'wp-editor', - sprintf( 'var _wpMetaBoxUrl = %s;', wp_json_encode( $meta_box_url ) ), -- 'before' -+ 'wp-editor', -+ sprintf('var _wpMetaBoxUrl = %s;', wp_json_encode($meta_box_url)), -+ 'before' ++ sprintf('var _wpMetaBoxUrl = %s;', wp_json_encode($meta_box_url)), + 'before' ); - /* @@ -133,30 +133,30 @@ wp_add_inline_script( * not empty so we do not trigger the template select element without any options * besides the default value. */ -$available_templates = wp_get_theme()->get_page_templates( get_post( $post->ID ) ); -$available_templates = ! empty( $available_templates ) ? array_replace( -- array( -- /** This filter is documented in wp-admin/includes/meta-boxes.php */ -- '' => apply_filters( 'default_page_template_title', __( 'Default template' ), 'rest-api' ), -- ), -- $available_templates +$available_templates = wp_get_theme()->get_page_templates(get_post($post->ID)); +$available_templates = ! empty($available_templates) ? array_replace( -+ array( -+ /** This filter is documented in wp-admin/includes/meta-boxes.php */ -+ '' => apply_filters('default_page_template_title', __('Default template'), 'rest-api'), -+ ), -+ $available_templates + array( + /** This filter is documented in wp-admin/includes/meta-boxes.php */ +- '' => apply_filters( 'default_page_template_title', __( 'Default template' ), 'rest-api' ), ++ '' => apply_filters('default_page_template_title', __('Default template'), 'rest-api'), + ), + $available_templates ) : $available_templates; // Lock settings. @@ -70923,19 +70745,6 @@ $editor_settings['template'] = array( array( "core/$post_format" ) ); } } -@@ -247,9 +247,9 @@ if ( wp_is_block_theme() && $editor_settings['supportsTemplateMode'] ) { - * Scripts - */ - wp_enqueue_media( -- array( -- 'post' => $post->ID, -- ) -+ array( -+ 'post' => $post->ID, -+ ) - ); - wp_tinymce_inline_scripts(); - wp_enqueue_editor(); @@ -257,7 +257,7 @@ wp_enqueue_editor(); /** * Styles @@ -70970,20 +70779,14 @@ $init_script = <<post_type, -- $post->ID, +@@ -297,20 +297,20 @@ $script = sprintf( + $init_script, + $post->post_type, + $post->ID, - wp_json_encode( $editor_settings ), - wp_json_encode( $initial_edits ) -+ $init_script, -+ $post->post_type, -+ $post->ID, -+ wp_json_encode($editor_settings), -+ wp_json_encode($initial_edits) ++ wp_json_encode($editor_settings), ++ wp_json_encode($initial_edits) ); -wp_add_inline_script( 'wp-edit-post', $script ); +wp_add_inline_script('wp-edit-post', $script); @@ -71022,8 +70825,8 @@ - __( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or activate the Classic Editor plugin.' ), - esc_url( $plugin_activate_url ) - ); -+ __('The block editor requires JavaScript. Please enable JavaScript in your browser settings, or activate the Classic Editor plugin.'), -+ esc_url($plugin_activate_url) ++ __('The block editor requires JavaScript. Please enable JavaScript in your browser settings, or activate the Classic Editor plugin.'), ++ esc_url($plugin_activate_url) +); } else { // If Classic Editor is not installed, provide a link to install it. @@ -71036,8 +70839,8 @@ - __( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or install the Classic Editor plugin.' ), - esc_url( $plugin_install_url ) - ); -+ __('The block editor requires JavaScript. Please enable JavaScript in your browser settings, or install the Classic Editor plugin.'), -+ esc_url($plugin_install_url) ++ __('The block editor requires JavaScript. Please enable JavaScript in your browser settings, or install the Classic Editor plugin.'), ++ esc_url($plugin_install_url) +); } @@ -71055,15 +70858,14 @@ + $message, + array( 'type' => 'error', -- ) + ) - ); -+ ) +); ?> diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php -index 134c8bb05d..7f61981c43 100644 +index 134c8bb05d..278c8e51ba 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -7,8 +7,8 @@ @@ -71167,20 +70969,16 @@ - $comment->comment_content, - 'content', - array( -- 'media_buttons' => false, -- 'tinymce' => false, -- 'quicktags' => $quicktags_settings, -- ) -- ); -- wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); +wp_editor( + $comment->comment_content, + 'content', + array( -+ 'media_buttons' => false, -+ 'tinymce' => false, -+ 'quicktags' => $quicktags_settings, -+ ) + 'media_buttons' => false, + 'tinymce' => false, + 'quicktags' => $quicktags_settings, + ) +- ); +- wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); +); + wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?> @@ -71238,15 +71036,13 @@ $submitted = sprintf( /* translators: 1: Comment date, 2: Comment time. */ - __( '%1$s at %2$s' ), -- /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ ++ __('%1$s at %2$s'), + /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ - date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $comment->comment_date ) ), -- /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ ++ date_i18n(_x('M j, Y', 'publish box date format'), strtotime($comment->comment_date)), + /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ - date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $comment->comment_date ) ) -+ __('%1$s at %2$s'), -+ /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ -+ date_i18n(_x('M j, Y', 'publish box date format'), strtotime($comment->comment_date)), -+ /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ -+ date_i18n(_x('H:i', 'publish box time format'), strtotime($comment->comment_date)) ++ date_i18n(_x('H:i', 'publish box time format'), strtotime($comment->comment_date)) ); ?> @@ -71392,7 +71188,7 @@ diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php -index 1bbb32d3a6..faf76ce825 100644 +index 1bbb32d3a6..ecef25cf61 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -7,34 +7,34 @@ @@ -71443,7 +71239,7 @@ /** * Fires when link-specific meta boxes are added. -@@ -43,38 +43,38 @@ do_action( 'add_meta_boxes', 'link', $link ); +@@ -43,14 +43,14 @@ do_action( 'add_meta_boxes', 'link', $link ); * * @param object $link Link object. */ @@ -71461,44 +71257,30 @@ +do_action('do_meta_boxes', 'link', 'side', $link); add_screen_option( -- 'layout_columns', -- array( -- 'max' => 2, -- 'default' => 2, -- ) -+ 'layout_columns', -+ array( -+ 'max' => 2, -+ 'default' => 2, -+ ) - ); - + 'layout_columns', +@@ -63,18 +63,18 @@ add_screen_option( get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link’s web address and name (the text you want to display on your site as the link) are required fields.' ) . '

' . - '

' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you do not use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '

' . - '

' . __( 'XFN stands for XHTML Friends Network, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '

', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

' . __('You can add or edit links on this screen by entering information in each of the boxes. Only the link’s web address and name (the text you want to display on your site as the link) are required fields.') . '

' . -+ '

' . __('The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you do not use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.') . '

' . -+ '

' . __('XFN stands for XHTML Friends Network, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.') . '

', -+ ) ++ '

' . __('You can add or edit links on this screen by entering information in each of the boxes. Only the link’s web address and name (the text you want to display on your site as the link) are required fields.') . '

' . ++ '

' . __('The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you do not use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.') . '

' . ++ '

' . __('XFN stands for XHTML Friends Network, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.') . '

', + ) ); get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Creating Links' ) . '

' . - '

' . __( 'Support forums' ) . '

' -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Creating Links') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Creating Links') . '

' . ++ '

' . __('Support forums') . '

' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -71521,19 +71303,15 @@ - wp_admin_notice( - __( 'Link added.' ), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); +if ( isset($_GET['added']) ) { +wp_admin_notice( + __('Link added.'), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +); } ?> @@ -71614,7 +71392,7 @@ ?> diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php -index 8126f84556..29cdcf2106 100644 +index 8126f84556..58a18d58a2 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -7,8 +7,8 @@ @@ -71688,18 +71466,14 @@ - wp_admin_notice( - $message, - array( -- 'type' => $class, -- 'id' => 'message', -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => $class, -+ 'id' => 'message', -+ 'paragraph_wrap' => false, -+ ) + 'type' => $class, + 'id' => 'message', + 'paragraph_wrap' => false, + ) +- ); +); } ?> @@ -71880,7 +71654,7 @@ diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php -index 947db5ffc5..a39cf449f9 100644 +index 947db5ffc5..d1e0fed7e9 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -10,25 +10,25 @@ @@ -71914,7 +71688,7 @@ +if ( ! current_user_can($tax->cap->manage_terms) ) { +wp_die( + '

' . __('You need a higher level of permission.') . '

' . -+ '

' . __('Sorry, you are not allowed to manage terms in this taxonomy.') . '

', ++ '

' . __('Sorry, you are not allowed to manage terms in this taxonomy.') . '

', + 403 +); } @@ -71929,33 +71703,7 @@ $pagenum = $wp_list_table->get_pagenum(); $title = $tax->labels->name; -@@ -55,166 +55,166 @@ if ( 'post' !== $post_type ) { - } - - add_screen_option( -- 'per_page', -- array( -- 'default' => 20, -- 'option' => 'edit_' . $tax->name . '_per_page', -- ) -+ 'per_page', -+ array( -+ 'default' => 20, -+ 'option' => 'edit_' . $tax->name . '_per_page', -+ ) - ); - - get_current_screen()->set_screen_reader_content( -- array( -- 'heading_pagination' => $tax->labels->items_list_navigation, -- 'heading_list' => $tax->labels->items_list, -- ) -+ array( -+ 'heading_pagination' => $tax->labels->items_list_navigation, -+ 'heading_list' => $tax->labels->items_list, -+ ) - ); - +@@ -72,149 +72,149 @@ get_current_screen()->set_screen_reader_content( $location = false; $referer = wp_get_referer(); if ( ! $referer ) { // For POST requests. @@ -71968,18 +71716,20 @@ case 'add-tag': - check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); -+ check_admin_referer('add-tag', '_wpnonce_add-tag'); - +- - if ( ! current_user_can( $tax->cap->edit_terms ) ) { - wp_die( - '

' . __( 'You need a higher level of permission.' ) . '

' . - '

' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '

', +- 403 +- ); ++ check_admin_referer('add-tag', '_wpnonce_add-tag'); ++ + if ( ! current_user_can($tax->cap->edit_terms) ) { +wp_die( -+ '

' . __('You need a higher level of permission.') . '

' . ++ '

' . __('You need a higher level of permission.') . '

' . + '

' . __('Sorry, you are not allowed to create terms in this taxonomy.') . '

', - 403 -- ); ++ 403 +); } @@ -71991,13 +71741,15 @@ + $location = add_query_arg('message', 1, $referer); } else { - $location = add_query_arg( +- array( +$location = add_query_arg( - array( ++ array( 'error' => true, 'message' => 4, ), - $referer +- $referer - ); ++ $referer +); } @@ -72011,18 +71763,20 @@ $tag_ID = (int) $_REQUEST['tag_ID']; - check_admin_referer( 'delete-tag_' . $tag_ID ); -+ check_admin_referer('delete-tag_' . $tag_ID); - +- - if ( ! current_user_can( 'delete_term', $tag_ID ) ) { - wp_die( - '

' . __( 'You need a higher level of permission.' ) . '

' . - '

' . __( 'Sorry, you are not allowed to delete this item.' ) . '

', +- 403 +- ); ++ check_admin_referer('delete-tag_' . $tag_ID); ++ + if ( ! current_user_can('delete_term', $tag_ID) ) { +wp_die( -+ '

' . __('You need a higher level of permission.') . '

' . ++ '

' . __('You need a higher level of permission.') . '

' . + '

' . __('Sorry, you are not allowed to delete this item.') . '

', - 403 -- ); ++ 403 +); } @@ -72040,18 +71794,20 @@ case 'bulk-delete': - check_admin_referer( 'bulk-tags' ); -+ check_admin_referer('bulk-tags'); - +- - if ( ! current_user_can( $tax->cap->delete_terms ) ) { - wp_die( - '

' . __( 'You need a higher level of permission.' ) . '

' . - '

' . __( 'Sorry, you are not allowed to delete these items.' ) . '

', +- 403 +- ); ++ check_admin_referer('bulk-tags'); ++ + if ( ! current_user_can($tax->cap->delete_terms) ) { +wp_die( -+ '

' . __('You need a higher level of permission.') . '

' . ++ '

' . __('You need a higher level of permission.') . '

' . + '

' . __('Sorry, you are not allowed to delete these items.') . '

', - 403 -- ); ++ 403 +); } @@ -72088,18 +71844,20 @@ case 'editedtag': $tag_ID = (int) $_POST['tag_ID']; - check_admin_referer( 'update-tag_' . $tag_ID ); -+ check_admin_referer('update-tag_' . $tag_ID); - +- - if ( ! current_user_can( 'edit_term', $tag_ID ) ) { - wp_die( - '

' . __( 'You need a higher level of permission.' ) . '

' . - '

' . __( 'Sorry, you are not allowed to edit this item.' ) . '

', +- 403 +- ); ++ check_admin_referer('update-tag_' . $tag_ID); ++ + if ( ! current_user_can('edit_term', $tag_ID) ) { +wp_die( -+ '

' . __('You need a higher level of permission.') . '

' . ++ '

' . __('You need a higher level of permission.') . '

' . + '

' . __('Sorry, you are not allowed to edit this item.') . '

', - 403 -- ); ++ 403 +); } @@ -72119,13 +71877,15 @@ + $location = add_query_arg('message', 3, $referer); } else { - $location = add_query_arg( +- array( +$location = add_query_arg( - array( ++ array( 'error' => true, 'message' => 5, ), - $referer +- $referer - ); ++ $referer +); } break; @@ -72216,17 +71976,14 @@ - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', -- 'title' => __( 'Overview' ), -- 'content' => $help, -- ) -- ); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $help, -+ ) + 'id' => 'overview', +- 'title' => __( 'Overview' ), ++ 'title' => __('Overview'), + 'content' => $help, + ) +- ); +); if ( 'category' === $taxonomy || 'post_tag' === $taxonomy ) { @@ -72264,9 +72021,8 @@ - 'title' => 'category' === $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ), + 'title' => 'category' === $taxonomy ? __('Adding Categories') : __('Adding Tags'), 'content' => $help, -- ) + ) - ); -+ ) +); } @@ -72340,19 +72096,15 @@ - wp_admin_notice( - $message, - array( -- 'id' => 'message', -- 'additional_classes' => array( $class ), -- 'dismissible' => true, -- ) -- ); -- $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] ); +wp_admin_notice( + $message, + array( -+ 'id' => 'message', -+ 'additional_classes' => array( $class ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( $class ), + 'dismissible' => true, + ) +- ); +- $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] ); +); + $_SERVER['REQUEST_URI'] = remove_query_arg(array( 'message', 'error' ), $_SERVER['REQUEST_URI']); endif; @@ -72574,7 +72326,7 @@ - ); + __('Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the default category %s. The default category cannot be deleted.'), + /** This filter is documented in wp-includes/category-template.php */ -+ '' . apply_filters('the_category', get_cat_name(get_option('default_category')), '', '') . '' ++ '' . apply_filters('the_category', get_cat_name(get_option('default_category')), '', '') . '' +); ?>

@@ -72622,7 +72374,7 @@ if ( $can_edit_terms ) { ?> diff --git a/wp-admin/edit.php b/wp-admin/edit.php -index 6e4a05eabc..05af1c56f4 100644 +index 6e4a05eabc..4bdc028421 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -15,15 +15,15 @@ require_once __DIR__ . '/admin.php'; @@ -72666,7 +72418,7 @@ +if ( ! current_user_can($post_type_object->cap->edit_posts) ) { +wp_die( + '

' . __('You need a higher level of permission.') . '

' . -+ '

' . __('Sorry, you are not allowed to edit posts in this post type.') . '

', ++ '

' . __('Sorry, you are not allowed to edit posts in this post type.') . '

', + 403 +); } @@ -72774,15 +72526,17 @@ } - $sendback = add_query_arg( +- array( +$sendback = add_query_arg( - array( ++ array( 'trashed' => $trashed, - 'ids' => implode( ',', $post_ids ), + 'ids' => implode(',', $post_ids), 'locked' => $locked, ), - $sendback +- $sendback - ); ++ $sendback +); break; case 'untrash': @@ -72866,7 +72620,7 @@ } } break; -@@ -219,179 +219,179 @@ if ( $doaction ) { +@@ -219,113 +219,113 @@ if ( $doaction ) { * @param array $items The items to take the action on. Accepts an array of IDs of posts, * comments, terms, links, plugins, attachments, or users. */ @@ -72908,31 +72662,26 @@ if ( 'post' === $post_type ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.' ) . '

', -- ) ++ '

' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '

', + ) - ); - get_current_screen()->add_help_tab( - array( -- 'id' => 'screen-content', -- 'title' => __( 'Screen Content' ), -- 'content' => -- '

' . __( 'You can customize the display of this screen’s contents in a number of ways:' ) . '

' . -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '

', -+ ) +); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'screen-content', -+ 'title' => __('Screen Content'), -+ 'content' => + 'id' => 'screen-content', +- 'title' => __( 'Screen Content' ), ++ 'title' => __('Screen Content'), + 'content' => +- '

' . __( 'You can customize the display of this screen’s contents in a number of ways:' ) . '

' . + '

' . __('You can customize the display of this screen’s contents in a number of ways:') . '

' . '
    ' . - '
  • ' . __( 'You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.' ) . '
  • ' . @@ -72944,21 +72693,18 @@ + '
  • ' . __('You can view posts in a simple title list or with an excerpt using the Screen Options tab.') . '
  • ' . + '
  • ' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '
  • ' . '
', -- ) + ) - ); - get_current_screen()->add_help_tab( - array( -- 'id' => 'action-links', -- 'title' => __( 'Available Actions' ), -- 'content' => -- '

' . __( 'Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:' ) . '

' . -+ ) +); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'action-links', -+ 'title' => __('Available Actions'), -+ 'content' => + 'id' => 'action-links', +- 'title' => __( 'Available Actions' ), ++ 'title' => __('Available Actions'), + 'content' => +- '

' . __( 'Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:' ) . '

' . + '

' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '

' . '
    ' . - '
  • ' . __( 'Edit takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.' ) . '
  • ' . @@ -72970,122 +72716,87 @@ + '
  • ' . __('Trash removes your post from this list and places it in the Trash, from which you can permanently delete it.') . '
  • ' . + '
  • ' . __('Preview will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post’s status.') . '
  • ' . '
', -- ) + ) - ); - get_current_screen()->add_help_tab( - array( -- 'id' => 'bulk-actions', -- 'title' => __( 'Bulk actions' ), -- 'content' => -- '

' . __( 'You can also edit or move multiple posts to the Trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk actions menu and click Apply.' ) . '

' . -- '

' . sprintf( -+ ) +); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'bulk-actions', -+ 'title' => __('Bulk actions'), -+ 'content' => + 'id' => 'bulk-actions', +- 'title' => __( 'Bulk actions' ), ++ 'title' => __('Bulk actions'), + 'content' => +- '

' . __( 'You can also edit or move multiple posts to the Trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk actions menu and click Apply.' ) . '

' . +- '

' . sprintf( + '

' . __('You can also edit or move multiple posts to the Trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk actions menu and click Apply.') . '

' . + '

' . sprintf( /* translators: %s: The dismiss dashicon used for buttons that dismiss or remove. */ - __( 'When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the %sremove button next to its name in the Bulk Edit area that appears.' ), - '' - ) . '

', -- ) ++ __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the %sremove button next to its name in the Bulk Edit area that appears.'), ++ '' ++ ) . '

', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Managing Posts' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+ __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the %sremove button next to its name in the Bulk Edit area that appears.'), -+ '' -+ ) . '

', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Managing Posts') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('Documentation on Managing Posts') . '

' . ++ '

' . __('Support forums') . '

' +); } elseif ( 'page' === $post_type ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.' ) . '

', -- ) ++ '

' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.') . '

', + ) - ); - get_current_screen()->add_help_tab( - array( -- 'id' => 'managing-pages', ++); ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'managing-pages', - 'title' => __( 'Managing Pages' ), -- 'content' => ++ 'title' => __('Managing Pages'), + 'content' => - '

' . __( 'Managing pages is very similar to managing posts, and the screens can be customized in the same way.' ) . '

' . - '

' . __( 'You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk actions menu to edit the metadata for multiple pages at once.' ) . '

', -- ) ++ '

' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '

' . ++ '

' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk actions menu to edit the metadata for multiple pages at once.') . '

', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Managing Pages' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.') . '

', -+ ) -+); -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'managing-pages', -+ 'title' => __('Managing Pages'), -+ 'content' => -+ '

' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '

' . -+ '

' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk actions menu to edit the metadata for multiple pages at once.') . '

', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Managing Pages') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('Documentation on Managing Pages') . '

' . ++ '

' . __('Support forums') . '

' +); } - get_current_screen()->set_screen_reader_content( -- array( -- 'heading_views' => $post_type_object->labels->filter_items_list, -- 'heading_pagination' => $post_type_object->labels->items_list_navigation, -- 'heading_list' => $post_type_object->labels->items_list, -- ) -+ array( -+ 'heading_views' => $post_type_object->labels->filter_items_list, -+ 'heading_pagination' => $post_type_object->labels->items_list_navigation, -+ 'heading_list' => $post_type_object->labels->items_list, -+ ) - ); - - add_screen_option( -- 'per_page', -- array( -- 'default' => 20, -- 'option' => 'edit_' . $post_type . '_per_page', -- ) -+ 'per_page', -+ array( -+ 'default' => 20, -+ 'option' => 'edit_' . $post_type . '_per_page', -+ ) +@@ -346,52 +346,52 @@ add_screen_option( ); $bulk_counts = array( @@ -73240,14 +72951,15 @@ - if ( 1 === count( $ids ) && current_user_can( 'edit_post', $ids[0] ) ) { - $messages[] = sprintf( -+ if ( 1 === count($ids) && current_user_can('edit_post', $ids[0]) ) { -+$messages[] = sprintf( - '%2$s', +- '%2$s', - esc_url( get_edit_post_link( $ids[0] ) ), - esc_html( get_post_type_object( get_post_type( $ids[0] ) )->labels->edit_item ) - ); -+ esc_url(get_edit_post_link($ids[0])), -+ esc_html(get_post_type_object(get_post_type($ids[0]))->labels->edit_item) ++ if ( 1 === count($ids) && current_user_can('edit_post', $ids[0]) ) { ++$messages[] = sprintf( ++ '%2$s', ++ esc_url(get_edit_post_link($ids[0])), ++ esc_html(get_post_type_object(get_post_type($ids[0]))->labels->edit_item) +); } } @@ -73257,18 +72969,14 @@ - wp_admin_notice( - implode( ' ', $messages ), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); +wp_admin_notice( + implode(' ', $messages), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +); } -unset( $messages ); @@ -73302,7 +73010,7 @@ diff --git a/wp-admin/erase-personal-data.php b/wp-admin/erase-personal-data.php -index 9a17c2b346..e4ffb6e9d4 100644 +index 9a17c2b346..327ef3207f 100644 --- a/wp-admin/erase-personal-data.php +++ b/wp-admin/erase-personal-data.php @@ -9,61 +9,61 @@ @@ -73321,88 +73029,76 @@ // Contextual help - choose Help on the top right of admin panel to preview this. get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'This screen is where you manage requests to erase personal data.' ) . '

' . - '

' . __( 'Privacy Laws around the world require businesses and online services to delete, anonymize, or forget the data they collect about an individual. The rights those laws enshrine are sometimes called the "Right to be Forgotten".' ) . '

' . - '

' . __( 'The tool associates data stored in WordPress with a supplied email address, including profile data and comments.' ) . '

' . - '

' . __( 'Note: As this tool only gathers data from WordPress and participating plugins, you may need to do more to comply with erasure requests. For example, you are also responsible for ensuring that data collected by or stored with the 3rd party services your organization uses gets deleted.' ) . '

', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

' . __('This screen is where you manage requests to erase personal data.') . '

' . + '

' . __('Privacy Laws around the world require businesses and online services to delete, anonymize, or forget the data they collect about an individual. The rights those laws enshrine are sometimes called the "Right to be Forgotten".') . '

' . + '

' . __('The tool associates data stored in WordPress with a supplied email address, including profile data and comments.') . '

' . + '

' . __('Note: As this tool only gathers data from WordPress and participating plugins, you may need to do more to comply with erasure requests. For example, you are also responsible for ensuring that data collected by or stored with the 3rd party services your organization uses gets deleted.') . '

', -+ ) + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'default-data', + array( + 'id' => 'default-data', - 'title' => __( 'Default Data' ), -- 'content' => ++ 'title' => __('Default Data'), + 'content' => - '

' . __( 'WordPress collects (but never publishes) a limited amount of data from logged-in users but then deletes it or anonymizes it. That data can include:' ) . '

' . - '

' . __( 'Profile Information — user email address, username, display name, nickname, first name, last name, description/bio, and registration date.' ) . '

' . - '

' . __( 'Community Events Location — The IP Address of the user which is used for the Upcoming Community Events shown in the dashboard widget.' ) . '

' . - '

' . __( 'Session Tokens — User login information, IP Addresses, Expiration Date, User Agent (Browser/OS), and Last Login.' ) . '

' . - '

' . __( 'Comments — WordPress does not delete comments. The software does anonymize (but, again, never publishes) the associated Email Address, IP Address, and User Agent (Browser/OS).' ) . '

' . - '

' . __( 'Media — A list of URLs for all media file uploads made by the user.' ) . '

', -- ) -+ array( -+ 'id' => 'default-data', -+ 'title' => __('Default Data'), -+ 'content' => + '

' . __('WordPress collects (but never publishes) a limited amount of data from logged-in users but then deletes it or anonymizes it. That data can include:') . '

' . + '

' . __('Profile Information — user email address, username, display name, nickname, first name, last name, description/bio, and registration date.') . '

' . + '

' . __('Community Events Location — The IP Address of the user which is used for the Upcoming Community Events shown in the dashboard widget.') . '

' . + '

' . __('Session Tokens — User login information, IP Addresses, Expiration Date, User Agent (Browser/OS), and Last Login.') . '

' . + '

' . __('Comments — WordPress does not delete comments. The software does anonymize (but, again, never publishes) the associated Email Address, IP Address, and User Agent (Browser/OS).') . '

' . + '

' . __('Media — A list of URLs for all media file uploads made by the user.') . '

', -+ ) + ) ); $privacy_policy_guide = '

' . sprintf( /* translators: %s: URL to Privacy Policy Guide screen. */ - __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the Privacy Policy Guide.' ), - admin_url( 'options-privacy.php?tab=policyguide' ) -+ __('If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the Privacy Policy Guide.'), -+ admin_url('options-privacy.php?tab=policyguide') ++ __('If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the Privacy Policy Guide.'), ++ admin_url('options-privacy.php?tab=policyguide') ) . '

'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'plugin-data', + array( + 'id' => 'plugin-data', - 'title' => __( 'Plugin Data' ), -- 'content' => ++ 'title' => __('Plugin Data'), + 'content' => - '

' . __( '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.' ) . '

' . - '

' . __( 'If you are a plugin author, you can learn more about how to add support for the Personal Data Eraser to a plugin here.' ) . '

' . -+ array( -+ 'id' => 'plugin-data', -+ 'title' => __('Plugin Data'), -+ 'content' => + '

' . __('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.') . '

' . + '

' . __('If you are a plugin author, you can learn more about how to add support for the Personal Data Eraser to a plugin here.') . '

' . $privacy_policy_guide, -- ) -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Erase Personal Data' ) . '

' . - '

' . __( 'Support forums' ) . '

' -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Erase Personal Data') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Erase Personal Data') . '

' . ++ '

' . __('Support forums') . '

' ); // Handle list table actions. -@@ -72,14 +72,14 @@ _wp_personal_data_handle_actions(); +@@ -72,7 +72,7 @@ _wp_personal_data_handle_actions(); // Cleans up failed and expired requests before displaying the list table. _wp_personal_data_cleanup_requests(); @@ -73410,20 +73106,8 @@ +wp_enqueue_script('privacy-tools'); add_screen_option( -- 'per_page', -- array( -- 'default' => 20, -- 'option' => 'remove_personal_data_requests_per_page', -- ) -+ 'per_page', -+ array( -+ 'default' => 20, -+ 'option' => 'remove_personal_data_requests_per_page', -+ ) - ); - - $_list_table_args = array( -@@ -87,14 +87,14 @@ $_list_table_args = array( + 'per_page', +@@ -87,13 +87,13 @@ $_list_table_args = array( 'singular' => 'privacy_request', ); @@ -73431,19 +73115,16 @@ +$requests_table = _get_list_table('WP_Privacy_Data_Removal_Requests_List_Table', $_list_table_args); $requests_table->screen->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter erase personal data list' ), - 'heading_pagination' => __( 'Erase personal data list navigation' ), - 'heading_list' => __( 'Erase personal data list' ), -- ) -+ array( -+ 'heading_views' => __('Filter erase personal data list'), -+ 'heading_pagination' => __('Erase personal data list navigation'), -+ 'heading_list' => __('Erase personal data list'), -+ ) ++ 'heading_views' => __('Filter erase personal data list'), ++ 'heading_pagination' => __('Erase personal data list navigation'), ++ 'heading_list' => __('Erase personal data list'), + ) ); - $requests_table->process_bulk_action(); @@ -104,19 +104,19 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?> @@ -73511,7 +73192,7 @@ diff --git a/wp-admin/export-personal-data.php b/wp-admin/export-personal-data.php -index 2eedd90aa3..727c04c623 100644 +index 2eedd90aa3..6ef16754cb 100644 --- a/wp-admin/export-personal-data.php +++ b/wp-admin/export-personal-data.php @@ -9,61 +9,61 @@ @@ -73530,88 +73211,76 @@ // Contextual help - choose Help on the top right of admin panel to preview this. get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

' . __( 'This screen is where you manage requests for an export of personal data.' ) . '

' . - '

' . __( 'Privacy Laws around the world require businesses and online services to provide an export of some of the data they collect about an individual, and to deliver that export on request. The rights those laws enshrine are sometimes called the "Right of Data Portability". It allows individuals to obtain and reuse their personal data for their own purposes across different services. It allows them to move, copy or transfer personal data easily from one IT environment to another.' ) . '

' . - '

' . __( 'The tool associates data stored in WordPress with a supplied email address, including profile data and comments.' ) . '

' . - '

' . __( 'Note: Since this tool only gathers data from WordPress and participating plugins, you may need to do more to comply with export requests. For example, you should also send the requester some of the data collected from or stored with the 3rd party services your organization uses.' ) . '

', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

' . __('This screen is where you manage requests for an export of personal data.') . '

' . + '

' . __('Privacy Laws around the world require businesses and online services to provide an export of some of the data they collect about an individual, and to deliver that export on request. The rights those laws enshrine are sometimes called the "Right of Data Portability". It allows individuals to obtain and reuse their personal data for their own purposes across different services. It allows them to move, copy or transfer personal data easily from one IT environment to another.') . '

' . + '

' . __('The tool associates data stored in WordPress with a supplied email address, including profile data and comments.') . '

' . + '

' . __('Note: Since this tool only gathers data from WordPress and participating plugins, you may need to do more to comply with export requests. For example, you should also send the requester some of the data collected from or stored with the 3rd party services your organization uses.') . '

', -+ ) + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'default-data', + array( + 'id' => 'default-data', - 'title' => __( 'Default Data' ), -- 'content' => ++ 'title' => __('Default Data'), + 'content' => - '

' . __( 'WordPress collects (but never publishes) a limited amount of data from registered users who have logged in to the site. Generally, these users are people who contribute to the site in some way -- content, store management, and so on. With rare exceptions, these users do not include occasional visitors who might have registered to comment on articles or buy products. The data WordPress retains can include:' ) . '

' . - '

' . __( 'Profile Information — user email address, username, display name, nickname, first name, last name, description/bio, and registration date.' ) . '

' . - '

' . __( 'Community Events Location — The IP Address of the user, which populates the Upcoming Community Events dashboard widget with relevant information.' ) . '

' . - '

' . __( 'Session Tokens — User login information, IP Addresses, Expiration Date, User Agent (Browser/OS), and Last Login.' ) . '

' . - '

' . __( 'Comments — For user comments, Email Address, IP Address, User Agent (Browser/OS), Date/Time, Comment Content, and Content URL.' ) . '

' . - '

' . __( 'Media — A list of URLs for media files the user uploads.' ) . '

', -- ) -+ array( -+ 'id' => 'default-data', -+ 'title' => __('Default Data'), -+ 'content' => + '

' . __('WordPress collects (but never publishes) a limited amount of data from registered users who have logged in to the site. Generally, these users are people who contribute to the site in some way -- content, store management, and so on. With rare exceptions, these users do not include occasional visitors who might have registered to comment on articles or buy products. The data WordPress retains can include:') . '

' . + '

' . __('Profile Information — user email address, username, display name, nickname, first name, last name, description/bio, and registration date.') . '

' . + '

' . __('Community Events Location — The IP Address of the user, which populates the Upcoming Community Events dashboard widget with relevant information.') . '

' . + '

' . __('Session Tokens — User login information, IP Addresses, Expiration Date, User Agent (Browser/OS), and Last Login.') . '

' . + '

' . __('Comments — For user comments, Email Address, IP Address, User Agent (Browser/OS), Date/Time, Comment Content, and Content URL.') . '

' . + '

' . __('Media — A list of URLs for media files the user uploads.') . '

', -+ ) + ) ); $privacy_policy_guide = '

' . sprintf( /* translators: %s: URL to Privacy Policy Guide screen. */ - __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the Privacy Policy Guide.' ), - admin_url( 'options-privacy.php?tab=policyguide' ) -+ __('If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the Privacy Policy Guide.'), -+ admin_url('options-privacy.php?tab=policyguide') ++ __('If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the Privacy Policy Guide.'), ++ admin_url('options-privacy.php?tab=policyguide') ) . '

'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'plugin-data', + array( + 'id' => 'plugin-data', - 'title' => __( 'Plugin Data' ), -- 'content' => ++ 'title' => __('Plugin Data'), + 'content' => - '

' . __( '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.' ) . '

' . - '

' . __( 'Plugin authors can learn more about how to add the Personal Data Exporter to a plugin here.' ) . '

' . -+ array( -+ 'id' => 'plugin-data', -+ 'title' => __('Plugin Data'), -+ 'content' => + '

' . __('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.') . '

' . + '

' . __('Plugin authors can learn more about how to add the Personal Data Exporter to a plugin here.') . '

' . $privacy_policy_guide, -- ) -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Export Personal Data' ) . '

' . - '

' . __( 'Support forums' ) . '

' -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Export Personal Data') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Export Personal Data') . '

' . ++ '

' . __('Support forums') . '

' ); // Handle list table actions. -@@ -72,14 +72,14 @@ _wp_personal_data_handle_actions(); +@@ -72,7 +72,7 @@ _wp_personal_data_handle_actions(); // Cleans up failed and expired requests before displaying the list table. _wp_personal_data_cleanup_requests(); @@ -73619,20 +73288,8 @@ +wp_enqueue_script('privacy-tools'); add_screen_option( -- 'per_page', -- array( -- 'default' => 20, -- 'option' => 'export_personal_data_requests_per_page', -- ) -+ 'per_page', -+ array( -+ 'default' => 20, -+ 'option' => 'export_personal_data_requests_per_page', -+ ) - ); - - $_list_table_args = array( -@@ -87,14 +87,14 @@ $_list_table_args = array( + 'per_page', +@@ -87,13 +87,13 @@ $_list_table_args = array( 'singular' => 'privacy_request', ); @@ -73640,19 +73297,16 @@ +$requests_table = _get_list_table('WP_Privacy_Data_Export_Requests_List_Table', $_list_table_args); $requests_table->screen->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter export personal data list' ), - 'heading_pagination' => __( 'Export personal data list navigation' ), - 'heading_list' => __( 'Export personal data list' ), -- ) -+ array( -+ 'heading_views' => __('Filter export personal data list'), -+ 'heading_pagination' => __('Export personal data list navigation'), -+ 'heading_list' => __('Export personal data list'), -+ ) ++ 'heading_views' => __('Filter export personal data list'), ++ 'heading_pagination' => __('Export personal data list navigation'), ++ 'heading_list' => __('Export personal data list'), + ) ); - $requests_table->process_bulk_action(); @@ -104,19 +104,19 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?> @@ -73720,7 +73374,7 @@ diff --git a/wp-admin/export.php b/wp-admin/export.php -index 7f1dd43445..4c70b1c64d 100644 +index 7f1dd43445..7b8bf17388 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -9,15 +9,15 @@ @@ -73750,27 +73404,24 @@ +add_action('admin_head', 'export_add_js'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => '

' . __( 'You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.' ) . '

' . - '

' . __( 'Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.' ) . '

', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => '

' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '

' . -+ '

' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '

', -+ ) ++ 'title' => __('Overview'), ++ 'content' => '

' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '

' . ++ '

' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '

', + ) ); get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Export' ) . '

' . - '

' . __( 'Support forums' ) . '

' -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Export') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Export') . '

' . ++ '

' . __('Support forums') . '

' ); // If the 'download' URL parameter is set, a WXR export file is baked and returned. @@ -73895,9 +73546,8 @@ - 'show_option_all' => __( 'All' ), + 'show_option_all' => __('All'), 'show' => 'display_name_with_login', -- ) + ) - ); -+ ) +); ?> @@ -73963,9 +73613,8 @@ - 'show_option_all' => __( 'All' ), + 'show_option_all' => __('All'), 'show' => 'display_name_with_login', -- ) + ) - ); -+ ) +); ?> @@ -74008,20 +73657,8 @@ -@@ -298,35 +298,35 @@ function export_date_options( $post_type = 'post' ) { - - false, -- 'can_export' => true, -- ), -- 'objects' -+ array( -+ '_builtin' => false, -+ 'can_export' => true, -+ ), -+ 'objects' +@@ -305,28 +305,28 @@ foreach ( get_post_types( + 'objects' ) as $post_type ) : ?> -

@@ -74072,7 +73709,7 @@ diff --git a/wp-admin/freedoms.php b/wp-admin/freedoms.php -index b227735ebf..d3030d1245 100644 +index b227735ebf..b18e257406 100644 --- a/wp-admin/freedoms.php +++ b/wp-admin/freedoms.php @@ -10,15 +10,15 @@ @@ -74180,9 +73817,10 @@ +printf( /* translators: %s: https://wordpressfoundation.org/trademark-policy/ */ - __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We are flattered every time someone spreads the good word, just make sure to check out our trademark guidelines first.' ), -+ __('WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We are flattered every time someone spreads the good word, just make sure to check out our trademark guidelines first.'), - 'https://wordpressfoundation.org/trademark-policy/' +- 'https://wordpressfoundation.org/trademark-policy/' - ); ++ __('WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We are flattered every time someone spreads the good word, just make sure to check out our trademark guidelines first.'), ++ 'https://wordpressfoundation.org/trademark-policy/' +); ?>

@@ -74197,18 +73835,20 @@ +printf( /* translators: 1: URL to Plugins screen, 2: URL to Themes screen, 3: https://wordpress.org/about/license/ */ - __( 'Every plugin and theme in WordPress.org’s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding plugins and themes there. If you get a plugin or theme from another source, make sure to ask them if it’s GPL first. If they do not respect the WordPress license, it is not recommended to use them.' ), -+ __('Every plugin and theme in WordPress.org’s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding plugins and themes there. If you get a plugin or theme from another source, make sure to ask them if it’s GPL first. If they do not respect the WordPress license, it is not recommended to use them.'), - $plugins_url, - $themes_url, +- $plugins_url, +- $themes_url, - __( 'https://wordpress.org/about/license/' ) - ); -+ __('https://wordpress.org/about/license/') ++ __('Every plugin and theme in WordPress.org’s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding plugins and themes there. If you get a plugin or theme from another source, make sure to ask them if it’s GPL first. If they do not respect the WordPress license, it is not recommended to use them.'), ++ $plugins_url, ++ $themes_url, ++ __('https://wordpress.org/about/license/') +); ?>

diff --git a/wp-admin/import.php b/wp-admin/import.php -index c97a31b6ed..12206e3c40 100644 +index c97a31b6ed..e74e63e9e6 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -6,34 +6,34 @@ @@ -74232,27 +73872,24 @@ +$title = __('Import'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => '

' . __( 'This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.' ) . '

' . - '

' . __( 'In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.' ) . '

', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => '

' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '

' . -+ '

' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '

', -+ ) ++ 'title' => __('Overview'), ++ 'content' => '

' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '

' . ++ '

' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '

', + ) ); get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Import' ) . '

' . - '

' . __( 'Support' ) . '

' -+ '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Import') . '

' . -+ '

' . __('Support') . '

' ++ '

' . __('For more information:') . '

' . ++ '

' . __('Documentation on Import') . '

' . ++ '

' . __('Support') . '

' ); -if ( current_user_can( 'install_plugins' ) ) { @@ -74301,17 +73938,15 @@ - wp_admin_notice( - $importer_not_installed, - array( -- 'additional_classes' => array( 'error' ), -- ) -- ); + __('The %s importer is invalid or is not installed.'), + '' . esc_html($_GET['invalid']) . '' +); +wp_admin_notice( + $importer_not_installed, + array( -+ 'additional_classes' => array( 'error' ), -+ ) + 'additional_classes' => array( 'error' ), + ) +- ); +); endif; ?> @@ -74347,7 +73982,7 @@ ?>
-@@ -111,88 +111,88 @@ if ( empty( $importers ) ) { +@@ -111,89 +111,89 @@ if ( empty( $importers ) ) { $action = ''; $is_plugin_installed = false; @@ -74368,10 +74003,13 @@ - $url = wp_nonce_url( - add_query_arg( - array( -- 'action' => 'activate', -- 'plugin' => $plugin_file, -- 'from' => 'import', -- ), ++ $url = wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'activate', + 'plugin' => $plugin_file, + 'from' => 'import', + ), - admin_url( 'plugins.php' ) - ), - 'activate-plugin_' . $plugin_file @@ -74383,13 +74021,6 @@ - esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ), - __( 'Run Importer' ) - ); -+ $url = wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'activate', -+ 'plugin' => $plugin_file, -+ 'from' => 'import', -+ ), + admin_url('plugins.php') + ), + 'activate-plugin_' . $plugin_file @@ -74398,7 +74029,7 @@ + '%s', + esc_url($url), + /* translators: %s: Importer name. */ -+ esc_attr(sprintf(__('Run %s'), $data[0])), ++ esc_attr(sprintf(__('Run %s'), $data[0])), + __('Run Importer') + ); @@ -74412,10 +74043,13 @@ - $url = wp_nonce_url( - add_query_arg( - array( -- 'action' => 'install-plugin', -- 'plugin' => $plugin_slug, -- 'from' => 'import', -- ), ++ $url = wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'install-plugin', + 'plugin' => $plugin_slug, + 'from' => 'import', + ), - self_admin_url( 'update.php' ) - ), - 'install-plugin_' . $plugin_slug @@ -74429,13 +74063,6 @@ - esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $data[0] ) ), - __( 'Install Now' ) - ); -+ $url = wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'install-plugin', -+ 'plugin' => $plugin_slug, -+ 'from' => 'import', -+ ), + self_admin_url('update.php') + ), + 'install-plugin_' . $plugin_slug @@ -74446,7 +74073,7 @@ + esc_attr($plugin_slug), + esc_attr($data[0]), + /* translators: %s: Importer name. */ -+ esc_attr(sprintf(_x('Install %s now', 'plugin'), $data[0])), ++ esc_attr(sprintf(_x('Install %s now', 'plugin'), $data[0])), + __('Install Now') + ); } else { @@ -74463,25 +74090,28 @@ } } else { - $url = add_query_arg( +- array( +$url = add_query_arg( - array( ++ array( 'import' => $importer_id, ), - self_admin_url( 'admin.php' ) - ); - $action = sprintf( -+ self_admin_url('admin.php') -+); -+$action = sprintf( - '%3$s', +- '%3$s', - esc_url( $url ), -+ esc_url($url), - /* translators: %s: Importer name. */ +- /* translators: %s: Importer name. */ - esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ), - __( 'Run Importer' ) - ); ++ self_admin_url('admin.php') ++); ++$action = sprintf( ++ '%3$s', ++ esc_url($url), ++ /* translators: %s: Importer name. */ + esc_attr(sprintf(__('Run %s'), $data[0])), -+ __('Run Importer') ++ __('Run Importer') +); $is_plugin_installed = true; @@ -74489,10 +74119,12 @@ if ( ! $is_plugin_installed && is_main_site() ) { - $url = add_query_arg( +- array( +$url = add_query_arg( - array( ++ array( 'tab' => 'plugin-information', 'plugin' => $plugin_slug, + 'from' => 'import', @@ -201,15 +201,15 @@ if ( empty( $importers ) ) { 'width' => 600, 'height' => 550, @@ -74500,18 +74132,20 @@ - network_admin_url( 'plugin-install.php' ) - ); - $action .= sprintf( -+ network_admin_url('plugin-install.php') -+); -+$action .= sprintf( - ' | %3$s', +- ' | %3$s', - esc_url( $url ), -+ esc_url($url), - /* translators: %s: Importer name. */ +- /* translators: %s: Importer name. */ - esc_attr( sprintf( __( 'More information about %s' ), $data[0] ) ), - __( 'Details' ) - ); ++ network_admin_url('plugin-install.php') ++); ++$action .= sprintf( ++ ' | %3$s', ++ esc_url($url), ++ /* translators: %s: Importer name. */ + esc_attr(sprintf(__('More information about %s'), $data[0])), -+ __('Details') ++ __('Details') +); } @@ -74829,7 +74463,7 @@ /** WordPress Administration Hooks */ diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php -index b8e8246eb7..261e871474 100644 +index b8e8246eb7..b00b22538c 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -22,14 +22,14 @@ function wp_ajax_nopriv_heartbeat() { @@ -74977,21 +74611,16 @@ - $results = get_terms( - array( -- 'taxonomy' => $taxonomy, -- 'name__like' => $search, -- 'fields' => 'names', -- 'hide_empty' => false, -- 'number' => isset( $_GET['number'] ) ? (int) $_GET['number'] : 0, -- ) -- ); +$results = get_terms( + array( -+ 'taxonomy' => $taxonomy, -+ 'name__like' => $search, -+ 'fields' => 'names', -+ 'hide_empty' => false, -+ 'number' => isset($_GET['number']) ? (int) $_GET['number'] : 0, -+ ) + 'taxonomy' => $taxonomy, + 'name__like' => $search, + 'fields' => 'names', + 'hide_empty' => false, +- 'number' => isset( $_GET['number'] ) ? (int) $_GET['number'] : 0, ++ 'number' => isset($_GET['number']) ? (int) $_GET['number'] : 0, + ) +- ); +); /** @@ -75187,49 +74816,35 @@ - $include_blog_users = ( 'search' === $type ? get_users( - array( -- 'blog_id' => $id, -- 'fields' => 'ID', -- ) -- ) : array() ); -- -- $exclude_blog_users = ( 'add' === $type ? get_users( -- array( -- 'blog_id' => $id, -- 'fields' => 'ID', -- ) -- ) : array() ); -- -- $users = get_users( -- array( -- 'blog_id' => false, -- 'search' => '*' . $_REQUEST['term'] . '*', -- 'include' => $include_blog_users, -- 'exclude' => $exclude_blog_users, -- 'search_columns' => array( 'user_login', 'user_nicename', 'user_email' ), -- ) -- ); +$include_blog_users = ( 'search' === $type ? get_users( + array( -+ 'blog_id' => $id, -+ 'fields' => 'ID', -+ ) + 'blog_id' => $id, + 'fields' => 'ID', + ) +- ) : array() ); +) : array() ); -+ + +- $exclude_blog_users = ( 'add' === $type ? get_users( +- array( +$exclude_blog_users = ( 'add' === $type ? get_users( + array( -+ 'blog_id' => $id, -+ 'fields' => 'ID', -+ ) + 'blog_id' => $id, + 'fields' => 'ID', + ) +- ) : array() ); +) : array() ); -+ + +- $users = get_users( +- array( +$users = get_users( + array( -+ 'blog_id' => false, -+ 'search' => '*' . $_REQUEST['term'] . '*', -+ 'include' => $include_blog_users, -+ 'exclude' => $exclude_blog_users, -+ 'search_columns' => array( 'user_login', 'user_nicename', 'user_email' ), -+ ) + 'blog_id' => false, + 'search' => '*' . $_REQUEST['term'] . '*', + 'include' => $include_blog_users, + 'exclude' => $exclude_blog_users, + 'search_columns' => array( 'user_login', 'user_nicename', 'user_email' ), + ) +- ); +); foreach ( $users as $user ) { @@ -75273,9 +74888,8 @@ +wp_send_json_error( + array( 'error' => $events->get_error_message(), -- ) + ) - ); -+ ) +); } else { - if ( empty( $saved_location['ip'] ) && ! empty( $events['location']['ip'] ) ) { @@ -75379,9 +74993,8 @@ + ), 'comment_link' => $comment_link, ), -- ) + ) - ); -+ ) +); $x->send(); } @@ -75441,14 +75054,11 @@ - $x = new WP_Ajax_Response( - array( -- 'what' => 'comment', -- 'id' => $comment_id, -- 'supplemental' => array( +$x = new WP_Ajax_Response( + array( -+ 'what' => 'comment', -+ 'id' => $comment_id, -+ 'supplemental' => array( + 'what' => 'comment', + 'id' => $comment_id, + 'supplemental' => array( 'status' => $comment ? $comment->comment_approved : '', 'postId' => $comment ? $comment->comment_post_ID : '', /* translators: %s: Number of comments. */ @@ -75465,14 +75075,13 @@ /* translators: %s: Number of comments. */ - _n( '%s Comment in moderation', '%s Comments in moderation', $counts->moderated ), - number_format_i18n( $counts->moderated ) +- ), + _n('%s Comment in moderation', '%s Comments in moderation', $counts->moderated), + number_format_i18n($counts->moderated) - ), -- ), -- ) -- ); + ), -+ ) + ), + ) +- ); +); $x->send(); } @@ -75546,9 +75155,8 @@ 'descendants_and_self' => $cat_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids, -- ) + ) - ); -+ ) +); $data = ob_get_clean(); @@ -75575,7 +75183,7 @@ break; } $term_id = $parent->term_id; -@@ -670,44 +670,44 @@ function _wp_ajax_add_hierarchical_term() { +@@ -670,30 +670,30 @@ function _wp_ajax_add_hierarchical_term() { ob_start(); @@ -75589,9 +75197,8 @@ 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids, -- ) + ) - ); -+ ) +); $data = ob_get_clean(); @@ -75609,23 +75216,16 @@ - wp_dropdown_categories( - array( -- 'taxonomy' => $taxonomy->name, -- 'hide_empty' => 0, -- 'name' => 'new' . $taxonomy->name . '_parent', -- 'orderby' => 'name', -- 'hierarchical' => 1, -- 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —', -- ) -- ); +wp_dropdown_categories( + array( -+ 'taxonomy' => $taxonomy->name, -+ 'hide_empty' => 0, -+ 'name' => 'new' . $taxonomy->name . '_parent', -+ 'orderby' => 'name', -+ 'hierarchical' => 1, -+ 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —', -+ ) + 'taxonomy' => $taxonomy->name, + 'hide_empty' => 0, + 'name' => 'new' . $taxonomy->name . '_parent', +@@ -701,13 +701,13 @@ function _wp_ajax_add_hierarchical_term() { + 'hierarchical' => 1, + 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —', + ) +- ); +); $sup = ob_get_clean(); @@ -75983,13 +75583,13 @@ - 'invalid_comment', - /* translators: %d: Comment ID. */ - sprintf( __( 'Comment %d does not exist' ), $id ) +- ), + 'invalid_comment', + /* translators: %d: Comment ID. */ -+ sprintf(__('Comment %d does not exist'), $id) - ), -- ) ++ sprintf(__('Comment %d does not exist'), $id) ++ ), + ) - ); -+ ) +); $x->send(); } @@ -76029,9 +75629,8 @@ + array( 'what' => 'comment', 'id' => $result, -- ) + ) - ); -+ ) +); $x->send(); } @@ -76101,14 +75700,13 @@ - 'data' => "", + 'data' => "", 'position' => -1, -- ) + ) - ); -+ ) +); } $x->send(); } -@@ -1086,88 +1086,88 @@ function wp_ajax_add_link_category( $action ) { +@@ -1086,71 +1086,71 @@ function wp_ajax_add_link_category( $action ) { * @since 3.1.0 */ function wp_ajax_add_tag() { @@ -76159,10 +75757,9 @@ + array( 'what' => 'taxonomy', - 'data' => new WP_Error( $error_code, $message ), -- ) -- ); + 'data' => new WP_Error($error_code, $message), -+ ) + ) +- ); +); $x->send(); } @@ -76201,38 +75798,27 @@ - $x->add( - array( -- 'what' => 'taxonomy', -- 'data' => $message, -- 'supplemental' => array( +$x->add( + array( -+ 'what' => 'taxonomy', -+ 'data' => $message, -+ 'supplemental' => array( - 'parents' => $parents, - 'noparents' => $noparents, + 'what' => 'taxonomy', + 'data' => $message, + 'supplemental' => array( +@@ -1159,15 +1159,15 @@ function wp_ajax_add_tag() { 'notice' => $message, -- ), -- ) + ), + ) - ); -- ++); + - $x->add( - array( -- 'what' => 'term', -- 'position' => $level, -- 'supplemental' => (array) $tag, -- ) -- ); -+ ), -+ ) -+); -+ +$x->add( + array( -+ 'what' => 'term', -+ 'position' => $level, -+ 'supplemental' => (array) $tag, -+ ) + 'what' => 'term', + 'position' => $level, + 'supplemental' => (array) $tag, + ) +- ); +); $x->send(); @@ -76265,19 +75851,14 @@ - $tags = get_terms( - array( -- 'taxonomy' => $taxonomy, -- 'number' => 45, -- 'orderby' => 'count', -- 'order' => 'DESC', -- ) -- ); +$tags = get_terms( + array( -+ 'taxonomy' => $taxonomy, -+ 'number' => 45, -+ 'orderby' => 'count', -+ 'order' => 'DESC', -+ ) + 'taxonomy' => $taxonomy, + 'number' => 45, + 'orderby' => 'count', + 'order' => 'DESC', + ) +- ); +); - if ( empty( $tags ) ) { @@ -76300,16 +75881,13 @@ - $return = wp_generate_tag_cloud( - $tags, - array( -- 'filter' => 0, -- 'format' => 'list', -- ) -- ); +$return = wp_generate_tag_cloud( + $tags, + array( -+ 'filter' => 0, -+ 'format' => 'list', -+ ) + 'filter' => 0, + 'format' => 'list', + ) +- ); +); - if ( empty( $return ) ) { @@ -76380,15 +75958,12 @@ - $x->add( - array( -- 'what' => 'comments', -- 'data' => $comment_list_item, -- ) -- ); +$x->add( + array( -+ 'what' => 'comments', -+ 'data' => $comment_list_item, -+ ) + 'what' => 'comments', + 'data' => $comment_list_item, + ) +- ); +); $x->send(); @@ -76657,19 +76232,14 @@ - $x->add( - array( -- 'what' => 'edit_comment', -- 'id' => $comment->comment_ID, -- 'data' => $comment_list_item, -- 'position' => $position, -- ) -- ); +$x->add( + array( -+ 'what' => 'edit_comment', -+ 'id' => $comment->comment_ID, -+ 'data' => $comment_list_item, -+ 'position' => $position, -+ ) + 'what' => 'edit_comment', + 'id' => $comment->comment_ID, + 'data' => $comment_list_item, + 'position' => $position, + ) +- ); +); $x->send(); @@ -76812,9 +76382,9 @@ - gmdate( __( 'F j, Y' ), $now ), - gmdate( __( 'g:i a' ), $now ) - ); -+ __('Draft created on %1$s at %2$s'), -+ gmdate(__('F j, Y'), $now), -+ gmdate(__('g:i a'), $now) ++ __('Draft created on %1$s at %2$s'), ++ gmdate(__('F j, Y'), $now), ++ gmdate(__('g:i a'), $now) +); - $pid = edit_post( $post_data ); @@ -76824,16 +76394,13 @@ - if ( is_wp_error( $pid ) ) { - $x = new WP_Ajax_Response( - array( -- 'what' => 'meta', -- 'data' => $pid, -- ) -- ); + if ( is_wp_error($pid) ) { + $x = new WP_Ajax_Response( + array( -+ 'what' => 'meta', -+ 'data' => $pid, -+ ) + 'what' => 'meta', + 'data' => $pid, + ) +- ); + ); $x->send(); } @@ -76873,9 +76440,8 @@ + 'data' => _list_meta_row($meta, $c), 'position' => 1, 'supplemental' => array( 'postid' => $pid ), -- ) + ) - ); -+ ) +); } else { // Update? - $mid = (int) key( $_POST['meta'] ); @@ -76929,23 +76495,19 @@ 'old_id' => $mid, 'data' => _list_meta_row( - array( -- 'meta_key' => $key, -- 'meta_value' => $value, -- 'meta_id' => $mid, -- ), -- $c + array( -+ 'meta_key' => $key, -+ 'meta_value' => $value, -+ 'meta_id' => $mid, -+ ), + 'meta_key' => $key, + 'meta_value' => $value, + 'meta_id' => $mid, + ), +- $c +- ), + $c - ), ++ ), 'position' => 0, 'supplemental' => array( 'postid' => $meta->post_id ), -- ) + ) - ); -+ ) +); } $x->send(); @@ -76981,9 +76543,8 @@ + array( 'what' => 'user', 'id' => $user_id, -- ) + ) - ); -+ ) +); $x->send(); } @@ -76998,29 +76559,25 @@ - $x = new WP_Ajax_Response( - array( -- 'what' => 'user', -- 'id' => $user_id, -- 'data' => $wp_list_table->single_row( $user_object, '', $role ), -- 'supplemental' => array( +$x = new WP_Ajax_Response( + array( -+ 'what' => 'user', -+ 'id' => $user_id, -+ 'data' => $wp_list_table->single_row($user_object, '', $role), -+ 'supplemental' => array( + 'what' => 'user', + 'id' => $user_id, +- 'data' => $wp_list_table->single_row( $user_object, '', $role ), ++ 'data' => $wp_list_table->single_row($user_object, '', $role), + 'supplemental' => array( 'show-link' => sprintf( /* translators: %s: The new user. */ - __( 'User %s added' ), - '' . $user_object->user_login . '' +- ), + __('User %s added'), + '' . $user_object->user_login . '' - ), ++ ), 'role' => $role, -- ), -- ) + ), + ) - ); -+ ), -+ ) +); $x->send(); } @@ -77179,9 +76736,8 @@ + array( 'replace-id' => $type . '-' . $item->name, 'markup' => $markup, -- ) + ) - ); -+ ) +); } @@ -77972,9 +77528,8 @@ + 'message' => __('Sorry, you are not allowed to upload files.'), + 'filename' => esc_html($_FILES['async-upload']['name']), ), -- ) + ) - ); -+ ) +); wp_die(); @@ -77986,9 +77541,10 @@ - if ( ! current_user_can( 'edit_post', $post_id ) ) { - echo wp_json_encode( +- array( + if ( ! current_user_can('edit_post', $post_id) ) { +echo wp_json_encode( - array( ++ array( 'success' => false, 'data' => array( - 'message' => __( 'Sorry, you are not allowed to attach files to this post.' ), @@ -78023,9 +77579,10 @@ - if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) ) { - echo wp_json_encode( +- array( + if ( ! wp_match_mime_types('image', $wp_filetype['type']) ) { +echo wp_json_encode( - array( ++ array( 'success' => false, 'data' => array( - 'message' => __( 'The uploaded file is not a valid image. Please try again.' ), @@ -78056,9 +77613,8 @@ - 'filename' => esc_html( $_FILES['async-upload']['name'] ), + 'filename' => esc_html($_FILES['async-upload']['name']), ), -- ) + ) - ); -+ ) +); wp_die(); @@ -78085,15 +77641,12 @@ - echo wp_json_encode( - array( -- 'success' => true, -- 'data' => $attachment, -- ) -- ); +echo wp_json_encode( + array( -+ 'success' => true, -+ 'data' => $attachment, -+ ) + 'success' => true, + 'data' => $attachment, + ) +- ); +); wp_die(); @@ -78150,23 +77703,19 @@ + array( 'message' => $msg, 'html' => $html, -- ) + ) - ); -+ ) +); } - wp_send_json_success( - array( -- 'message' => $msg, -- 'html' => $html, -- ) -- ); +wp_send_json_success( + array( -+ 'message' => $msg, -+ 'html' => $html, -+ ) + 'message' => $msg, + 'html' => $html, + ) +- ); +); } @@ -78818,9 +78367,8 @@ + array( 'ID' => $attachment_id, 'menu_order' => $menu_order, -- ) + ) - ); -+ ) +); } @@ -78853,8 +78401,9 @@ if ( 0 == $post->post_parent && $insert_into_post_id ) { - wp_update_post( +- array( +wp_update_post( - array( ++ array( 'ID' => $id, 'post_parent' => $insert_into_post_id, ) @@ -79139,15 +78688,12 @@ - wp_send_json_success( - array( -- 'previousScheme' => 'admin-color-' . $previous_color_scheme, -- 'currentScheme' => 'admin-color-' . $color_scheme, -- ) -- ); +wp_send_json_success( + array( -+ 'previousScheme' => 'admin-color-' . $previous_color_scheme, -+ 'currentScheme' => 'admin-color-' . $color_scheme, -+ ) + 'previousScheme' => 'admin-color-' . $previous_color_scheme, + 'currentScheme' => 'admin-color-' . $color_scheme, + ) +- ); +); } @@ -79164,31 +78710,26 @@ - $args = wp_parse_args( - wp_unslash( $_REQUEST['request'] ), - array( -- 'per_page' => 20, -- 'fields' => array_merge( -- (array) $theme_field_defaults, -- array( -- 'reviews_url' => true, // Explicitly request the reviews URL to be linked from the Add Themes screen. -- ) -- ), -- ) -- ); -- -- if ( isset( $args['browse'] ) && 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) { -- $user = get_user_option( 'wporg_favorites' ); +$args = wp_parse_args( + wp_unslash($_REQUEST['request']), + array( -+ 'per_page' => 20, + 'per_page' => 20, +- 'fields' => array_merge( +- (array) $theme_field_defaults, +- array( + 'fields' => array_merge( + (array) $theme_field_defaults, + array( -+ 'reviews_url' => true, // Explicitly request the reviews URL to be linked from the Add Themes screen. -+ ) + 'reviews_url' => true, // Explicitly request the reviews URL to be linked from the Add Themes screen. + ) +- ), + ), -+ ) + ) +- ); +); -+ + +- if ( isset( $args['browse'] ) && 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) { +- $user = get_user_option( 'wporg_favorites' ); + if ( isset($args['browse']) && 'favorites' === $args['browse'] && ! isset($args['user']) ) { + $user = get_user_option('wporg_favorites'); if ( $user ) { @@ -79234,11 +78775,10 @@ + array( 'theme' => $theme->slug, - '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ), -- ), ++ '_wpnonce' => wp_create_nonce('install-theme_' . $theme->slug), + ), - $update_php - ); -+ '_wpnonce' => wp_create_nonce('install-theme_' . $theme->slug), -+ ), + $update_php +); @@ -79247,33 +78787,29 @@ if ( is_multisite() ) { $theme->activate_url = add_query_arg( - array( -- 'action' => 'enable', ++ array( + 'action' => 'enable', - '_wpnonce' => wp_create_nonce( 'enable-theme_' . $theme->slug ), -- 'theme' => $theme->slug, -- ), ++ '_wpnonce' => wp_create_nonce('enable-theme_' . $theme->slug), + 'theme' => $theme->slug, + ), - network_admin_url( 'themes.php' ) -+ array( -+ 'action' => 'enable', -+ '_wpnonce' => wp_create_nonce('enable-theme_' . $theme->slug), -+ 'theme' => $theme->slug, -+ ), +- ); + network_admin_url('themes.php') - ); ++ ); } else { $theme->activate_url = add_query_arg( - array( -- 'action' => 'activate', ++ array( + 'action' => 'activate', - '_wpnonce' => wp_create_nonce( 'switch-theme_' . $theme->slug ), -- 'stylesheet' => $theme->slug, -- ), ++ '_wpnonce' => wp_create_nonce('switch-theme_' . $theme->slug), + 'stylesheet' => $theme->slug, + ), - admin_url( 'themes.php' ) -+ array( -+ 'action' => 'activate', -+ '_wpnonce' => wp_create_nonce('switch-theme_' . $theme->slug), -+ 'stylesheet' => $theme->slug, -+ ), +- ); + admin_url('themes.php') - ); ++ ); } } @@ -79290,13 +78826,15 @@ + $customize_url = $theme->block_theme ? admin_url('site-editor.php') : wp_customize_url($theme->slug); - $theme->customize_url = add_query_arg( -+$theme->customize_url = add_query_arg( - array( +- array( - 'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ), ++$theme->customize_url = add_query_arg( ++ array( + 'return' => urlencode(network_admin_url('theme-install.php', 'relative')), ), - $customize_url +- $customize_url - ); ++ $customize_url +); } @@ -79317,9 +78855,8 @@ 'type' => 'percent', 'number' => $theme->num_ratings, 'echo' => false, -- ) + ) - ); -+ ) +); - $theme->num_ratings = number_format_i18n( $theme->num_ratings ); @@ -79425,10 +78962,9 @@ 'type' => 'not-embeddable', /* translators: %s: URL that could not be embedded. */ - 'message' => sprintf( __( '%s failed to embed.' ), '' . esc_html( $url ) . '' ), -- ) -- ); + 'message' => sprintf(__('%s failed to embed.'), '' . esc_html($url) . ''), -+ ) + ) +- ); +); } @@ -79471,10 +79007,9 @@ + array( 'type' => 'not-ssl', - 'message' => __( 'This preview is unavailable in the editor.' ), -- ) -- ); + 'message' => __('This preview is unavailable in the editor.'), -+ ) + ) +- ); +); } @@ -79562,10 +79097,9 @@ + array( 'type' => 'no-items', - 'message' => __( 'No items found.' ), -- ) -- ); + 'message' => __('No items found.'), -+ ) + ) +- ); +); } @@ -79592,15 +79126,12 @@ - wp_send_json_success( - array( -- 'head' => $head, -- 'body' => ob_get_clean(), -- ) -- ); +wp_send_json_success( + array( -+ 'head' => $head, -+ 'body' => ob_get_clean(), -+ ) + 'head' => $head, + 'body' => ob_get_clean(), + ) +- ); +); } @@ -79626,12 +79157,11 @@ - wp_send_json_error( - array( - 'message' => __( 'Could not log out user sessions. Please try again.' ), -- ) -- ); +wp_send_json_error( + array( + 'message' => __('Could not log out user sessions. Please try again.'), -+ ) + ) +- ); +); } @@ -79877,10 +79407,9 @@ 'slug' => '', 'errorCode' => 'no_theme_specified', - 'errorMessage' => __( 'No theme specified.' ), -- ) -- ); + 'errorMessage' => __('No theme specified.'), -+ ) + ) +- ); +); } @@ -79906,16 +79435,13 @@ - $api = themes_api( - 'theme_information', - array( -- 'slug' => $slug, -- 'fields' => array( 'sections' => false ), -- ) -- ); +$api = themes_api( + 'theme_information', + array( -+ 'slug' => $slug, -+ 'fields' => array( 'sections' => false ), -+ ) + 'slug' => $slug, + 'fields' => array( 'sections' => false ), + ) +- ); +); - if ( is_wp_error( $api ) ) { @@ -79978,8 +79504,9 @@ + if ( current_user_can('switch_themes') ) { if ( is_multisite() ) { - $status['activateUrl'] = add_query_arg( +- array( +$status['activateUrl'] = add_query_arg( - array( ++ array( 'action' => 'enable', - '_wpnonce' => wp_create_nonce( 'enable-theme_' . $slug ), + '_wpnonce' => wp_create_nonce('enable-theme_' . $slug), @@ -79987,12 +79514,13 @@ ), - network_admin_url( 'themes.php' ) - ); -+ network_admin_url('themes.php') ++ network_admin_url('themes.php') +); } else { - $status['activateUrl'] = add_query_arg( +- array( +$status['activateUrl'] = add_query_arg( - array( ++ array( 'action' => 'activate', - '_wpnonce' => wp_create_nonce( 'switch-theme_' . $slug ), + '_wpnonce' => wp_create_nonce('switch-theme_' . $slug), @@ -80000,7 +79528,7 @@ ), - admin_url( 'themes.php' ) - ); -+ admin_url('themes.php') ++ admin_url('themes.php') +); } } @@ -80013,14 +79541,13 @@ - $status['customizeUrl'] = add_query_arg( - array( - 'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ), -- ), -- wp_customize_url( $slug ) -- ); + if ( ! is_multisite() && current_user_can('edit_theme_options') && current_user_can('customize') ) { +$status['customizeUrl'] = add_query_arg( + array( + 'return' => urlencode(network_admin_url('theme-install.php', 'relative')), -+ ), + ), +- wp_customize_url( $slug ) +- ); + wp_customize_url($slug) +); } @@ -80050,10 +79577,9 @@ 'slug' => '', 'errorCode' => 'no_theme_specified', - 'errorMessage' => __( 'No theme specified.' ), -- ) -- ); + 'errorMessage' => __('No theme specified.'), -+ ) + ) +- ); +); } @@ -80172,10 +79698,9 @@ 'slug' => '', 'errorCode' => 'no_theme_specified', - 'errorMessage' => __( 'No theme specified.' ), -- ) -- ); + 'errorMessage' => __('No theme specified.'), -+ ) + ) +- ); +); } @@ -80268,10 +79793,9 @@ 'slug' => '', 'errorCode' => 'no_plugin_specified', - 'errorMessage' => __( 'No plugin specified.' ), -- ) -- ); + 'errorMessage' => __('No plugin specified.'), -+ ) + ) +- ); +); } @@ -80296,18 +79820,15 @@ - 'plugin_information', - array( - 'slug' => sanitize_key( wp_unslash( $_POST['slug'] ) ), -- 'fields' => array( +$api = plugins_api( + 'plugin_information', + array( -+ 'slug' => sanitize_key(wp_unslash($_POST['slug'])), -+ 'fields' => array( ++ 'slug' => sanitize_key(wp_unslash($_POST['slug'])), + 'fields' => array( 'sections' => false, -- ), -- ) + ), + ) - ); -+ ), -+ ) +); - if ( is_wp_error( $api ) ) { @@ -80384,10 +79905,9 @@ + '_wpnonce' => wp_create_nonce('activate-plugin_' . $install_status['file']), 'action' => 'activate', 'plugin' => $install_status['file'], -- ), + ), - $plugins_url - ); -+ ), + $plugins_url +); } @@ -80419,10 +79939,9 @@ 'slug' => '', 'errorCode' => 'no_plugin_specified', - 'errorMessage' => __( 'No plugin specified.' ), -- ) -- ); + 'errorMessage' => __('No plugin specified.'), -+ ) + ) +- ); +); } @@ -80549,10 +80068,9 @@ 'slug' => '', 'errorCode' => 'no_plugin_specified', - 'errorMessage' => __( 'No plugin specified.' ), -- ) -- ); + 'errorMessage' => __('No plugin specified.'), -+ ) + ) +- ); +); } @@ -80655,14 +80173,12 @@ - $wp_list_table = _get_list_table( - 'WP_Plugins_List_Table', - array( -- 'screen' => get_current_screen(), -- ) -- ); +$wp_list_table = _get_list_table( + 'WP_Plugins_List_Table', + array( -+ 'screen' => get_current_screen(), -+ ) + 'screen' => get_current_screen(), + ) +- ); +); $status = array(); @@ -80679,25 +80195,21 @@ - array_diff_key( - $_POST, - array( -- '_ajax_nonce' => null, -- 'action' => null, -- ) -- ), -- network_admin_url( 'plugins.php', 'relative' ) -- ); -- -- $GLOBALS['s'] = wp_unslash( $_POST['s'] ); +$_SERVER['REQUEST_URI'] = add_query_arg( + array_diff_key( + $_POST, + array( -+ '_ajax_nonce' => null, -+ 'action' => null, -+ ) + '_ajax_nonce' => null, + 'action' => null, + ) +- ), +- network_admin_url( 'plugins.php', 'relative' ) +- ); + ), + network_admin_url('plugins.php', 'relative') +); -+ + +- $GLOBALS['s'] = wp_unslash( $_POST['s'] ); + $GLOBALS['s'] = wp_unslash($_POST['s']); $wp_list_table->prepare_items(); @@ -80731,14 +80243,12 @@ - $wp_list_table = _get_list_table( - 'WP_Plugin_Install_List_Table', - array( -- 'screen' => get_current_screen(), -- ) -- ); +$wp_list_table = _get_list_table( + 'WP_Plugin_Install_List_Table', + array( -+ 'screen' => get_current_screen(), -+ ) + 'screen' => get_current_screen(), + ) +- ); +); $status = array(); @@ -80755,19 +80265,16 @@ - array_diff_key( - $_POST, - array( -- '_ajax_nonce' => null, -- 'action' => null, -- ) -- ), -- network_admin_url( 'plugin-install.php', 'relative' ) -- ); +$_SERVER['REQUEST_URI'] = add_query_arg( + array_diff_key( + $_POST, + array( -+ '_ajax_nonce' => null, -+ 'action' => null, -+ ) + '_ajax_nonce' => null, + 'action' => null, + ) +- ), +- network_admin_url( 'plugin-install.php', 'relative' ) +- ); + ), + network_admin_url('plugin-install.php', 'relative') +); @@ -80790,26 +80297,22 @@ */ function wp_ajax_edit_theme_plugin_file() { - $r = wp_edit_theme_plugin_file( wp_unslash( $_POST ) ); // Validation of args is done in wp_edit_theme_plugin_file(). -- ++ $r = wp_edit_theme_plugin_file(wp_unslash($_POST)); // Validation of args is done in wp_edit_theme_plugin_file(). + - if ( is_wp_error( $r ) ) { - wp_send_json_error( - array_merge( - array( -- 'code' => $r->get_error_code(), -- 'message' => $r->get_error_message(), -- ), -- (array) $r->get_error_data() -- ) -- ); -+ $r = wp_edit_theme_plugin_file(wp_unslash($_POST)); // Validation of args is done in wp_edit_theme_plugin_file(). -+ + if ( is_wp_error($r) ) { +wp_send_json_error( + array_merge( + array( -+ 'code' => $r->get_error_code(), -+ 'message' => $r->get_error_message(), -+ ), + 'code' => $r->get_error_code(), + 'message' => $r->get_error_message(), + ), +- (array) $r->get_error_data() +- ) +- ); + (array) $r->get_error_data() + ) +); @@ -80817,12 +80320,11 @@ - wp_send_json_success( - array( - 'message' => __( 'File edited successfully.' ), -- ) -- ); +wp_send_json_success( + array( + 'message' => __('File edited successfully.'), -+ ) + ) +- ); +); } } @@ -80934,7 +80436,7 @@ /* translators: %s: Exporter array index. */ - sprintf( __( 'Expected an array describing the exporter at index %s.' ), $exporter_key ) - ); -+ sprintf(__('Expected an array describing the exporter at index %s.'), $exporter_key) ++ sprintf(__('Expected an array describing the exporter at index %s.'), $exporter_key) +); } @@ -80945,7 +80447,7 @@ /* translators: %s: Exporter array index. */ - sprintf( __( 'Exporter array at index %s does not include a friendly name.' ), $exporter_key ) - ); -+ sprintf(__('Exporter array at index %s does not include a friendly name.'), $exporter_key) ++ sprintf(__('Exporter array at index %s does not include a friendly name.'), $exporter_key) +); } @@ -80958,7 +80460,7 @@ /* translators: %s: Exporter friendly name. */ - sprintf( __( 'Exporter does not include a callback: %s.' ), esc_html( $exporter_friendly_name ) ) - ); -+ sprintf(__('Exporter does not include a callback: %s.'), esc_html($exporter_friendly_name)) ++ sprintf(__('Exporter does not include a callback: %s.'), esc_html($exporter_friendly_name)) +); } @@ -80969,7 +80471,7 @@ /* translators: %s: Exporter friendly name. */ - sprintf( __( 'Exporter callback is not a valid callback: %s.' ), esc_html( $exporter_friendly_name ) ) - ); -+ sprintf(__('Exporter callback is not a valid callback: %s.'), esc_html($exporter_friendly_name)) ++ sprintf(__('Exporter callback is not a valid callback: %s.'), esc_html($exporter_friendly_name)) +); } @@ -80990,7 +80492,7 @@ /* translators: %s: Exporter friendly name. */ - sprintf( __( 'Expected response as an array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) - ); -+ sprintf(__('Expected response as an array from exporter: %s.'), esc_html($exporter_friendly_name)) ++ sprintf(__('Expected response as an array from exporter: %s.'), esc_html($exporter_friendly_name)) +); } @@ -81001,7 +80503,7 @@ /* translators: %s: Exporter friendly name. */ - sprintf( __( 'Expected data in response array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) - ); -+ sprintf(__('Expected data in response array from exporter: %s.'), esc_html($exporter_friendly_name)) ++ sprintf(__('Expected data in response array from exporter: %s.'), esc_html($exporter_friendly_name)) +); } @@ -81012,7 +80514,7 @@ /* translators: %s: Exporter friendly name. */ - sprintf( __( 'Expected data array in response array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) - ); -+ sprintf(__('Expected data array in response array from exporter: %s.'), esc_html($exporter_friendly_name)) ++ sprintf(__('Expected data array in response array from exporter: %s.'), esc_html($exporter_friendly_name)) +); } @@ -81023,7 +80525,7 @@ /* translators: %s: Exporter friendly name. */ - sprintf( __( 'Expected done (boolean) in response array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) - ); -+ sprintf(__('Expected done (boolean) in response array from exporter: %s.'), esc_html($exporter_friendly_name)) ++ sprintf(__('Expected done (boolean) in response array from exporter: %s.'), esc_html($exporter_friendly_name)) +); } } else { @@ -81155,31 +80657,35 @@ - if ( ! array_key_exists( 'callback', $eraser ) ) { - wp_send_json_error( +- sprintf( + if ( ! array_key_exists('callback', $eraser) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: %s: Eraser friendly name. */ - __( 'Eraser does not include a callback: %s.' ), - esc_html( $eraser_friendly_name ) +- ) +- ); + __('Eraser does not include a callback: %s.'), + esc_html($eraser_friendly_name) - ) -- ); ++ ) +); } - if ( ! is_callable( $eraser['callback'] ) ) { - wp_send_json_error( +- sprintf( + if ( ! is_callable($eraser['callback']) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: %s: Eraser friendly name. */ - __( 'Eraser callback is not valid: %s.' ), - esc_html( $eraser_friendly_name ) +- ) +- ); + __('Eraser callback is not valid: %s.'), + esc_html($eraser_friendly_name) - ) -- ); ++ ) +); } @@ -81195,103 +80701,115 @@ - if ( ! is_array( $response ) ) { - wp_send_json_error( +- sprintf( + if ( ! is_array($response) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: 1: Eraser friendly name, 2: Eraser array index. */ - __( 'Did not receive array from %1$s eraser (index %2$d).' ), - esc_html( $eraser_friendly_name ), - $eraser_index +- ) +- ); + __('Did not receive array from %1$s eraser (index %2$d).'), + esc_html($eraser_friendly_name), + $eraser_index - ) -- ); ++ ) +); } - if ( ! array_key_exists( 'items_removed', $response ) ) { - wp_send_json_error( +- sprintf( + if ( ! array_key_exists('items_removed', $response) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: 1: Eraser friendly name, 2: Eraser array index. */ - __( 'Expected items_removed key in response array from %1$s eraser (index %2$d).' ), - esc_html( $eraser_friendly_name ), - $eraser_index +- ) +- ); + __('Expected items_removed key in response array from %1$s eraser (index %2$d).'), + esc_html($eraser_friendly_name), + $eraser_index - ) -- ); ++ ) +); } - if ( ! array_key_exists( 'items_retained', $response ) ) { - wp_send_json_error( +- sprintf( + if ( ! array_key_exists('items_retained', $response) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: 1: Eraser friendly name, 2: Eraser array index. */ - __( 'Expected items_retained key in response array from %1$s eraser (index %2$d).' ), - esc_html( $eraser_friendly_name ), - $eraser_index +- ) +- ); + __('Expected items_retained key in response array from %1$s eraser (index %2$d).'), + esc_html($eraser_friendly_name), + $eraser_index - ) -- ); ++ ) +); } - if ( ! array_key_exists( 'messages', $response ) ) { - wp_send_json_error( +- sprintf( + if ( ! array_key_exists('messages', $response) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: 1: Eraser friendly name, 2: Eraser array index. */ - __( 'Expected messages key in response array from %1$s eraser (index %2$d).' ), - esc_html( $eraser_friendly_name ), - $eraser_index +- ) +- ); + __('Expected messages key in response array from %1$s eraser (index %2$d).'), + esc_html($eraser_friendly_name), + $eraser_index - ) -- ); ++ ) +); } - if ( ! is_array( $response['messages'] ) ) { - wp_send_json_error( +- sprintf( + if ( ! is_array($response['messages']) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: 1: Eraser friendly name, 2: Eraser array index. */ - __( 'Expected messages key to reference an array in response array from %1$s eraser (index %2$d).' ), - esc_html( $eraser_friendly_name ), - $eraser_index +- ) +- ); + __('Expected messages key to reference an array in response array from %1$s eraser (index %2$d).'), + esc_html($eraser_friendly_name), + $eraser_index - ) -- ); ++ ) +); } - if ( ! array_key_exists( 'done', $response ) ) { - wp_send_json_error( +- sprintf( + if ( ! array_key_exists('done', $response) ) { +wp_send_json_error( - sprintf( ++ sprintf( /* translators: 1: Eraser friendly name, 2: Eraser array index. */ - __( 'Expected done flag in response array from %1$s eraser (index %2$d).' ), - esc_html( $eraser_friendly_name ), - $eraser_index +- ) +- ); + __('Expected done flag in response array from %1$s eraser (index %2$d).'), + esc_html($eraser_friendly_name), + $eraser_index - ) -- ); ++ ) +); } } else { @@ -81321,30 +80839,27 @@ - _doing_it_wrong( - 'wp_ajax_health_check_dotorg_communication', - sprintf( -- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. ++_doing_it_wrong( ++ 'wp_ajax_health_check_dotorg_communication', ++ sprintf( + // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. - __( 'The Site Health check for %1$s has been replaced with %2$s.' ), - 'wp_ajax_health_check_dotorg_communication', - 'WP_REST_Site_Health_Controller::test_dotorg_communication' - ), - '5.6.0' - ); -- -- check_ajax_referer( 'health-check-site-status' ); -- -- if ( ! current_user_can( 'view_site_health_checks' ) ) { -+_doing_it_wrong( -+ 'wp_ajax_health_check_dotorg_communication', -+ sprintf( -+ // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + __('The Site Health check for %1$s has been replaced with %2$s.'), + 'wp_ajax_health_check_dotorg_communication', + 'WP_REST_Site_Health_Controller::test_dotorg_communication' + ), + '5.6.0' +); -+ + +- check_ajax_referer( 'health-check-site-status' ); + check_ajax_referer('health-check-site-status'); -+ + +- if ( ! current_user_can( 'view_site_health_checks' ) ) { + if ( ! current_user_can('view_site_health_checks') ) { wp_send_json_error(); } @@ -81367,30 +80882,27 @@ - _doing_it_wrong( - 'wp_ajax_health_check_background_updates', - sprintf( -- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. ++_doing_it_wrong( ++ 'wp_ajax_health_check_background_updates', ++ sprintf( + // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. - __( 'The Site Health check for %1$s has been replaced with %2$s.' ), - 'wp_ajax_health_check_background_updates', - 'WP_REST_Site_Health_Controller::test_background_updates' - ), - '5.6.0' - ); -- -- check_ajax_referer( 'health-check-site-status' ); -- -- if ( ! current_user_can( 'view_site_health_checks' ) ) { -+_doing_it_wrong( -+ 'wp_ajax_health_check_background_updates', -+ sprintf( -+ // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + __('The Site Health check for %1$s has been replaced with %2$s.'), + 'wp_ajax_health_check_background_updates', + 'WP_REST_Site_Health_Controller::test_background_updates' + ), + '5.6.0' +); -+ + +- check_ajax_referer( 'health-check-site-status' ); + check_ajax_referer('health-check-site-status'); -+ + +- if ( ! current_user_can( 'view_site_health_checks' ) ) { + if ( ! current_user_can('view_site_health_checks') ) { wp_send_json_error(); } @@ -81413,30 +80925,27 @@ - _doing_it_wrong( - 'wp_ajax_health_check_loopback_requests', - sprintf( -- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. ++_doing_it_wrong( ++ 'wp_ajax_health_check_loopback_requests', ++ sprintf( + // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. - __( 'The Site Health check for %1$s has been replaced with %2$s.' ), - 'wp_ajax_health_check_loopback_requests', - 'WP_REST_Site_Health_Controller::test_loopback_requests' - ), - '5.6.0' - ); -- -- check_ajax_referer( 'health-check-site-status' ); -- -- if ( ! current_user_can( 'view_site_health_checks' ) ) { -+_doing_it_wrong( -+ 'wp_ajax_health_check_loopback_requests', -+ sprintf( -+ // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + __('The Site Health check for %1$s has been replaced with %2$s.'), + 'wp_ajax_health_check_loopback_requests', + 'WP_REST_Site_Health_Controller::test_loopback_requests' + ), + '5.6.0' +); -+ + +- check_ajax_referer( 'health-check-site-status' ); + check_ajax_referer('health-check-site-status'); -+ + +- if ( ! current_user_can( 'view_site_health_checks' ) ) { + if ( ! current_user_can('view_site_health_checks') ) { wp_send_json_error(); } @@ -81476,30 +80985,27 @@ - _doing_it_wrong( - 'wp_ajax_health_check_get_sizes', - sprintf( -- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. ++_doing_it_wrong( ++ 'wp_ajax_health_check_get_sizes', ++ sprintf( + // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. - __( 'The Site Health check for %1$s has been replaced with %2$s.' ), - 'wp_ajax_health_check_get_sizes', - 'WP_REST_Site_Health_Controller::get_directory_sizes' - ), - '5.6.0' - ); -- -- check_ajax_referer( 'health-check-site-status-result' ); -- -- if ( ! current_user_can( 'view_site_health_checks' ) || is_multisite() ) { -+_doing_it_wrong( -+ 'wp_ajax_health_check_get_sizes', -+ sprintf( -+ // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. + __('The Site Health check for %1$s has been replaced with %2$s.'), + 'wp_ajax_health_check_get_sizes', + 'WP_REST_Site_Health_Controller::get_directory_sizes' + ), + '5.6.0' +); -+ + +- check_ajax_referer( 'health-check-site-status-result' ); + check_ajax_referer('health-check-site-status-result'); -+ + +- if ( ! current_user_can( 'view_site_health_checks' ) || is_multisite() ) { + if ( ! current_user_can('view_site_health_checks') || is_multisite() ) { wp_send_json_error(); } @@ -81692,7 +81198,7 @@ } } diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php -index c5600bf38a..850478d7c4 100644 +index c5600bf38a..16c6feeee0 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -26,27 +26,27 @@ function add_link() { @@ -81708,7 +81214,7 @@ + if ( ! current_user_can('manage_links') ) { +wp_die( + '

' . __('You need a higher level of permission.') . '

' . -+ '

' . __('Sorry, you are not allowed to edit the links for this site.') . '

', ++ '

' . __('Sorry, you are not allowed to edit the links for this site.') . '

', + 403 +); } @@ -81995,22 +81501,23 @@ $install_url = wp_nonce_url( - self_admin_url( 'update.php?action=install-plugin&plugin=link-manager' ), - 'install-plugin_link-manager' +- ); + self_admin_url('update.php?action=install-plugin&plugin=link-manager'), + 'install-plugin_link-manager' - ); ++ ); wp_die( - sprintf( -- /* translators: %s: A link to install the Link Manager plugin. */ ++ sprintf( + /* translators: %s: A link to install the Link Manager plugin. */ - __( 'If you are looking to use the link manager, please install the Link Manager plugin.' ), - esc_url( $install_url ) - ) -+ sprintf( -+ /* translators: %s: A link to install the Link Manager plugin. */ +- ); + __('If you are looking to use the link manager, please install the Link Manager plugin.'), + esc_url($install_url) + ) - ); ++ ); } - } elseif ( is_plugin_inactive( 'link-manager/link-manager.php' ) ) { - if ( current_user_can( 'activate_plugins' ) ) { @@ -82019,22 +81526,23 @@ $activate_url = wp_nonce_url( - self_admin_url( 'plugins.php?action=activate&plugin=link-manager/link-manager.php' ), - 'activate-plugin_link-manager/link-manager.php' +- ); + self_admin_url('plugins.php?action=activate&plugin=link-manager/link-manager.php'), + 'activate-plugin_link-manager/link-manager.php' - ); ++ ); wp_die( - sprintf( -- /* translators: %s: A link to activate the Link Manager plugin. */ ++ sprintf( + /* translators: %s: A link to activate the Link Manager plugin. */ - __( 'Please activate the Link Manager plugin to use the link manager.' ), - esc_url( $activate_url ) - ) -+ sprintf( -+ /* translators: %s: A link to activate the Link Manager plugin. */ +- ); + __('Please activate the Link Manager plugin to use the link manager.'), + esc_url($activate_url) + ) - ); ++ ); } } } @@ -82043,7 +81551,7 @@ + wp_die(__('Sorry, you are not allowed to edit the links for this site.')); } diff --git a/wp-admin/includes/class-automatic-upgrader-skin.php b/wp-admin/includes/class-automatic-upgrader-skin.php -index 4fee6205fc..0ab58154f2 100644 +index 4fee6205fc..f19d9e80c3 100644 --- a/wp-admin/includes/class-automatic-upgrader-skin.php +++ b/wp-admin/includes/class-automatic-upgrader-skin.php @@ -46,7 +46,7 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { @@ -82055,7 +81563,7 @@ ob_end_clean(); return $result; } -@@ -72,40 +72,40 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { +@@ -72,30 +72,30 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { * @param mixed ...$args Optional text replacements. */ public function feedback( $feedback, ...$args ) { @@ -82096,12 +81604,11 @@ 'a' => array( 'href' => true, ), - 'br' => true, +@@ -103,9 +103,9 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { 'em' => true, 'strong' => true, -- ) + ) - ); -+ ) +); - if ( empty( $string ) ) { @@ -82121,7 +81628,7 @@ } } diff --git a/wp-admin/includes/class-bulk-plugin-upgrader-skin.php b/wp-admin/includes/class-bulk-plugin-upgrader-skin.php -index 7cbf334ee2..287dafc5d0 100644 +index 7cbf334ee2..81b352c53e 100644 --- a/wp-admin/includes/class-bulk-plugin-upgrader-skin.php +++ b/wp-admin/includes/class-bulk-plugin-upgrader-skin.php @@ -30,22 +30,22 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin { @@ -82156,22 +81663,24 @@ $update_actions = array( - 'plugins_page' => sprintf( -+'plugins_page' => sprintf( - '%s', +- '%s', - self_admin_url( 'plugins.php' ), - __( 'Go to Plugins page' ) - ), - 'updates_page' => sprintf( -+ self_admin_url('plugins.php'), -+ __('Go to Plugins page') -+), -+'updates_page' => sprintf( - '%s', +- '%s', - self_admin_url( 'update-core.php' ), - __( 'Go to WordPress Updates page' ) - ), -+ self_admin_url('update-core.php'), -+ __('Go to WordPress Updates page') ++'plugins_page' => sprintf( ++ '%s', ++ self_admin_url('plugins.php'), ++ __('Go to Plugins page') ++), ++'updates_page' => sprintf( ++ '%s', ++ self_admin_url('update-core.php'), ++ __('Go to WordPress Updates page') +), ); @@ -82197,7 +81706,7 @@ } } diff --git a/wp-admin/includes/class-bulk-theme-upgrader-skin.php b/wp-admin/includes/class-bulk-theme-upgrader-skin.php -index 8ec3bbf5f5..576d32e0cc 100644 +index 8ec3bbf5f5..c6297bcf71 100644 --- a/wp-admin/includes/class-bulk-theme-upgrader-skin.php +++ b/wp-admin/includes/class-bulk-theme-upgrader-skin.php @@ -31,22 +31,22 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin { @@ -82232,22 +81741,24 @@ $update_actions = array( - 'themes_page' => sprintf( -+'themes_page' => sprintf( - '%s', +- '%s', - self_admin_url( 'themes.php' ), - __( 'Go to Themes page' ) - ), - 'updates_page' => sprintf( -+ self_admin_url('themes.php'), -+ __('Go to Themes page') -+), -+'updates_page' => sprintf( - '%s', +- '%s', - self_admin_url( 'update-core.php' ), - __( 'Go to WordPress Updates page' ) - ), -+ self_admin_url('update-core.php'), -+ __('Go to WordPress Updates page') ++'themes_page' => sprintf( ++ '%s', ++ self_admin_url('themes.php'), ++ __('Go to Themes page') ++), ++'updates_page' => sprintf( ++ '%s', ++ self_admin_url('update-core.php'), ++ __('Go to WordPress Updates page') +), ); @@ -82273,7 +81784,7 @@ } } diff --git a/wp-admin/includes/class-bulk-upgrader-skin.php b/wp-admin/includes/class-bulk-upgrader-skin.php -index 461311962d..34af8a7e4b 100644 +index 461311962d..d5ddbc9832 100644 --- a/wp-admin/includes/class-bulk-upgrader-skin.php +++ b/wp-admin/includes/class-bulk-upgrader-skin.php @@ -30,22 +30,22 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { @@ -82399,9 +81910,11 @@ + $after_error_message = sprintf($this->upgrader->strings['skin_update_failed'], $title); } - wp_admin_notice( +- $after_error_message, +- array( +wp_admin_notice( - $after_error_message, - array( ++ $after_error_message, ++ array( 'additional_classes' => array( 'error' ), ) - ); @@ -82428,7 +81941,7 @@ $this->reset(); diff --git a/wp-admin/includes/class-core-upgrader.php b/wp-admin/includes/class-core-upgrader.php -index 165e1f7bae..afa6b263ce 100644 +index 165e1f7bae..de357a265c 100644 --- a/wp-admin/includes/class-core-upgrader.php +++ b/wp-admin/includes/class-core-upgrader.php @@ -26,16 +26,16 @@ class Core_Upgrader extends WP_Upgrader { @@ -82524,8 +82037,9 @@ // Report this failure back to WordPress.org for debugging purposes. - wp_version_check( +- array( +wp_version_check( - array( ++ array( 'signature_failure_code' => $download->get_error_code(), 'signature_failure_data' => $download->get_error_data(), ) @@ -82619,16 +82133,14 @@ - 'rollback_was_required', - $this->strings['rollback_was_required'], - (object) array( -- 'update' => $original_result, -- 'rollback' => $rollback_result, -- ) + 'rollback_was_required', + $this->strings['rollback_was_required'], + (object) array( -+ 'update' => $original_result, -+ 'rollback' => $rollback_result, -+ ) - ); + 'update' => $original_result, + 'rollback' => $rollback_result, + ) +- ); ++ ); } } @@ -82643,9 +82155,8 @@ + array( 'action' => 'update', 'type' => 'core', -- ) + ) - ); -+ ) +); // Clear the current updates. @@ -82818,7 +82329,7 @@ } } diff --git a/wp-admin/includes/class-custom-background.php b/wp-admin/includes/class-custom-background.php -index 1d1cce73b8..6bcbbc64a7 100644 +index 1d1cce73b8..ed9f44312a 100644 --- a/wp-admin/includes/class-custom-background.php +++ b/wp-admin/includes/class-custom-background.php @@ -52,12 +52,12 @@ class Custom_Background { @@ -82889,25 +82400,23 @@ - '

' . __( 'To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the “Choose Image” button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.' ) . '

' . - '

' . __( 'You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '

' . - '

' . __( 'Do not forget to click on the Save Changes button when you are finished.' ) . '

', -- ) ++ '

' . __('You can customize the look of your site without touching any of your theme’s code by using a custom background. Your background can be an image or a color.') . '

' . ++ '

' . __('To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the “Choose Image” button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.') . '

' . ++ '

' . __('You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.') . '

' . ++ '

' . __('Do not forget to click on the Save Changes button when you are finished.') . '

', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Custom Background' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+ '

' . __('You can customize the look of your site without touching any of your theme’s code by using a custom background. Your background can be an image or a color.') . '

' . -+ '

' . __('To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the “Choose Image” button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.') . '

' . -+ '

' . __('You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.') . '

' . -+ '

' . __('Do not forget to click on the Save Changes button when you are finished.') . '

', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Custom Background') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('Documentation on Custom Background') . '

' . ++ '

' . __('Support forums') . '

' +); wp_enqueue_media(); @@ -83083,12 +82592,14 @@ - admin_url( 'customize.php?autofocus[control]=background_image' ) - ); - wp_admin_notice( -+ __('You can now manage and live-preview Custom Backgrounds in the Customizer.'), -+ admin_url('customize.php?autofocus[control]=background_image') +- $message, +- array( ++ __('You can now manage and live-preview Custom Backgrounds in the Customizer.'), ++ admin_url('customize.php?autofocus[control]=background_image') +); +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'info', 'additional_classes' => array( 'hide-if-no-customize' ), ) @@ -83105,12 +82616,14 @@ - esc_url( home_url( '/' ) ) - ); - wp_admin_notice( -+ __('Background updated. Visit your site to see how it looks.'), -+ esc_url(home_url('/')) +- $updated_message, +- array( ++ __('Background updated. Visit your site to see how it looks.'), ++ esc_url(home_url('/')) +); +wp_admin_notice( - $updated_message, - array( ++ $updated_message, ++ array( 'id' => 'message', 'additional_classes' => array( 'updated' ), ) @@ -83233,13 +82746,14 @@ __( 'Medium' ), - 'large' => __( 'Large' ), - 'full' => __( 'Full Size' ), -- ) -- ) -- ); + apply_filters( + 'image_size_names_choose', + array( -+ 'thumbnail' => __('Thumbnail'), -+ 'medium' => __('Medium'), -+ 'large' => __('Large'), -+ 'full' => __('Full Size'), -+ ) ++ 'thumbnail' => __('Thumbnail'), ++ 'medium' => __('Medium'), ++ 'large' => __('Large'), ++ 'full' => __('Full Size'), + ) +- ) +- ); + ) +); @@ -83557,7 +83070,7 @@ } } diff --git a/wp-admin/includes/class-custom-image-header.php b/wp-admin/includes/class-custom-image-header.php -index a4b04bf3fc..546533b415 100644 +index a4b04bf3fc..0425e9838b 100644 --- a/wp-admin/includes/class-custom-image-header.php +++ b/wp-admin/includes/class-custom-image-header.php @@ -59,12 +59,12 @@ class Custom_Image_Header { @@ -83632,11 +83145,10 @@ 'content' => - '

' . __( 'This screen is used to customize the header section of your theme.' ) . '

' . - '

' . __( 'You can choose from the theme’s default header images, or use one of your own. You can also customize how your Site Title and Tagline are displayed.' ) . '

', -- ) -- ); + '

' . __('This screen is used to customize the header section of your theme.') . '

' . + '

' . __('You can choose from the theme’s default header images, or use one of your own. You can also customize how your Site Title and Tagline are displayed.') . '

', -+ ) + ) +- ); +); - get_current_screen()->add_help_tab( @@ -83651,18 +83163,16 @@ - '

' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you would like and click the “Save Changes” button.' ) . '

' . - '

' . __( 'If your theme has more than one default header image, or you have uploaded more than one custom header image, you have the option of having WordPress display a randomly different image on each page of your site. Click the “Random” radio button next to the Uploaded Images or Default Images section to enable this feature.' ) . '

' . - '

' . __( 'If you do not want a header image to be displayed on your site at all, click the “Remove Header Image” button at the bottom of the Header Image section of this page. If you want to re-enable the header image later, you just have to select one of the other image options and click “Save Changes”.' ) . '

', -- ) -- ); -- -- get_current_screen()->add_help_tab( -- array( + '

' . __('You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately. Alternatively, you can use an image that has already been uploaded to your Media Library by clicking the “Choose Image” button.') . '

' . + '

' . __('Some themes come with additional header images bundled. If you see multiple images displayed, select the one you would like and click the “Save Changes” button.') . '

' . + '

' . __('If your theme has more than one default header image, or you have uploaded more than one custom header image, you have the option of having WordPress display a randomly different image on each page of your site. Click the “Random” radio button next to the Uploaded Images or Default Images section to enable this feature.') . '

' . + '

' . __('If you do not want a header image to be displayed on your site at all, click the “Remove Header Image” button at the bottom of the Header Image section of this page. If you want to re-enable the header image later, you just have to select one of the other image options and click “Save Changes”.') . '

', -+ ) + ) +- ); +); -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( 'id' => 'set-header-text', @@ -83681,23 +83191,21 @@ '

' . - '

' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '

' . - '

' . __( 'Do not forget to click “Save Changes” when you are done!' ) . '

', -- ) ++ '

' . __('In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.') . '

' . ++ '

' . __('Do not forget to click “Save Changes” when you are done!') . '

', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Custom Header' ) . '

' . - '

' . __( 'Support forums' ) . '

' - ); -+ '

' . __('In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.') . '

' . -+ '

' . __('Do not forget to click “Save Changes” when you are done!') . '

', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . -+ '

' . __('Documentation on Custom Header') . '

' . -+ '

' . __('Support forums') . '

' ++ '

' . __('Documentation on Custom Header') . '

' . ++ '

' . __('Support forums') . '

' +); } @@ -83845,20 +83353,26 @@ - foreach ( array_keys( $this->default_headers ) as $header ) { - $this->default_headers[ $header ]['url'] = sprintf( +- $this->default_headers[ $header ]['url'], +- $template_directory_uri, +- $stylesheet_directory_uri +- ); + foreach ( array_keys($this->default_headers) as $header ) { +$this->default_headers[ $header ]['url'] = sprintf( - $this->default_headers[ $header ]['url'], - $template_directory_uri, - $stylesheet_directory_uri -- ); ++ $this->default_headers[ $header ]['url'], ++ $template_directory_uri, ++ $stylesheet_directory_uri +); - $this->default_headers[ $header ]['thumbnail_url'] = sprintf( -+$this->default_headers[ $header ]['thumbnail_url'] = sprintf( - $this->default_headers[ $header ]['thumbnail_url'], - $template_directory_uri, - $stylesheet_directory_uri +- $this->default_headers[ $header ]['thumbnail_url'], +- $template_directory_uri, +- $stylesheet_directory_uri - ); ++$this->default_headers[ $header ]['thumbnail_url'] = sprintf( ++ $this->default_headers[ $header ]['thumbnail_url'], ++ $template_directory_uri, ++ $stylesheet_directory_uri +); } } @@ -83983,12 +83497,14 @@ - admin_url( 'customize.php?autofocus[control]=header_image' ) - ); - wp_admin_notice( -+ __('You can now manage and live-preview Custom Header in the Customizer.'), -+ admin_url('customize.php?autofocus[control]=header_image') +- $message, +- array( ++ __('You can now manage and live-preview Custom Header in the Customizer.'), ++ admin_url('customize.php?autofocus[control]=header_image') +); +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'info', 'additional_classes' => array( 'hide-if-no-customize' ), ) @@ -84005,12 +83521,14 @@ - esc_url( home_url( '/' ) ) - ); - wp_admin_notice( -+ __('Header updated. Visit your site to see how it looks.'), -+ esc_url(home_url('/')) +- $updated_message, +- array( ++ __('Header updated. Visit your site to see how it looks.'), ++ esc_url(home_url('/')) +); +wp_admin_notice( - $updated_message, - array( ++ $updated_message, ++ array( 'id' => 'message', 'additional_classes' => array( 'updated' ), ) @@ -84077,27 +83595,27 @@ - __( 'Images of exactly %1$d × %2$d pixels will be used as-is.' ) . '
', - get_theme_support( 'custom-header', 'width' ), - get_theme_support( 'custom-header', 'height' ) -+ __('Images of exactly %1$d × %2$d pixels will be used as-is.') . '
', -+ get_theme_support('custom-header', 'width'), -+ get_theme_support('custom-header', 'height') - ); +- ); - } elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) { - if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) { - printf( ++ __('Images of exactly %1$d × %2$d pixels will be used as-is.') . '
', ++ get_theme_support('custom-header', 'width'), ++ get_theme_support('custom-header', 'height') ++ ); + } elseif ( current_theme_supports('custom-header', 'flex-height') ) { + if ( ! current_theme_supports('custom-header', 'flex-width') ) { + printf( /* translators: %s: Size in pixels. */ - __( 'Images should be at least %s wide.' ) . ' ', - sprintf( -- /* translators: %d: Custom header width. */ ++ __('Images should be at least %s wide.') . ' ', ++ sprintf( + /* translators: %d: Custom header width. */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'width' ) - ) - ); -+ __('Images should be at least %s wide.') . ' ', -+ sprintf( -+ /* translators: %d: Custom header width. */ + '' . __('%d pixels') . '', + get_theme_support('custom-header', 'width') + ) @@ -84112,14 +83630,13 @@ /* translators: %s: Size in pixels. */ - __( 'Images should be at least %s tall.' ) . ' ', - sprintf( -- /* translators: %d: Custom header height. */ ++ __('Images should be at least %s tall.') . ' ', ++ sprintf( + /* translators: %d: Custom header height. */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'height' ) - ) - ); -+ __('Images should be at least %s tall.') . ' ', -+ sprintf( -+ /* translators: %d: Custom header height. */ + '' . __('%d pixels') . '', + get_theme_support('custom-header', 'height') + ) @@ -84139,14 +83656,13 @@ /* translators: %s: Size in pixels. */ - __( 'Suggested width is %s.' ) . ' ', - sprintf( -- /* translators: %d: Custom header width. */ ++ __('Suggested width is %s.') . ' ', ++ sprintf( + /* translators: %d: Custom header width. */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'width' ) - ) - ); -+ __('Suggested width is %s.') . ' ', -+ sprintf( -+ /* translators: %d: Custom header width. */ + '' . __('%d pixels') . '', + get_theme_support('custom-header', 'width') + ) @@ -84160,14 +83676,13 @@ /* translators: %s: Size in pixels. */ - __( 'Suggested height is %s.' ) . ' ', - sprintf( -- /* translators: %d: Custom header height. */ ++ __('Suggested height is %s.') . ' ', ++ sprintf( + /* translators: %d: Custom header height. */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'height' ) - ) - ); -+ __('Suggested height is %s.') . ' ', -+ sprintf( -+ /* translators: %d: Custom header height. */ + '' . __('%d pixels') . '', + get_theme_support('custom-header', 'height') + ) @@ -84190,8 +83705,9 @@

'custom-header', 'step' => 2, - '_wpnonce-custom-header-upload' => wp_create_nonce( 'custom-header-upload' ), @@ -84199,7 +83715,7 @@ ), - admin_url( 'themes.php' ) - ); -+ admin_url('themes.php') ++ admin_url('themes.php') +); ?>

@@ -84386,12 +83902,13 @@ - wp_die( - '

' . __( 'Something went wrong.' ) . '

' . - '

' . __( 'The active theme does not support uploading a custom header image.' ) . '

', +- 403 +- ); + if ( ! current_theme_supports('custom-header', 'uploads') ) { +wp_die( -+ '

' . __('Something went wrong.') . '

' . ++ '

' . __('Something went wrong.') . '

' . + '

' . __('The active theme does not support uploading a custom header image.') . '

', - 403 -- ); ++ 403 +); } @@ -84466,7 +83983,7 @@ /** * Filters the attachment file path after the custom header or background image is set. -@@ -893,13 +893,13 @@ endif; +@@ -893,32 +893,32 @@ endif; * @param string $file Path to the file. * @param int $attachment_id Attachment ID. */ @@ -84478,21 +83995,31 @@ $oitar = $width / $max_width; - $image = wp_crop_image( -+$image = wp_crop_image( - $attachment_id, - 0, - 0, -@@ -908,17 +908,17 @@ endif; - $max_width, - $height / $oitar, - false, +- $attachment_id, +- 0, +- 0, +- $width, +- $height, +- $max_width, +- $height / $oitar, +- false, - str_replace( wp_basename( $file ), 'midsize-' . wp_basename( $file ), $file ) - ); -+ str_replace(wp_basename($file), 'midsize-' . wp_basename($file), $file) -+); - +- - if ( ! $image || is_wp_error( $image ) ) { - wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); ++$image = wp_crop_image( ++ $attachment_id, ++ 0, ++ 0, ++ $width, ++ $height, ++ $max_width, ++ $height / $oitar, ++ false, ++ str_replace(wp_basename($file), 'midsize-' . wp_basename($file), $file) ++); ++ + if ( ! $image || is_wp_error($image) ) { + wp_die(__('Image could not be processed. Please go back and try again.'), __('Image Processing Error')); } @@ -84611,12 +84138,13 @@ - wp_die( - '

' . __( 'Something went wrong.' ) . '

' . - '

' . __( 'The active theme does not support uploading a custom header image.' ) . '

', +- 403 +- ); + if ( ! current_theme_supports('custom-header', 'uploads') ) { +wp_die( -+ '

' . __('Something went wrong.') . '

' . ++ '

' . __('Something went wrong.') . '

' . + '

' . __('The active theme does not support uploading a custom header image.') . '

', - 403 -- ); ++ 403 +); } @@ -84630,16 +84158,17 @@ - wp_die( - '

' . __( 'Something went wrong.' ) . '

' . - '

' . __( 'The active theme does not support a flexible sized header image.' ) . '

', +- 403 +- ); +wp_die( -+ '

' . __('Something went wrong.') . '

' . ++ '

' . __('Something went wrong.') . '

' . + '

' . __('The active theme does not support a flexible sized header image.') . '

', - 403 -- ); ++ 403 +); } if ( $_POST['oitar'] > 1 ) { -@@ -1042,20 +1042,20 @@ endif; +@@ -1042,61 +1042,61 @@ endif; $_POST['height'] = $_POST['height'] * $_POST['oitar']; } @@ -84654,27 +84183,33 @@ + array( 'height' => $_POST['height'], 'width' => $_POST['width'], -- ) + ) - ); -+ ) +); $height = $dimensions['dst_height']; $width = $dimensions['dst_width']; - if ( empty( $_POST['skip-cropping'] ) ) { - $cropped = wp_crop_image( -+ if ( empty($_POST['skip-cropping']) ) { -+$cropped = wp_crop_image( - $attachment_id, - (int) $_POST['x1'], - (int) $_POST['y1'], -@@ -1063,40 +1063,40 @@ endif; - (int) $_POST['height'], - $width, - $height +- $attachment_id, +- (int) $_POST['x1'], +- (int) $_POST['y1'], +- (int) $_POST['width'], +- (int) $_POST['height'], +- $width, +- $height - ); - } elseif ( ! empty( $_POST['create-new-attachment'] ) ) { - $cropped = _copy_image_file( $attachment_id ); ++ if ( empty($_POST['skip-cropping']) ) { ++$cropped = wp_crop_image( ++ $attachment_id, ++ (int) $_POST['x1'], ++ (int) $_POST['y1'], ++ (int) $_POST['width'], ++ (int) $_POST['height'], ++ $width, ++ $height +); + } elseif ( ! empty($_POST['create-new-attachment']) ) { + $cropped = _copy_image_file($attachment_id); @@ -84961,9 +84496,8 @@ + array( 'height' => $crop_details['height'], 'width' => $crop_details['width'], -- ) + ) - ); -+ ) +); - $attachment_id = absint( $_POST['id'] ); @@ -85241,7 +84775,7 @@ return true; diff --git a/wp-admin/includes/class-ftp.php b/wp-admin/includes/class-ftp.php -index 7658a0bc96..2dad5cd84b 100644 +index 7658a0bc96..89a38f286b 100644 --- a/wp-admin/includes/class-ftp.php +++ b/wp-admin/includes/class-ftp.php @@ -237,7 +237,7 @@ class ftp_base { @@ -85272,7 +84806,7 @@ - str_replace('?','.{1,1}',$pattern)))); +$pattern=str_replace( + '?*','*', -+ str_replace( ++ str_replace( + '*?','*', + str_replace( + '*',".*", @@ -85311,7 +84845,7 @@ require_once __DIR__ . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php"; diff --git a/wp-admin/includes/class-language-pack-upgrader-skin.php b/wp-admin/includes/class-language-pack-upgrader-skin.php -index 57b0a1c376..9e55ee24c4 100644 +index 57b0a1c376..b25e1b24e6 100644 --- a/wp-admin/includes/class-language-pack-upgrader-skin.php +++ b/wp-admin/includes/class-language-pack-upgrader-skin.php @@ -28,27 +28,27 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin { @@ -85365,13 +84899,14 @@ $update_actions = array( - 'updates_page' => sprintf( -+'updates_page' => sprintf( - '%s', +- '%s', - self_admin_url( 'update-core.php' ), - __( 'Go to WordPress Updates page' ) - ), -+ self_admin_url('update-core.php'), -+ __('Go to WordPress Updates page') ++'updates_page' => sprintf( ++ '%s', ++ self_admin_url('update-core.php'), ++ __('Go to WordPress Updates page') +), ); @@ -85390,7 +84925,7 @@ } } diff --git a/wp-admin/includes/class-language-pack-upgrader.php b/wp-admin/includes/class-language-pack-upgrader.php -index 3c3d42a56a..e8d9429e84 100644 +index 3c3d42a56a..0ab678f78c 100644 --- a/wp-admin/includes/class-language-pack-upgrader.php +++ b/wp-admin/includes/class-language-pack-upgrader.php @@ -63,12 +63,12 @@ class Language_Pack_Upgrader extends WP_Upgrader { @@ -85431,8 +84966,9 @@ $skin = $upgrader->skin; } else { - $skin = new Language_Pack_Upgrader_Skin( +- array( +$skin = new Language_Pack_Upgrader_Skin( - array( ++ array( 'skip_header_footer' => true, ) - ); @@ -85600,9 +85136,8 @@ 'type' => 'translation', 'bulk' => true, 'translations' => $language_updates_results, -- ) + ) - ); -+ ) +); // Re-add upgrade hooks. @@ -85653,19 +85188,23 @@ if ( ! $mo || ! $po ) { - return new WP_Error( +- 'incompatible_archive_pomo', +- $this->strings['incompatible_archive'], +- sprintf( +return new WP_Error( - 'incompatible_archive_pomo', - $this->strings['incompatible_archive'], - sprintf( ++ '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.' ), - '.po', - '.mo' +- ) +- ); + __('The language pack is missing either the %1$s or %2$s files.'), + '.po', + '.mo' - ) -- ); ++ ) +); } @@ -85752,7 +85291,7 @@ } diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php -index 963f31178c..dce5bc1d03 100644 +index 963f31178c..7d0708072d 100644 --- a/wp-admin/includes/class-pclzip.php +++ b/wp-admin/includes/class-pclzip.php @@ -27,7 +27,7 @@ @@ -86114,12 +85653,11 @@ // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, - "Missing parameter value for option '" -- .PclZipUtilOptionText($p_options_list[$i]) -- ."'"); + PclZip::privErrorLog( + PCLZIP_ERR_MISSING_OPTION_VALUE, + "Missing parameter value for option '" -+ .PclZipUtilOptionText($p_options_list[$i]) + .PclZipUtilOptionText($p_options_list[$i]) +- ."'"); + ."'" + ); @@ -86131,12 +85669,11 @@ // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, - "Wrong parameter value for option '" -- .PclZipUtilOptionText($p_options_list[$i]) -- ."'"); + PclZip::privErrorLog( + PCLZIP_ERR_INVALID_OPTION_VALUE, + "Wrong parameter value for option '" -+ .PclZipUtilOptionText($p_options_list[$i]) + .PclZipUtilOptionText($p_options_list[$i]) +- ."'"); + ."'" + ); @@ -86215,14 +85752,15 @@ - $p_header['version_extracted'], $p_header['flag'], - $p_header['compression'], $v_mtime, $v_mdate, - $p_header['crc'], $p_header['compressed_size'], +- $p_header['size'], +- strlen($p_header['stored_filename']), +- $p_header['extra_len']); + $v_binary_data = pack( + "VvvvvvVVVvv", 0x04034b50, + $p_header['version_extracted'], $p_header['flag'], + $p_header['compression'], $v_mtime, $v_mdate, + $p_header['crc'], $p_header['compressed_size'], - $p_header['size'], -- strlen($p_header['stored_filename']), -- $p_header['extra_len']); ++ $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len'] + ); @@ -86236,18 +85774,20 @@ - $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, - $p_header['version'], $p_header['version_extracted'], - $p_header['flag'], $p_header['compression'], +- $v_mtime, $v_mdate, $p_header['crc'], +- $p_header['compressed_size'], $p_header['size'], +- strlen($p_header['stored_filename']), +- $p_header['extra_len'], $p_header['comment_len'], +- $p_header['disk'], $p_header['internal'], +- $p_header['external'], $p_header['offset']); + $v_binary_data = pack( + "VvvvvvvVVVvvvvvVV", 0x02014b50, + $p_header['version'], $p_header['version_extracted'], + $p_header['flag'], $p_header['compression'], - $v_mtime, $v_mdate, $p_header['crc'], -- $p_header['compressed_size'], $p_header['size'], -- strlen($p_header['stored_filename']), ++ $v_mtime, $v_mdate, $p_header['crc'], + $p_header['compressed_size'], $p_header['size'], + strlen($p_header['stored_filename']), - $p_header['extra_len'], $p_header['comment_len'], -- $p_header['disk'], $p_header['internal'], -- $p_header['external'], $p_header['offset']); ++ $p_header['extra_len'], $p_header['comment_len'], + $p_header['disk'], $p_header['internal'], + $p_header['external'], $p_header['offset'] + ); @@ -86428,7 +85968,7 @@ } unset($v_local_header); diff --git a/wp-admin/includes/class-plugin-installer-skin.php b/wp-admin/includes/class-plugin-installer-skin.php -index ed165ed2d1..24ed785bad 100644 +index ed165ed2d1..8a115aeb16 100644 --- a/wp-admin/includes/class-plugin-installer-skin.php +++ b/wp-admin/includes/class-plugin-installer-skin.php @@ -35,14 +35,14 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { @@ -86455,12 +85995,15 @@ public function before() { - if ( ! empty( $this->api ) ) { - $this->upgrader->strings['process_success'] = sprintf( +- $this->upgrader->strings['process_success_specific'], +- $this->api->name, +- $this->api->version +- ); + if ( ! empty($this->api) ) { +$this->upgrader->strings['process_success'] = sprintf( - $this->upgrader->strings['process_success_specific'], - $this->api->name, - $this->api->version -- ); ++ $this->upgrader->strings['process_success_specific'], ++ $this->api->name, ++ $this->api->version +); } } @@ -86474,90 +86017,98 @@ if ( 'import' === $from ) { - $install_actions['activate_plugin'] = sprintf( -+$install_actions['activate_plugin'] = sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&from=import&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), - __( 'Activate Plugin & Run Importer' ) - ); -+ wp_nonce_url('plugins.php?action=activate&from=import&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), -+ __('Activate Plugin & Run Importer') ++$install_actions['activate_plugin'] = sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&from=import&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), ++ __('Activate Plugin & Run Importer') +); } elseif ( 'press-this' === $from ) { - $install_actions['activate_plugin'] = sprintf( -+$install_actions['activate_plugin'] = sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&from=press-this&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), - __( 'Activate Plugin & Go to Press This' ) - ); -+ wp_nonce_url('plugins.php?action=activate&from=press-this&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), -+ __('Activate Plugin & Go to Press This') ++$install_actions['activate_plugin'] = sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&from=press-this&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), ++ __('Activate Plugin & Go to Press This') +); } else { - $install_actions['activate_plugin'] = sprintf( -+$install_actions['activate_plugin'] = sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), - __( 'Activate Plugin' ) - ); -+ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), -+ __('Activate Plugin') ++$install_actions['activate_plugin'] = sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), ++ __('Activate Plugin') +); } - if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { - $install_actions['network_activate'] = sprintf( -+ if ( is_multisite() && current_user_can('manage_network_plugins') ) { -+$install_actions['network_activate'] = sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&networkwide=1&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), - __( 'Network Activate' ) - ); - unset( $install_actions['activate_plugin'] ); -+ wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), -+ __('Network Activate') ++ if ( is_multisite() && current_user_can('manage_network_plugins') ) { ++$install_actions['network_activate'] = sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . urlencode($plugin_file), 'activate-plugin_' . $plugin_file), ++ __('Network Activate') +); + unset($install_actions['activate_plugin']); } if ( 'import' === $from ) { - $install_actions['importers_page'] = sprintf( -+$install_actions['importers_page'] = sprintf( - '%s', +- '%s', - admin_url( 'import.php' ), - __( 'Go to Importers' ) - ); -+ admin_url('import.php'), -+ __('Go to Importers') ++$install_actions['importers_page'] = sprintf( ++ '%s', ++ admin_url('import.php'), ++ __('Go to Importers') +); } elseif ( 'web' === $this->type ) { - $install_actions['plugins_page'] = sprintf( -+$install_actions['plugins_page'] = sprintf( - '%s', +- '%s', - self_admin_url( 'plugin-install.php' ), - __( 'Go to Plugin Installer' ) - ); -+ self_admin_url('plugin-install.php'), -+ __('Go to Plugin Installer') ++$install_actions['plugins_page'] = sprintf( ++ '%s', ++ self_admin_url('plugin-install.php'), ++ __('Go to Plugin Installer') +); } elseif ( 'upload' === $this->type && 'plugins' === $from ) { - $install_actions['plugins_page'] = sprintf( -+$install_actions['plugins_page'] = sprintf( - '%s', +- '%s', - self_admin_url( 'plugin-install.php' ), - __( 'Go to Plugin Installer' ) - ); -+ self_admin_url('plugin-install.php'), -+ __('Go to Plugin Installer') ++$install_actions['plugins_page'] = sprintf( ++ '%s', ++ self_admin_url('plugin-install.php'), ++ __('Go to Plugin Installer') +); } else { - $install_actions['plugins_page'] = sprintf( -+$install_actions['plugins_page'] = sprintf( - '%s', +- '%s', - self_admin_url( 'plugins.php' ), - __( 'Go to Plugins page' ) - ); -+ self_admin_url('plugins.php'), -+ __('Go to Plugins page') ++$install_actions['plugins_page'] = sprintf( ++ '%s', ++ self_admin_url('plugins.php'), ++ __('Go to Plugins page') +); } @@ -86684,10 +86235,12 @@ +$error = sprintf( /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */ - __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ), -+ __('The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.'), - PHP_VERSION, - $requires_php +- PHP_VERSION, +- $requires_php - ); ++ __('The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.'), ++ PHP_VERSION, ++ $requires_php +); - $blocked_message .= '
  • ' . esc_html( $error ) . '
  • '; @@ -86702,10 +86255,11 @@ /* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */ - __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ), - get_bloginfo( 'version' ), -+ __('Your WordPress version is %1$s, however the uploaded plugin requires %2$s.'), -+ get_bloginfo('version'), - $requires_wp +- $requires_wp - ); ++ __('Your WordPress version is %1$s, however the uploaded plugin requires %2$s.'), ++ get_bloginfo('version'), ++ $requires_wp +); - $blocked_message .= '
  • ' . esc_html( $error ) . '
  • '; @@ -86713,37 +86267,40 @@ $can_update = false; } -@@ -292,14 +292,14 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { +@@ -292,37 +292,37 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { if ( $this->is_downgrading ) { $warning = sprintf( /* translators: %s: Documentation URL. */ - __( 'You are uploading an older version of a current plugin. You can continue to install the older version, but be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) +- ); + __('You are uploading an older version of a current plugin. You can continue to install the older version, but be sure to back up your database and files first.'), + __('https://wordpress.org/documentation/article/wordpress-backups/') - ); ++ ); } else { $warning = sprintf( /* translators: %s: Documentation URL. */ - __( 'You are updating a plugin. Be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) +- ); + __('You are updating a plugin. Be sure to back up your database and files first.'), + __('https://wordpress.org/documentation/article/wordpress-backups/') - ); ++ ); } -@@ -307,22 +307,22 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { + echo '

    ' . $warning . '

    '; $overwrite = $this->is_downgrading ? 'downgrade-plugin' : 'update-plugin'; - $install_actions['overwrite_plugin'] = sprintf( -+$install_actions['overwrite_plugin'] = sprintf( - '%s', +- '%s', - wp_nonce_url( add_query_arg( 'overwrite', $overwrite, $this->url ), 'plugin-upload' ), - _x( 'Replace current with uploaded', 'plugin' ) - ); -+ wp_nonce_url(add_query_arg('overwrite', $overwrite, $this->url), 'plugin-upload'), -+ _x('Replace current with uploaded', 'plugin') ++$install_actions['overwrite_plugin'] = sprintf( ++ '%s', ++ wp_nonce_url(add_query_arg('overwrite', $overwrite, $this->url), 'plugin-upload'), ++ _x('Replace current with uploaded', 'plugin') +); } else { echo $blocked_message; @@ -86770,24 +86327,26 @@ * @param array $new_plugin_data Array with uploaded plugin data. */ - $install_actions = apply_filters( 'install_plugin_overwrite_actions', $install_actions, $this->api, $new_plugin_data ); -+ $install_actions = apply_filters('install_plugin_overwrite_actions', $install_actions, $this->api, $new_plugin_data); - +- - if ( ! empty( $install_actions ) ) { - printf( -+ if ( ! empty($install_actions) ) { -+printf( - '', +- '', - __( 'The uploaded file has expired. Please go back and upload it again.' ) - ); - echo '

    ' . implode( ' ', (array) $install_actions ) . '

    '; -+ __('The uploaded file has expired. Please go back and upload it again.') ++ $install_actions = apply_filters('install_plugin_overwrite_actions', $install_actions, $this->api, $new_plugin_data); ++ ++ if ( ! empty($install_actions) ) { ++printf( ++ '', ++ __('The uploaded file has expired. Please go back and upload it again.') +); + echo '

    ' . implode(' ', (array) $install_actions) . '

    '; } return true; diff --git a/wp-admin/includes/class-plugin-upgrader-skin.php b/wp-admin/includes/class-plugin-upgrader-skin.php -index 0e3e778360..00e79b2339 100644 +index 0e3e778360..b394e249aa 100644 --- a/wp-admin/includes/class-plugin-upgrader-skin.php +++ b/wp-admin/includes/class-plugin-upgrader-skin.php @@ -59,16 +59,16 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { @@ -86820,13 +86379,14 @@ + if ( ! empty($this->plugin) && ! is_wp_error($this->result) && $this->plugin_active ) { // Currently used only when JS is off for a single plugin update? - printf( -+printf( - '', +- '', - esc_attr__( 'Update progress' ), - wp_nonce_url( 'update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ) - ); -+ esc_attr__('Update progress'), -+ wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin) ++printf( ++ '', ++ esc_attr__('Update progress'), ++ wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin) +); } @@ -86835,22 +86395,24 @@ $update_actions = array( - 'activate_plugin' => sprintf( -+'activate_plugin' => sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $this->plugin ), 'activate-plugin_' . $this->plugin ), - __( 'Activate Plugin' ) - ), - 'plugins_page' => sprintf( -+ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin), -+ __('Activate Plugin') -+), -+'plugins_page' => sprintf( - '%s', +- '%s', - self_admin_url( 'plugins.php' ), - __( 'Go to Plugins page' ) - ), -+ self_admin_url('plugins.php'), -+ __('Go to Plugins page') ++'activate_plugin' => sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($this->plugin), 'activate-plugin_' . $this->plugin), ++ __('Activate Plugin') ++), ++'plugins_page' => sprintf( ++ '%s', ++ self_admin_url('plugins.php'), ++ __('Go to Plugins page') +), ); @@ -86876,7 +86438,7 @@ } } diff --git a/wp-admin/includes/class-plugin-upgrader.php b/wp-admin/includes/class-plugin-upgrader.php -index 091cfebc18..de3836b81d 100644 +index 091cfebc18..64e72cdacc 100644 --- a/wp-admin/includes/class-plugin-upgrader.php +++ b/wp-admin/includes/class-plugin-upgrader.php @@ -54,16 +54,16 @@ class Plugin_Upgrader extends WP_Upgrader { @@ -86979,13 +86541,11 @@ 'package' => $package, 'destination' => WP_PLUGIN_DIR, 'clear_destination' => $parsed_args['overwrite_package'], -@@ -142,18 +142,18 @@ class Plugin_Upgrader extends WP_Upgrader { - 'type' => 'plugin', +@@ -143,17 +143,17 @@ class Plugin_Upgrader extends WP_Upgrader { 'action' => 'install', ), -- ) + ) - ); -+ ) +); - remove_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9 ); @@ -87074,9 +86634,8 @@ 'dir' => 'plugins', ), ), -- ) + ) - ); -+ ) +); // Cleanup our hooks, in case something else does an upgrade on this connection. @@ -87176,7 +86735,7 @@ $this->skin->after(); $results[ $plugin ] = true; continue; -@@ -345,56 +345,56 @@ class Plugin_Upgrader extends WP_Upgrader { +@@ -345,40 +345,40 @@ class Plugin_Upgrader extends WP_Upgrader { // Get the URL to the zip file. $r = $current->response[ $plugin ]; @@ -87188,22 +86747,23 @@ $result = new WP_Error( - 'incompatible_wp_required_version', - sprintf( -- /* translators: 1: Current WordPress version, 2: WordPress version required by the new plugin version. */ ++ 'incompatible_wp_required_version', ++ sprintf( + /* translators: 1: Current WordPress version, 2: WordPress version required by the new plugin version. */ - __( 'Your WordPress version is %1$s, however the new plugin version requires %2$s.' ), - $wp_version, - $r->requires - ) -+ 'incompatible_wp_required_version', -+ sprintf( -+ /* translators: 1: Current WordPress version, 2: WordPress version required by the new plugin version. */ +- ); +- +- $this->skin->before( $result ); +- $this->skin->error( $result ); + __('Your WordPress version is %1$s, however the new plugin version requires %2$s.'), + $wp_version, + $r->requires + ) - ); - -- $this->skin->before( $result ); -- $this->skin->error( $result ); ++ ); ++ + $this->skin->before($result); + $this->skin->error($result); $this->skin->after(); @@ -87212,22 +86772,23 @@ $result = new WP_Error( - 'incompatible_php_required_version', - sprintf( -- /* translators: 1: Current PHP version, 2: PHP version required by the new plugin version. */ ++ 'incompatible_php_required_version', ++ sprintf( + /* translators: 1: Current PHP version, 2: PHP version required by the new plugin version. */ - __( 'The PHP version on your server is %1$s, however the new plugin version requires %2$s.' ), - PHP_VERSION, - $r->requires_php - ) -+ 'incompatible_php_required_version', -+ sprintf( -+ /* translators: 1: Current PHP version, 2: PHP version required by the new plugin version. */ +- ); +- +- $this->skin->before( $result ); +- $this->skin->error( $result ); + __('The PHP version on your server is %1$s, however the new plugin version requires %2$s.'), + PHP_VERSION, + $r->requires_php + ) - ); - -- $this->skin->before( $result ); -- $this->skin->error( $result ); ++ ); ++ + $this->skin->before($result); + $this->skin->error($result); $this->skin->after(); @@ -87236,35 +86797,24 @@ + add_filter('upgrader_source_selection', array( $this, 'check_package' )); $result = $this->run( - array( -- 'package' => $r->package, -- 'destination' => WP_PLUGIN_DIR, -- 'clear_destination' => true, -- 'clear_working' => true, -- 'is_multi' => true, -- 'hook_extra' => array( -- 'plugin' => $plugin, -- 'temp_backup' => array( -- 'slug' => dirname( $plugin ), + array( -+ 'package' => $r->package, -+ 'destination' => WP_PLUGIN_DIR, -+ 'clear_destination' => true, -+ 'clear_working' => true, -+ 'is_multi' => true, -+ 'hook_extra' => array( -+ 'plugin' => $plugin, -+ 'temp_backup' => array( + 'package' => $r->package, + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => true, +@@ -387,14 +387,14 @@ class Plugin_Upgrader extends WP_Upgrader { + 'hook_extra' => array( + 'plugin' => $plugin, + 'temp_backup' => array( +- 'slug' => dirname( $plugin ), + 'slug' => dirname($plugin), 'src' => WP_PLUGIN_DIR, 'dir' => 'plugins', -- ), -- ), -- ) -+ ), -+ ), -+ ) - ); + ), + ), + ) +- ); - remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) ); ++ ); + remove_filter('upgrader_source_selection', array( $this, 'check_package' )); } @@ -87293,9 +86843,8 @@ 'type' => 'plugin', 'bulk' => true, 'plugins' => $plugins, -- ) + ) - ); -+ ) +); $this->skin->bulk_footer(); @@ -87377,10 +86926,12 @@ +$error = sprintf( /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */ - __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ), -+ __('The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.'), - PHP_VERSION, - $requires_php +- PHP_VERSION, +- $requires_php - ); ++ __('The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.'), ++ PHP_VERSION, ++ $requires_php +); - return new WP_Error( 'incompatible_php_required_version', $this->strings['incompatible_archive'], $error ); @@ -87393,10 +86944,12 @@ +$error = sprintf( /* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */ - __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ), -+ __('Your WordPress version is %1$s, however the uploaded plugin requires %2$s.'), - $wp_version, - $requires_wp +- $wp_version, +- $requires_wp - ); ++ __('Your WordPress version is %1$s, however the uploaded plugin requires %2$s.'), ++ $wp_version, ++ $requires_wp +); - return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error ); @@ -87564,7 +87117,7 @@ return true; diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php -index 99fe32250b..e12cf5bb2f 100644 +index 99fe32250b..076489af82 100644 --- a/wp-admin/includes/class-theme-installer-skin.php +++ b/wp-admin/includes/class-theme-installer-skin.php @@ -35,14 +35,14 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { @@ -87591,12 +87144,15 @@ public function before() { - if ( ! empty( $this->api ) ) { - $this->upgrader->strings['process_success'] = sprintf( +- $this->upgrader->strings['process_success_specific'], +- $this->api->name, +- $this->api->version +- ); + if ( ! empty($this->api) ) { +$this->upgrader->strings['process_success'] = sprintf( - $this->upgrader->strings['process_success_specific'], - $this->api->name, - $this->api->version -- ); ++ $this->upgrader->strings['process_success_specific'], ++ $this->api->name, ++ $this->api->version +); } } @@ -87628,13 +87184,12 @@ 'action' => 'activate', - 'template' => urlencode( $template ), - 'stylesheet' => urlencode( $stylesheet ), -- ), ++ 'template' => urlencode($template), ++ 'stylesheet' => urlencode($stylesheet), + ), - admin_url( 'themes.php' ) - ); - $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); -+ 'template' => urlencode($template), -+ 'stylesheet' => urlencode($stylesheet), -+ ), + admin_url('themes.php') +); + $activate_link = wp_nonce_url($activate_link, 'switch-theme_' . $stylesheet); @@ -87643,37 +87198,42 @@ - if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) && ! $theme_info->is_block_theme() ) { - $customize_url = add_query_arg( -+ if ( current_user_can('edit_theme_options') && current_user_can('customize') && ! $theme_info->is_block_theme() ) { -+$customize_url = add_query_arg( - array( +- array( - 'theme' => urlencode( $stylesheet ), - 'return' => urlencode( admin_url( 'web' === $this->type ? 'theme-install.php' : 'themes.php' ) ), ++ if ( current_user_can('edit_theme_options') && current_user_can('customize') && ! $theme_info->is_block_theme() ) { ++$customize_url = add_query_arg( ++ array( + 'theme' => urlencode($stylesheet), + 'return' => urlencode(admin_url('web' === $this->type ? 'theme-install.php' : 'themes.php')), ), - admin_url( 'customize.php' ) - ); -+ admin_url('customize.php') ++ admin_url('customize.php') +); - $install_actions['preview'] = sprintf( +- '' . +$install_actions['preview'] = sprintf( - '' . ++ '' . '%s', - esc_url( $customize_url ), - __( 'Live Preview' ), -+ esc_url($customize_url), -+ __('Live Preview'), - /* translators: Hidden accessibility text. %s: Theme name. */ +- /* translators: Hidden accessibility text. %s: Theme name. */ - sprintf( __( 'Live Preview “%s”' ), $name ) - ); ++ esc_url($customize_url), ++ __('Live Preview'), ++ /* translators: Hidden accessibility text. %s: Theme name. */ + sprintf(__('Live Preview “%s”'), $name) +); } - $install_actions['activate'] = sprintf( - '' . -- '%s', ++$install_actions['activate'] = sprintf( ++ '' . + '%s', - esc_url( $activate_link ), - __( 'Activate' ), - /* translators: Hidden accessibility text. %s: Theme name. */ @@ -87682,46 +87242,46 @@ - - if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) { - $install_actions['network_enable'] = sprintf( -+$install_actions['activate'] = sprintf( -+ '' . -+ '%s', +- '%s', +- esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ), +- __( 'Network Enable' ) +- ); + esc_url($activate_link), + __('Activate'), + /* translators: Hidden accessibility text. %s: Theme name. */ -+ sprintf(_x('Activate “%s”', 'theme'), $name) ++ sprintf(_x('Activate “%s”', 'theme'), $name) +); + + if ( is_network_admin() && current_user_can('manage_network_themes') ) { +$install_actions['network_enable'] = sprintf( - '%s', -- esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ), -- __( 'Network Enable' ) -- ); -+ esc_url(wp_nonce_url('themes.php?action=enable&theme=' . urlencode($stylesheet), 'enable-theme_' . $stylesheet)), -+ __('Network Enable') ++ '%s', ++ esc_url(wp_nonce_url('themes.php?action=enable&theme=' . urlencode($stylesheet), 'enable-theme_' . $stylesheet)), ++ __('Network Enable') +); } if ( 'web' === $this->type ) { - $install_actions['themes_page'] = sprintf( -+$install_actions['themes_page'] = sprintf( - '%s', +- '%s', - self_admin_url( 'theme-install.php' ), - __( 'Go to Theme Installer' ) - ); - } elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) ) { - $install_actions['themes_page'] = sprintf( -+ self_admin_url('theme-install.php'), -+ __('Go to Theme Installer') -+); -+ } elseif ( current_user_can('switch_themes') || current_user_can('edit_theme_options') ) { -+$install_actions['themes_page'] = sprintf( - '%s', +- '%s', - self_admin_url( 'themes.php' ), - __( 'Go to Themes page' ) - ); -+ self_admin_url('themes.php'), -+ __('Go to Themes page') ++$install_actions['themes_page'] = sprintf( ++ '%s', ++ self_admin_url('theme-install.php'), ++ __('Go to Theme Installer') ++); ++ } elseif ( current_user_can('switch_themes') || current_user_can('edit_theme_options') ) { ++$install_actions['themes_page'] = sprintf( ++ '%s', ++ self_admin_url('themes.php'), ++ __('Go to Themes page') +); } @@ -87872,10 +87432,12 @@ +$error = sprintf( /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */ - __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ), -+ __('The PHP version on your server is %1$s, however the uploaded theme requires %2$s.'), - PHP_VERSION, - $requires_php +- PHP_VERSION, +- $requires_php - ); ++ __('The PHP version on your server is %1$s, however the uploaded theme requires %2$s.'), ++ PHP_VERSION, ++ $requires_php +); - $blocked_message .= '
  • ' . esc_html( $error ) . '
  • '; @@ -87890,10 +87452,11 @@ /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */ - __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ), - get_bloginfo( 'version' ), -+ __('Your WordPress version is %1$s, however the uploaded theme requires %2$s.'), -+ get_bloginfo('version'), - $requires_wp +- $requires_wp - ); ++ __('Your WordPress version is %1$s, however the uploaded theme requires %2$s.'), ++ get_bloginfo('version'), ++ $requires_wp +); - $blocked_message .= '
  • ' . esc_html( $error ) . '
  • '; @@ -87901,37 +87464,40 @@ $can_update = false; } -@@ -327,14 +327,14 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { +@@ -327,37 +327,37 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { if ( $this->is_downgrading ) { $warning = sprintf( /* translators: %s: Documentation URL. */ - __( 'You are uploading an older version of the active theme. You can continue to install the older version, but be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) +- ); + __('You are uploading an older version of the active theme. You can continue to install the older version, but be sure to back up your database and files first.'), + __('https://wordpress.org/documentation/article/wordpress-backups/') - ); ++ ); } else { $warning = sprintf( /* translators: %s: Documentation URL. */ - __( 'You are updating a theme. Be sure to back up your database and files first.' ), - __( 'https://wordpress.org/documentation/article/wordpress-backups/' ) +- ); + __('You are updating a theme. Be sure to back up your database and files first.'), + __('https://wordpress.org/documentation/article/wordpress-backups/') - ); ++ ); } -@@ -342,22 +342,22 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { + echo '

    ' . $warning . '

    '; $overwrite = $this->is_downgrading ? 'downgrade-theme' : 'update-theme'; - $install_actions['overwrite_theme'] = sprintf( -+$install_actions['overwrite_theme'] = sprintf( - '%s', +- '%s', - wp_nonce_url( add_query_arg( 'overwrite', $overwrite, $this->url ), 'theme-upload' ), - _x( 'Replace active with uploaded', 'theme' ) - ); -+ wp_nonce_url(add_query_arg('overwrite', $overwrite, $this->url), 'theme-upload'), -+ _x('Replace active with uploaded', 'theme') ++$install_actions['overwrite_theme'] = sprintf( ++ '%s', ++ wp_nonce_url(add_query_arg('overwrite', $overwrite, $this->url), 'theme-upload'), ++ _x('Replace active with uploaded', 'theme') +); } else { echo $blocked_message; @@ -87958,24 +87524,26 @@ * @param array $new_theme_data Array with uploaded theme data. */ - $install_actions = apply_filters( 'install_theme_overwrite_actions', $install_actions, $this->api, $new_theme_data ); -+ $install_actions = apply_filters('install_theme_overwrite_actions', $install_actions, $this->api, $new_theme_data); - +- - if ( ! empty( $install_actions ) ) { - printf( -+ if ( ! empty($install_actions) ) { -+printf( - '', +- '', - __( 'The uploaded file has expired. Please go back and upload it again.' ) - ); - echo '

    ' . implode( ' ', (array) $install_actions ) . '

    '; -+ __('The uploaded file has expired. Please go back and upload it again.') ++ $install_actions = apply_filters('install_theme_overwrite_actions', $install_actions, $this->api, $new_theme_data); ++ ++ if ( ! empty($install_actions) ) { ++printf( ++ '', ++ __('The uploaded file has expired. Please go back and upload it again.') +); + echo '

    ' . implode(' ', (array) $install_actions) . '

    '; } return true; diff --git a/wp-admin/includes/class-theme-upgrader-skin.php b/wp-admin/includes/class-theme-upgrader-skin.php -index 97d76a80fe..eef6fb4934 100644 +index 97d76a80fe..20e27ef10a 100644 --- a/wp-admin/includes/class-theme-upgrader-skin.php +++ b/wp-admin/includes/class-theme-upgrader-skin.php @@ -41,13 +41,13 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin { @@ -88011,8 +87579,9 @@ $template = $theme_info->get_template(); - $activate_link = add_query_arg( +- array( +$activate_link = add_query_arg( - array( ++ array( 'action' => 'activate', - 'template' => urlencode( $template ), - 'stylesheet' => urlencode( $stylesheet ), @@ -88022,79 +87591,78 @@ - admin_url( 'themes.php' ) - ); - $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); -+ admin_url('themes.php') ++ admin_url('themes.php') +); + $activate_link = wp_nonce_url($activate_link, 'switch-theme_' . $stylesheet); - $customize_url = add_query_arg( -+$customize_url = add_query_arg( - array( +- array( - 'theme' => urlencode( $stylesheet ), - 'return' => urlencode( admin_url( 'themes.php' ) ), ++$customize_url = add_query_arg( ++ array( + 'theme' => urlencode($stylesheet), + 'return' => urlencode(admin_url('themes.php')), ), - admin_url( 'customize.php' ) - ); -+ admin_url('customize.php') ++ admin_url('customize.php') +); if ( get_stylesheet() === $stylesheet ) { - if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { - $update_actions['preview'] = sprintf( - '' . -- '%s', ++ if ( current_user_can('edit_theme_options') && current_user_can('customize') ) { ++ $update_actions['preview'] = sprintf( ++ '' . + '%s', - esc_url( $customize_url ), - __( 'Customize' ), - /* translators: Hidden accessibility text. %s: Theme name. */ - sprintf( __( 'Customize “%s”' ), $name ) - ); -+ if ( current_user_can('edit_theme_options') && current_user_can('customize') ) { -+ $update_actions['preview'] = sprintf( -+ '' . -+ '%s', + esc_url($customize_url), + __('Customize'), + /* translators: Hidden accessibility text. %s: Theme name. */ -+ sprintf(__('Customize “%s”'), $name) ++ sprintf(__('Customize “%s”'), $name) + ); } - } elseif ( current_user_can( 'switch_themes' ) ) { - if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { - $update_actions['preview'] = sprintf( - '' . -- '%s', ++ } elseif ( current_user_can('switch_themes') ) { ++ if ( current_user_can('edit_theme_options') && current_user_can('customize') ) { ++ $update_actions['preview'] = sprintf( ++ '' . + '%s', - esc_url( $customize_url ), - __( 'Live Preview' ), - /* translators: Hidden accessibility text. %s: Theme name. */ - sprintf( __( 'Live Preview “%s”' ), $name ) - ); -+ } elseif ( current_user_can('switch_themes') ) { -+ if ( current_user_can('edit_theme_options') && current_user_can('customize') ) { -+ $update_actions['preview'] = sprintf( -+ '' . -+ '%s', + esc_url($customize_url), + __('Live Preview'), + /* translators: Hidden accessibility text. %s: Theme name. */ -+ sprintf(__('Live Preview “%s”'), $name) ++ sprintf(__('Live Preview “%s”'), $name) + ); } $update_actions['activate'] = sprintf( - '' . -- '%s', ++ '' . + '%s', - esc_url( $activate_link ), - __( 'Activate' ), - /* translators: Hidden accessibility text. %s: Theme name. */ - sprintf( _x( 'Activate “%s”', 'theme' ), $name ) -+ '' . -+ '%s', +- ); + esc_url($activate_link), + __('Activate'), + /* translators: Hidden accessibility text. %s: Theme name. */ -+ sprintf(_x('Activate “%s”', 'theme'), $name) - ); ++ sprintf(_x('Activate “%s”', 'theme'), $name) ++ ); } - if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() ) { @@ -88132,7 +87700,7 @@ } } diff --git a/wp-admin/includes/class-theme-upgrader.php b/wp-admin/includes/class-theme-upgrader.php -index 869bf64220..132aa2cba6 100644 +index 869bf64220..09532f2708 100644 --- a/wp-admin/includes/class-theme-upgrader.php +++ b/wp-admin/includes/class-theme-upgrader.php @@ -53,15 +53,15 @@ class Theme_Upgrader extends WP_Upgrader { @@ -88251,9 +87819,8 @@ 'sections' => false, 'tags' => false, ), -- ) + ) - ); // Save on a bit of bandwidth. -+ ) +); // Save on a bit of bandwidth. - if ( ! $api || is_wp_error( $api ) ) { @@ -88285,9 +87852,8 @@ 'destination' => get_theme_root(), 'clear_destination' => false, // Do not overwrite files. 'clear_working' => true, -- ) + ) - ); -+ ) +); - if ( is_wp_error( $parent_result ) ) { @@ -88339,13 +87905,11 @@ 'package' => $package, 'destination' => get_theme_root(), 'clear_destination' => $parsed_args['overwrite_package'], -@@ -255,23 +255,23 @@ class Theme_Upgrader extends WP_Upgrader { - 'type' => 'theme', +@@ -256,22 +256,22 @@ class Theme_Upgrader extends WP_Upgrader { 'action' => 'install', ), -- ) + ) - ); -+ ) +); - remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 ); @@ -88428,9 +87992,8 @@ 'dir' => 'themes', ), ), -- ) + ) - ); -+ ) +); - remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 ); @@ -88530,7 +88093,7 @@ $this->skin->after(); $results[ $theme ] = true; continue; -@@ -446,54 +446,54 @@ class Theme_Upgrader extends WP_Upgrader { +@@ -446,40 +446,40 @@ class Theme_Upgrader extends WP_Upgrader { // Get the URL to the zip file. $r = $current->response[ $theme ]; @@ -88539,22 +88102,23 @@ $result = new WP_Error( - 'incompatible_wp_required_version', - sprintf( -- /* translators: 1: Current WordPress version, 2: WordPress version required by the new theme version. */ ++ 'incompatible_wp_required_version', ++ sprintf( + /* translators: 1: Current WordPress version, 2: WordPress version required by the new theme version. */ - __( 'Your WordPress version is %1$s, however the new theme version requires %2$s.' ), - $wp_version, - $r['requires'] - ) -+ 'incompatible_wp_required_version', -+ sprintf( -+ /* translators: 1: Current WordPress version, 2: WordPress version required by the new theme version. */ +- ); +- +- $this->skin->before( $result ); +- $this->skin->error( $result ); + __('Your WordPress version is %1$s, however the new theme version requires %2$s.'), + $wp_version, + $r['requires'] + ) - ); - -- $this->skin->before( $result ); -- $this->skin->error( $result ); ++ ); ++ + $this->skin->before($result); + $this->skin->error($result); $this->skin->after(); @@ -88563,22 +88127,23 @@ $result = new WP_Error( - 'incompatible_php_required_version', - sprintf( -- /* translators: 1: Current PHP version, 2: PHP version required by the new theme version. */ ++ 'incompatible_php_required_version', ++ sprintf( + /* translators: 1: Current PHP version, 2: PHP version required by the new theme version. */ - __( 'The PHP version on your server is %1$s, however the new theme version requires %2$s.' ), - PHP_VERSION, - $r['requires_php'] - ) -+ 'incompatible_php_required_version', -+ sprintf( -+ /* translators: 1: Current PHP version, 2: PHP version required by the new theme version. */ +- ); +- +- $this->skin->before( $result ); +- $this->skin->error( $result ); + __('The PHP version on your server is %1$s, however the new theme version requires %2$s.'), + PHP_VERSION, + $r['requires_php'] + ) - ); - -- $this->skin->before( $result ); -- $this->skin->error( $result ); ++ ); ++ + $this->skin->before($result); + $this->skin->error($result); $this->skin->after(); @@ -88587,35 +88152,26 @@ + add_filter('upgrader_source_selection', array( $this, 'check_package' )); $result = $this->run( - array( -- 'package' => $r['package'], ++ array( + 'package' => $r['package'], - 'destination' => get_theme_root( $theme ), -- 'clear_destination' => true, -- 'clear_working' => true, -- 'is_multi' => true, -- 'hook_extra' => array( -- 'theme' => $theme, -- 'temp_backup' => array( -+ array( -+ 'package' => $r['package'], -+ 'destination' => get_theme_root($theme), -+ 'clear_destination' => true, -+ 'clear_working' => true, -+ 'is_multi' => true, -+ 'hook_extra' => array( -+ 'theme' => $theme, -+ 'temp_backup' => array( ++ 'destination' => get_theme_root($theme), + 'clear_destination' => true, + 'clear_working' => true, + 'is_multi' => true, +@@ -487,13 +487,13 @@ class Theme_Upgrader extends WP_Upgrader { + 'theme' => $theme, + 'temp_backup' => array( 'slug' => $theme, - 'src' => get_theme_root( $theme ), + 'src' => get_theme_root($theme), 'dir' => 'themes', -- ), -- ), -- ) -+ ), -+ ), -+ ) - ); + ), + ), + ) +- ); - remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) ); ++ ); + remove_filter('upgrader_source_selection', array( $this, 'check_package' )); } @@ -88644,9 +88200,8 @@ 'type' => 'theme', 'bulk' => true, 'themes' => $themes, -- ) + ) - ); -+ ) +); $this->skin->bulk_footer(); @@ -88684,7 +88239,7 @@ return $results; } -@@ -568,52 +568,52 @@ class Theme_Upgrader extends WP_Upgrader { +@@ -568,33 +568,33 @@ class Theme_Upgrader extends WP_Upgrader { $this->new_theme_data = array(); @@ -88704,18 +88259,22 @@ // A proper archive should have a style.css file in the single subdirectory. - if ( ! file_exists( $working_directory . 'style.css' ) ) { - return new WP_Error( +- 'incompatible_archive_theme_no_style', +- $this->strings['incompatible_archive'], +- sprintf( + if ( ! file_exists($working_directory . 'style.css') ) { +return new WP_Error( - 'incompatible_archive_theme_no_style', - $this->strings['incompatible_archive'], - sprintf( ++ 'incompatible_archive_theme_no_style', ++ $this->strings['incompatible_archive'], ++ sprintf( /* translators: %s: style.css */ - __( 'The theme is missing the %s stylesheet.' ), - 'style.css' +- ) +- ); + __('The theme is missing the %s stylesheet.'), + 'style.css' - ) -- ); ++ ) +); } @@ -88729,28 +88288,31 @@ 'Name' => 'Theme Name', 'Version' => 'Version', 'Author' => 'Author', - 'Template' => 'Template', +@@ -602,18 +602,18 @@ class Theme_Upgrader extends WP_Upgrader { 'RequiresWP' => 'Requires at least', 'RequiresPHP' => 'Requires PHP', -- ) + ) - ); -+ ) +); - if ( empty( $info['Name'] ) ) { - return new WP_Error( +- 'incompatible_archive_theme_no_name', +- $this->strings['incompatible_archive'], +- sprintf( + if ( empty($info['Name']) ) { +return new WP_Error( - 'incompatible_archive_theme_no_name', - $this->strings['incompatible_archive'], - sprintf( ++ 'incompatible_archive_theme_no_name', ++ $this->strings['incompatible_archive'], ++ sprintf( /* translators: %s: style.css */ - __( 'The %s stylesheet does not contain a valid theme header.' ), - 'style.css' +- ) +- ); + __('The %s stylesheet does not contain a valid theme header.'), + 'style.css' - ) -- ); ++ ) +); } @@ -88769,10 +88331,13 @@ + ! file_exists($working_directory . 'block-templates/index.html') ) { - return new WP_Error( +- 'incompatible_archive_theme_no_index', +- $this->strings['incompatible_archive'], +- sprintf( +return new WP_Error( - 'incompatible_archive_theme_no_index', - $this->strings['incompatible_archive'], - sprintf( ++ 'incompatible_archive_theme_no_index', ++ $this->strings['incompatible_archive'], ++ sprintf( /* translators: 1: templates/index.html, 2: index.php, 3: Documentation URL, 4: Template, 5: style.css */ - __( 'Template is missing. Standalone themes need to have a %1$s or %2$s template file. Child themes need to have a %4$s header in the %5$s stylesheet.' ), - 'templates/index.html', @@ -88780,14 +88345,15 @@ - __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), - 'Template', - 'style.css' +- ) +- ); + __('Template is missing. Standalone themes need to have a %1$s or %2$s template file. Child themes need to have a %4$s header in the %5$s stylesheet.'), + 'templates/index.html', + 'index.php', + __('https://developer.wordpress.org/themes/advanced-topics/child-themes/'), + 'Template', + 'style.css' - ) -- ); ++ ) +); } @@ -88802,10 +88368,12 @@ +$error = sprintf( /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */ - __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ), -+ __('The PHP version on your server is %1$s, however the uploaded theme requires %2$s.'), - PHP_VERSION, - $requires_php +- PHP_VERSION, +- $requires_php - ); ++ __('The PHP version on your server is %1$s, however the uploaded theme requires %2$s.'), ++ PHP_VERSION, ++ $requires_php +); - return new WP_Error( 'incompatible_php_required_version', $this->strings['incompatible_archive'], $error ); @@ -88817,10 +88385,12 @@ +$error = sprintf( /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */ - __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ), -+ __('Your WordPress version is %1$s, however the uploaded theme requires %2$s.'), - $wp_version, - $requires_wp +- $wp_version, +- $requires_wp - ); ++ __('Your WordPress version is %1$s, however the uploaded theme requires %2$s.'), ++ $wp_version, ++ $requires_wp +); - return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error ); @@ -89093,7 +88663,7 @@ } } diff --git a/wp-admin/includes/class-walker-nav-menu-edit.php b/wp-admin/includes/class-walker-nav-menu-edit.php -index 7cc7052cdb..36c4f718ba 100644 +index 7cc7052cdb..1f71659106 100644 --- a/wp-admin/includes/class-walker-nav-menu-edit.php +++ b/wp-admin/includes/class-walker-nav-menu-edit.php @@ -66,7 +66,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { @@ -89180,57 +88750,57 @@ ↑', - wp_nonce_url( +- '', +- wp_nonce_url( - add_query_arg( - array( -- 'action' => 'move-up-menu-item', -- 'menu-item' => $item_id, -- ), ++ printf( ++ '', ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'move-up-menu-item', + 'menu-item' => $item_id, + ), - remove_query_arg( $removed_args, admin_url( 'nav-menus.php' ) ) - ), - 'move-menu_item' -+ add_query_arg( -+ array( -+ 'action' => 'move-up-menu-item', -+ 'menu-item' => $item_id, -+ ), +- ), +- esc_attr__( 'Move up' ) +- ); + remove_query_arg($removed_args, admin_url('nav-menus.php')) + ), + 'move-menu_item' - ), -- esc_attr__( 'Move up' ) -- ); -+ esc_attr__('Move up') ++ ), ++ esc_attr__('Move up') + ); ?> | ↓', - wp_nonce_url( +- '', +- wp_nonce_url( - add_query_arg( - array( -- 'action' => 'move-down-menu-item', -- 'menu-item' => $item_id, -- ), ++ printf( ++ '', ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'move-down-menu-item', + 'menu-item' => $item_id, + ), - remove_query_arg( $removed_args, admin_url( 'nav-menus.php' ) ) - ), - 'move-menu_item' -+ add_query_arg( -+ array( -+ 'action' => 'move-down-menu-item', -+ 'menu-item' => $item_id, -+ ), +- ), +- esc_attr__( 'Move down' ) +- ); + remove_query_arg($removed_args, admin_url('nav-menus.php')) + ), + 'move-menu_item' - ), -- esc_attr__( 'Move down' ) -- ); -+ esc_attr__('Move down') ++ ), ++ esc_attr__('Move down') + ); ?> @@ -89241,13 +88811,14 @@ + $edit_url = admin_url('nav-menus.php'); } else { - $edit_url = add_query_arg( +- array( + $edit_url = add_query_arg( - array( ++ array( 'edit-menu-item' => $item_id, ), - remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) - ); -+ remove_query_arg($removed_args, admin_url('nav-menus.php#menu-item-settings-' . $item_id)) ++ remove_query_arg($removed_args, admin_url('nav-menus.php#menu-item-settings-' . $item_id)) + ); } @@ -89265,7 +88836,7 @@ + esc_url($edit_url), + esc_attr__('Edit menu item'), + /* translators: Hidden accessibility text. */ -+ __('Edit') ++ __('Edit') + ); ?> @@ -89371,24 +88942,21 @@ - wp_nonce_url( - add_query_arg( - array( -- 'action' => 'delete-menu-item', -- 'menu-item' => $item_id, -- ), -- admin_url( 'nav-menus.php' ) -- ), -- 'delete-menu_item_' . $item_id -- ), -- __( 'Remove' ) -- ); + printf( + '%s', + $item_id, + wp_nonce_url( + add_query_arg( + array( -+ 'action' => 'delete-menu-item', -+ 'menu-item' => $item_id, -+ ), + 'action' => 'delete-menu-item', + 'menu-item' => $item_id, + ), +- admin_url( 'nav-menus.php' ) +- ), +- 'delete-menu_item_' . $item_id +- ), +- __( 'Remove' ) +- ); + admin_url('nav-menus.php') + ), + 'delete-menu_item_' . $item_id @@ -89404,24 +88972,21 @@ - esc_url( - add_query_arg( - array( -- 'edit-menu-item' => $item_id, -- 'cancel' => time(), -- ), -- admin_url( 'nav-menus.php' ) -- ) -- ), -- $item_id, -- __( 'Cancel' ) -- ); + printf( + '%s', + $item_id, + esc_url( + add_query_arg( + array( -+ 'edit-menu-item' => $item_id, -+ 'cancel' => time(), -+ ), + 'edit-menu-item' => $item_id, + 'cancel' => time(), + ), +- admin_url( 'nav-menus.php' ) +- ) +- ), +- $item_id, +- __( 'Cancel' ) +- ); + admin_url('nav-menus.php') + ) + ), @@ -89536,7 +89101,7 @@ } } diff --git a/wp-admin/includes/class-wp-application-passwords-list-table.php b/wp-admin/includes/class-wp-application-passwords-list-table.php -index 6c0bf26f76..f651b84e86 100644 +index 6c0bf26f76..fd0c965d38 100644 --- a/wp-admin/includes/class-wp-application-passwords-list-table.php +++ b/wp-admin/includes/class-wp-application-passwords-list-table.php @@ -25,11 +25,11 @@ class WP_Application_Passwords_List_Table extends WP_List_Table { @@ -89624,7 +89189,7 @@ + '', + esc_attr($name), + /* translators: %s: the application password's given name. */ -+ esc_attr(sprintf(__('Revoke "%s"'), $item['name'])), ++ esc_attr(sprintf(__('Revoke "%s"'), $item['name'])), + __('Revoke') +); } @@ -89712,7 +89277,7 @@ + printf( + '', + /* translators: %s: the application password's given name. */ -+ esc_attr(sprintf(__('Revoke "%s"'), '{{ data.name }}')), ++ esc_attr(sprintf(__('Revoke "%s"'), '{{ data.name }}')), + esc_html__('Revoke') + ); break; @@ -89736,7 +89301,7 @@ } diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php -index bb8cb402af..99d50b97d4 100644 +index bb8cb402af..c880885def 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -32,7 +32,7 @@ class WP_Automatic_Updater { @@ -89778,18 +89343,22 @@ - if ( ! is_string( $dir ) || '' === $dir ) { - _doing_it_wrong( +- __METHOD__, +- sprintf( + if ( ! is_string($dir) || '' === $dir ) { +_doing_it_wrong( - __METHOD__, - sprintf( ++ __METHOD__, ++ sprintf( /* translators: %s: The "$dir" argument. */ - __( 'The "%s" argument must be a non-empty string.' ), - '$dir' +- ), +- '6.2.0' +- ); + __('The "%s" argument must be a non-empty string.'), + '$dir' - ), - '6.2.0' -- ); ++ ), ++ '6.2.0' +); return false; @@ -90100,13 +89669,11 @@ 'clear_update_cache' => false, // Always use partial builds if possible for core updates. 'pre_check_md5' => false, -@@ -457,16 +457,16 @@ class WP_Automatic_Updater { - 'attempt_rollback' => true, +@@ -458,15 +458,15 @@ class WP_Automatic_Updater { // Allow relaxed file ownership in some scenarios. 'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership, -- ) + ) - ); -+ ) +); // If the filesystem is unavailable, false is returned. @@ -90353,10 +89920,9 @@ 'error_data' => $result->get_error_data(), 'timestamp' => time(), - 'retry' => in_array( $error_code, $transient_failures, true ), -- ) -- ); + 'retry' => in_array($error_code, $transient_failures, true), -+ ) + ) +- ); +); if ( $send ) { @@ -90380,9 +89946,8 @@ + 'email' => get_site_option('admin_email'), 'version' => $core_update->current, 'timestamp' => time(), -- ) + ) - ); -+ ) +); $next_user_core_update = get_preferred_from_update_core(); @@ -90440,12 +90005,11 @@ $body .= sprintf( /* translators: 1: Home URL, 2: WordPress version. */ - __( 'Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.' ), -- home_url(), -- $core_update->current -+ __('Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.'), -+ home_url(), -+ $core_update->current - ); ++ __('Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.'), + home_url(), + $core_update->current +- ); ++ ); $body .= "\n\n"; if ( ! $newer_version_available ) { - $body .= __( 'No further action is needed on your part.' ) . ' '; @@ -90472,19 +90036,19 @@ } break; -@@ -830,9 +830,9 @@ class WP_Automatic_Updater { +@@ -830,10 +830,10 @@ class WP_Automatic_Updater { case 'manual': $body .= sprintf( /* translators: 1: Home URL, 2: WordPress version. */ - __( 'Please update your site at %1$s to WordPress %2$s.' ), -- home_url(), -- $next_user_core_update->current -+ __('Please update your site at %1$s to WordPress %2$s.'), -+ home_url(), -+ $next_user_core_update->current - ); ++ __('Please update your site at %1$s to WordPress %2$s.'), + home_url(), + $next_user_core_update->current +- ); ++ ); $body .= "\n\n"; + @@ -842,74 +842,74 @@ class WP_Automatic_Updater { * Potential for confusion, and also not useful for them to know at this point. */ @@ -90544,9 +90108,10 @@ +$body .= "\n\n" . sprintf( /* translators: %s: Support email address. */ - __( 'The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working.' ), -+ __('The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working.'), - $core_update->support_email +- $core_update->support_email - ); ++ __('The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working.'), ++ $core_update->support_email +); } else { // Add a note about the support forums. @@ -91041,8 +90606,8 @@ - __( 'To manage plugins on your site, visit the Plugins page: %s' ), - admin_url( 'plugins.php' ) - ); -+ __('To manage plugins on your site, visit the Plugins page: %s'), -+ admin_url('plugins.php') ++ __('To manage plugins on your site, visit the Plugins page: %s'), ++ admin_url('plugins.php') +); $body[] = "\n"; } @@ -91054,8 +90619,8 @@ - __( 'To manage themes on your site, visit the Themes page: %s' ), - admin_url( 'themes.php' ) - ); -+ __('To manage themes on your site, visit the Themes page: %s'), -+ admin_url('themes.php') ++ __('To manage themes on your site, visit the Themes page: %s'), ++ admin_url('themes.php') +); $body[] = "\n"; } @@ -91206,18 +90771,21 @@ if ( $failures ) { - $body[] = trim( -+$body[] = trim( - __( +- __( - "BETA TESTING? ++$body[] = trim( ++ __( + "BETA TESTING? ============= This debugging email is sent when you are using a development version of WordPress. -@@ -1460,38 +1460,38 @@ If you think these failures might be due to a bug in WordPress, could you report +@@ -1459,39 +1459,39 @@ If you think these failures might be due to a bug in WordPress, could you report + * Or, if you're comfortable writing a bug report: https://core.trac.wordpress.org/ Thanks! -- The WordPress Team" - ) +- ) - ); ++ ) +); $body[] = ''; @@ -91313,7 +90881,7 @@ } } diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php -index 993fb7cafc..2821a7f984 100644 +index 993fb7cafc..8f6b40e3ea 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -38,20 +38,20 @@ class WP_Comments_List_Table extends WP_List_Table { @@ -91337,10 +90905,9 @@ 'singular' => 'comment', 'ajax' => true, - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); } @@ -91468,35 +91035,28 @@ - array_merge( - $args, - array( -- 'count' => true, -- 'offset' => 0, -- 'number' => 0, -- 'orderby' => 'none', -- ) -- ) -- ); -- -- $this->set_pagination_args( -- array( +$total_comments = get_comments( + array_merge( + $args, + array( -+ 'count' => true, -+ 'offset' => 0, -+ 'number' => 0, -+ 'orderby' => 'none', -+ ) + 'count' => true, + 'offset' => 0, + 'number' => 0, + 'orderby' => 'none', + ) +- ) +- ); + ) +); -+ + +- $this->set_pagination_args( +- array( +$this->set_pagination_args( + array( 'total_items' => $total_comments, 'per_page' => $comments_per_page, -- ) + ) - ); -+ ) +); } @@ -91544,56 +91104,74 @@ $stati = array( /* translators: %s: Number of comments. */ - 'all' => _nx_noop( -+'all' => _nx_noop( - 'All (%s)', - 'All (%s)', - 'comments' +- 'All (%s)', +- 'All (%s)', +- 'comments' - ), // Singular not used. ++'all' => _nx_noop( ++ 'All (%s)', ++ 'All (%s)', ++ 'comments' +), // Singular not used. /* translators: %s: Number of comments. */ - 'mine' => _nx_noop( -+'mine' => _nx_noop( - 'Mine (%s)', - 'Mine (%s)', - 'comments' +- 'Mine (%s)', +- 'Mine (%s)', +- 'comments' - ), ++'mine' => _nx_noop( ++ 'Mine (%s)', ++ 'Mine (%s)', ++ 'comments' +), /* translators: %s: Number of comments. */ - 'moderated' => _nx_noop( -+'moderated' => _nx_noop( - 'Pending (%s)', - 'Pending (%s)', - 'comments' +- 'Pending (%s)', +- 'Pending (%s)', +- 'comments' - ), ++'moderated' => _nx_noop( ++ 'Pending (%s)', ++ 'Pending (%s)', ++ 'comments' +), /* translators: %s: Number of comments. */ - 'approved' => _nx_noop( -+'approved' => _nx_noop( - 'Approved (%s)', - 'Approved (%s)', - 'comments' +- 'Approved (%s)', +- 'Approved (%s)', +- 'comments' - ), ++'approved' => _nx_noop( ++ 'Approved (%s)', ++ 'Approved (%s)', ++ 'comments' +), /* translators: %s: Number of comments. */ - 'spam' => _nx_noop( -+'spam' => _nx_noop( - 'Spam (%s)', - 'Spam (%s)', - 'comments' +- 'Spam (%s)', +- 'Spam (%s)', +- 'comments' - ), ++'spam' => _nx_noop( ++ 'Spam (%s)', ++ 'Spam (%s)', ++ 'comments' +), /* translators: %s: Number of comments. */ - 'trash' => _nx_noop( -+'trash' => _nx_noop( - 'Trash (%s)', - 'Trash (%s)', - 'comments' +- 'Trash (%s)', +- 'Trash (%s)', +- 'comments' - ), ++'trash' => _nx_noop( ++ 'Trash (%s)', ++ 'Trash (%s)', ++ 'comments' +), ); @@ -91616,19 +91194,15 @@ $current_user_id = get_current_user_id(); $num_comments->mine = get_comments( - array( -- 'post_id' => $post_id ? $post_id : 0, -- 'user_id' => $current_user_id, -- 'count' => true, -- 'orderby' => 'none', -- ) + array( -+ 'post_id' => $post_id ? $post_id : 0, -+ 'user_id' => $current_user_id, -+ 'count' => true, -+ 'orderby' => 'none', -+ ) - ); + 'post_id' => $post_id ? $post_id : 0, + 'user_id' => $current_user_id, + 'count' => true, + 'orderby' => 'none', + ) +- ); - $link = add_query_arg( 'user_id', $current_user_id, $link ); ++ ); + $link = add_query_arg('user_id', $current_user_id, $link); } else { - $link = remove_query_arg( 'user_id', $link ); @@ -91649,7 +91223,7 @@ } /* -@@ -324,14 +324,14 @@ class WP_Comments_List_Table extends WP_List_Table { +@@ -324,15 +324,15 @@ class WP_Comments_List_Table extends WP_List_Table { */ $status_links[ $status ] = array( @@ -91662,15 +91236,17 @@ - ( 'moderated' === $status ) ? 'pending' : $status, - number_format_i18n( $num_comments->$status ) - ) +- ), + translate_nooped_plural($label, $num_comments->$status), + sprintf( + '%s', + ( 'moderated' === $status ) ? 'pending' : $status, + number_format_i18n($num_comments->$status) + ) - ), ++ ), 'current' => $status === $comment_status, ); + } @@ -346,7 +346,7 @@ class WP_Comments_List_Table extends WP_List_Table { * @param string[] $status_links An associative array of fully-formed comment status links. Includes 'All', 'Mine', * 'Pending', 'Approved', 'Spam', and 'Trash'. @@ -91814,25 +91390,25 @@ - array( - 'comment' => __( 'Comments' ), - 'pings' => __( 'Pings' ), -- ) -- ); -- -- if ( $comment_types && is_array( $comment_types ) ) { -- printf( +$comment_types = apply_filters( + 'admin_comment_types_dropdown', + array( + 'comment' => __('Comments'), + 'pings' => __('Pings'), -+ ) + ) +- ); +); -+ -+ if ( $comment_types && is_array($comment_types) ) { -+printf( - '', - /* translators: Hidden accessibility text. */ + +- if ( $comment_types && is_array( $comment_types ) ) { +- printf( +- '', +- /* translators: Hidden accessibility text. */ - __( 'Filter by comment type' ) - ); ++ if ( $comment_types && is_array($comment_types) ) { ++printf( ++ '', ++ /* translators: Hidden accessibility text. */ + __('Filter by comment type') +); @@ -91844,22 +91420,19 @@ foreach ( $comment_types as $type => $label ) { if ( get_comments( - array( -- 'count' => true, -- 'orderby' => 'none', -- 'type' => $type, -- ) + array( -+ 'count' => true, -+ 'orderby' => 'none', -+ 'type' => $type, -+ ) - ) ) { + 'count' => true, + 'orderby' => 'none', + 'type' => $type, + ) +- ) ) { - printf( - "\t\n", - esc_attr( $type ), - selected( $comment_type, $type, false ), - esc_html( $label ) - ); ++ ) ) { + printf( + "\t\n", + esc_attr($type), @@ -92018,12 +91591,13 @@ - "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=unapproved", - esc_attr__( 'Unapprove this comment' ), - __( 'Unapprove' ) +- ); + '%s', + $unapprove_url, + "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=unapproved", + esc_attr__('Unapprove this comment'), + __('Unapprove') - ); ++ ); } elseif ( 'unapproved' === $the_comment_status ) { $actions['approve'] = sprintf( - '%s', @@ -92031,146 +91605,183 @@ - "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=approved", - esc_attr__( 'Approve this comment' ), - __( 'Approve' ) +- ); + '%s', + $approve_url, + "delete:the-comment-list:comment-{$comment->comment_ID}:e7e7d3:action=dim-comment&new=approved", + esc_attr__('Approve this comment'), + __('Approve') - ); ++ ); } } else { - $actions['approve'] = sprintf( -+$actions['approve'] = sprintf( - '%s', - $approve_url, - "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved", +- '%s', +- $approve_url, +- "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved", - esc_attr__( 'Approve this comment' ), - __( 'Approve' ) - ); -+ esc_attr__('Approve this comment'), -+ __('Approve') -+); - +- - $actions['unapprove'] = sprintf( -+$actions['unapprove'] = sprintf( - '%s', - $unapprove_url, - "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=unapproved", +- '%s', +- $unapprove_url, +- "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=unapproved", - esc_attr__( 'Unapprove this comment' ), - __( 'Unapprove' ) - ); -+ esc_attr__('Unapprove this comment'), -+ __('Unapprove') ++$actions['approve'] = sprintf( ++ '%s', ++ $approve_url, ++ "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=approved", ++ esc_attr__('Approve this comment'), ++ __('Approve') ++); ++ ++$actions['unapprove'] = sprintf( ++ '%s', ++ $unapprove_url, ++ "dim:the-comment-list:comment-{$comment->comment_ID}:unapproved:e7e7d3:e7e7d3:new=unapproved", ++ esc_attr__('Unapprove this comment'), ++ __('Unapprove') +); } if ( 'spam' !== $the_comment_status ) { - $actions['spam'] = sprintf( -+$actions['spam'] = sprintf( - '%s', - $spam_url, - "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", +- '%s', +- $spam_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", - esc_attr__( 'Mark this comment as spam' ), -+ esc_attr__('Mark this comment as spam'), - /* translators: "Mark as spam" link. */ +- /* translators: "Mark as spam" link. */ - _x( 'Spam', 'verb' ) - ); ++$actions['spam'] = sprintf( ++ '%s', ++ $spam_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", ++ esc_attr__('Mark this comment as spam'), ++ /* translators: "Mark as spam" link. */ + _x('Spam', 'verb') +); } elseif ( 'spam' === $the_comment_status ) { - $actions['unspam'] = sprintf( -+$actions['unspam'] = sprintf( - '%s', - $unspam_url, - "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:unspam=1", +- '%s', +- $unspam_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:unspam=1", - esc_attr__( 'Restore this comment from the spam' ), - _x( 'Not Spam', 'comment' ) - ); -+ esc_attr__('Restore this comment from the spam'), -+ _x('Not Spam', 'comment') ++$actions['unspam'] = sprintf( ++ '%s', ++ $unspam_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:unspam=1", ++ esc_attr__('Restore this comment from the spam'), ++ _x('Not Spam', 'comment') +); } if ( 'trash' === $the_comment_status ) { - $actions['untrash'] = sprintf( -+$actions['untrash'] = sprintf( - '%s', - $untrash_url, - "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:untrash=1", +- '%s', +- $untrash_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:untrash=1", - esc_attr__( 'Restore this comment from the Trash' ), - __( 'Restore' ) - ); -+ esc_attr__('Restore this comment from the Trash'), -+ __('Restore') ++$actions['untrash'] = sprintf( ++ '%s', ++ $untrash_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}:66cc66:untrash=1", ++ esc_attr__('Restore this comment from the Trash'), ++ __('Restore') +); } if ( 'spam' === $the_comment_status || 'trash' === $the_comment_status || ! EMPTY_TRASH_DAYS ) { - $actions['delete'] = sprintf( -+$actions['delete'] = sprintf( - '%s', - $delete_url, - "delete:the-comment-list:comment-{$comment->comment_ID}::delete=1", +- '%s', +- $delete_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}::delete=1", - esc_attr__( 'Delete this comment permanently' ), - __( 'Delete Permanently' ) - ); -+ esc_attr__('Delete this comment permanently'), -+ __('Delete Permanently') ++$actions['delete'] = sprintf( ++ '%s', ++ $delete_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}::delete=1", ++ esc_attr__('Delete this comment permanently'), ++ __('Delete Permanently') +); } else { - $actions['trash'] = sprintf( -+$actions['trash'] = sprintf( - '%s', - $trash_url, - "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", +- '%s', +- $trash_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", - esc_attr__( 'Move this comment to the Trash' ), - _x( 'Trash', 'verb' ) - ); -+ esc_attr__('Move this comment to the Trash'), -+ _x('Trash', 'verb') ++$actions['trash'] = sprintf( ++ '%s', ++ $trash_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", ++ esc_attr__('Move this comment to the Trash'), ++ _x('Trash', 'verb') +); } if ( 'spam' !== $the_comment_status && 'trash' !== $the_comment_status ) { - $actions['edit'] = sprintf( -+$actions['edit'] = sprintf( - '%s', - "comment.php?action=editcomment&c={$comment->comment_ID}", +- '%s', +- "comment.php?action=editcomment&c={$comment->comment_ID}", - esc_attr__( 'Edit this comment' ), - __( 'Edit' ) - ); -+ esc_attr__('Edit this comment'), -+ __('Edit') ++$actions['edit'] = sprintf( ++ '%s', ++ "comment.php?action=editcomment&c={$comment->comment_ID}", ++ esc_attr__('Edit this comment'), ++ __('Edit') +); $format = ''; - $actions['quickedit'] = sprintf( -+$actions['quickedit'] = sprintf( - $format, - $comment->comment_ID, - $comment->comment_post_ID, - 'edit', - 'vim-q comment-inline', +- $format, +- $comment->comment_ID, +- $comment->comment_post_ID, +- 'edit', +- 'vim-q comment-inline', - esc_attr__( 'Quick edit this comment inline' ), - __( 'Quick Edit' ) - ); -+ esc_attr__('Quick edit this comment inline'), -+ __('Quick Edit') -+); - +- - $actions['reply'] = sprintf( -+$actions['reply'] = sprintf( - $format, - $comment->comment_ID, - $comment->comment_post_ID, - 'replyto', - 'vim-r comment-inline', +- $format, +- $comment->comment_ID, +- $comment->comment_post_ID, +- 'replyto', +- 'vim-r comment-inline', - esc_attr__( 'Reply to this comment' ), - __( 'Reply' ) - ); -+ esc_attr__('Reply to this comment'), -+ __('Reply') ++$actions['quickedit'] = sprintf( ++ $format, ++ $comment->comment_ID, ++ $comment->comment_post_ID, ++ 'edit', ++ 'vim-q comment-inline', ++ esc_attr__('Quick edit this comment inline'), ++ __('Quick Edit') ++); ++ ++$actions['reply'] = sprintf( ++ $format, ++ $comment->comment_ID, ++ $comment->comment_post_ID, ++ 'replyto', ++ 'vim-r comment-inline', ++ esc_attr__('Reply to this comment'), ++ __('Reply') +); } @@ -92233,9 +91844,10 @@ /* translators: %s: Comment link. */ - __( 'In reply to %s.' ), - '' . $name . '' +- ); + __('In reply to %s.'), + '' . $name . '' - ); ++ ); } } @@ -92284,13 +91896,14 @@ + if ( ! empty($author_url_display) ) { // Print link to author URL, and disallow referrer information (without using target="_blank"). - printf( -+printf( - '%s
    ', +- '%s
    ', - esc_url( $author_url ), - esc_html( $author_url_display ) - ); -+ esc_url($author_url), -+ esc_html($author_url_display) ++printf( ++ '%s
    ', ++ esc_url($author_url), ++ esc_html($author_url_display) +); } @@ -92314,16 +91927,14 @@ if ( $author_ip ) { $author_ip_url = add_query_arg( - array( -- 's' => $author_ip, -- 'mode' => 'detail', -- ), -- admin_url( 'edit-comments.php' ) + array( -+ 's' => $author_ip, -+ 'mode' => 'detail', -+ ), + 's' => $author_ip, + 'mode' => 'detail', + ), +- admin_url( 'edit-comments.php' ) +- ); + admin_url('edit-comments.php') - ); ++ ); if ( 'spam' === $comment_status ) { - $author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url ); @@ -92350,22 +91961,24 @@ - ); + __('%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) +); echo 'is_trash && current_user_can( 'edit_post', $post->ID ) ) { - $actions['edit'] = sprintf( -+ if ( ! $this->is_trash && current_user_can('edit_post', $post->ID) ) { -+$actions['edit'] = sprintf( - '%s', +- '%s', - esc_url( get_edit_post_link( $post->ID ) ), -+ esc_url(get_edit_post_link($post->ID)), - /* translators: %s: Attachment title. */ +- /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ), - __( 'Edit' ) - ); ++ if ( ! $this->is_trash && current_user_can('edit_post', $post->ID) ) { ++$actions['edit'] = sprintf( ++ '%s', ++ esc_url(get_edit_post_link($post->ID)), ++ /* translators: %s: Attachment title. */ + esc_attr(sprintf(__('Edit “%s”'), $att_title)), -+ __('Edit') ++ __('Edit') +); } @@ -100109,12 +99809,13 @@ - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Restore “%s” from the Trash' ), $att_title ) ), - __( 'Restore' ) +- ); + '%s', + esc_url(wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID)), + /* translators: %s: Attachment title. */ -+ esc_attr(sprintf(__('Restore “%s” from the Trash'), $att_title)), ++ esc_attr(sprintf(__('Restore “%s” from the Trash'), $att_title)), + __('Restore') - ); ++ ); } elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { $actions['trash'] = sprintf( - '%s', @@ -100122,15 +99823,16 @@ - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $att_title ) ), - _x( 'Trash', 'verb' ) +- ); + '%s', + esc_url(wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID)), + /* translators: %s: Attachment title. */ -+ esc_attr(sprintf(__('Move “%s” to the Trash'), $att_title)), ++ esc_attr(sprintf(__('Move “%s” to the Trash'), $att_title)), + _x('Trash', 'verb') - ); ++ ); } -@@ -791,61 +791,61 @@ class WP_Media_List_Table extends WP_List_Table { + if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) { $show_confirmation = ( ! $this->is_trash && ! MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : ''; $actions['delete'] = sprintf( @@ -100140,13 +99842,14 @@ - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Delete “%s” permanently' ), $att_title ) ), - __( 'Delete Permanently' ) +- ); + '%s', + esc_url(wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID)), + $show_confirmation, + /* translators: %s: Attachment title. */ -+ esc_attr(sprintf(__('Delete “%s” permanently'), $att_title)), ++ esc_attr(sprintf(__('Delete “%s” permanently'), $att_title)), + __('Delete Permanently') - ); ++ ); } } @@ -100164,12 +99867,13 @@ - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ), - __( 'View' ) +- ); + '%s', + esc_url($permalink), + /* translators: %s: Attachment title. */ -+ esc_attr(sprintf(__('View “%s”'), $att_title)), ++ esc_attr(sprintf(__('View “%s”'), $att_title)), + __('View') - ); ++ ); } if ( $attachment_url ) { @@ -100180,43 +99884,49 @@ - esc_attr( sprintf( __( 'Copy “%s” URL to clipboard' ), $att_title ) ), - __( 'Copy URL' ), - __( 'Copied!' ) +- ); + '', + esc_url($attachment_url), + /* translators: %s: Attachment title. */ -+ esc_attr(sprintf(__('Copy “%s” URL to clipboard'), $att_title)), ++ esc_attr(sprintf(__('Copy “%s” URL to clipboard'), $att_title)), + __('Copy URL'), + __('Copied!') - ); ++ ); } } if ( $attachment_url ) { - $actions['download'] = sprintf( -+$actions['download'] = sprintf( - '%s', +- '%s', - esc_url( $attachment_url ), -+ esc_url($attachment_url), - /* translators: %s: Attachment title. */ +- /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Download “%s”' ), $att_title ) ), - __( 'Download file' ) - ); ++$actions['download'] = sprintf( ++ '%s', ++ esc_url($attachment_url), ++ /* translators: %s: Attachment title. */ + esc_attr(sprintf(__('Download “%s”'), $att_title)), -+ __('Download file') ++ __('Download file') +); } - if ( $this->detached && current_user_can( 'edit_post', $post->ID ) ) { - $actions['attach'] = sprintf( -+ if ( $this->detached && current_user_can('edit_post', $post->ID) ) { -+$actions['attach'] = sprintf( - '%s', - $post->ID, - /* translators: %s: Attachment title. */ +- '%s', +- $post->ID, +- /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Attach “%s” to existing content' ), $att_title ) ), - __( 'Attach' ) - ); ++ if ( $this->detached && current_user_can('edit_post', $post->ID) ) { ++$actions['attach'] = sprintf( ++ '%s', ++ $post->ID, ++ /* translators: %s: Attachment title. */ + esc_attr(sprintf(__('Attach “%s” to existing content'), $att_title)), -+ __('Attach') ++ __('Attach') +); } @@ -100242,7 +99952,7 @@ } } diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php -index ffa22318ce..91dafdf098 100644 +index ffa22318ce..983784aa1f 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -35,25 +35,25 @@ class WP_MS_Sites_List_Table extends WP_List_Table { @@ -100265,10 +99975,9 @@ + array( 'plural' => 'sites', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); } @@ -100343,11 +100052,12 @@ ) { // IPv4 address. - $sql = $wpdb->prepare( -+$sql = $wpdb->prepare( - "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", +- "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", - $wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' ) - ); -+ $wpdb->esc_like($s) . ( ! empty($wild) ? '%' : '' ) ++$sql = $wpdb->prepare( ++ "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", ++ $wpdb->esc_like($s) . ( ! empty($wild) ? '%' : '' ) +); - $reg_blog_ids = $wpdb->get_col( $sql ); @@ -100412,33 +100122,27 @@ - array_merge( - $args, - array( -- 'count' => true, -- 'offset' => 0, -- 'number' => 0, -- ) -- ) -- ); -- -- $this->set_pagination_args( -- array( +$total_sites = get_sites( + array_merge( + $args, + array( -+ 'count' => true, -+ 'offset' => 0, -+ 'number' => 0, -+ ) + 'count' => true, + 'offset' => 0, + 'number' => 0, + ) +- ) +- ); + ) +); -+ + +- $this->set_pagination_args( +- array( +$this->set_pagination_args( + array( 'total_items' => $total_sites, 'per_page' => $per_page, -- ) + ) - ); -+ ) +); } @@ -100455,52 +100159,66 @@ $statuses = array( /* translators: %s: Number of sites. */ - 'all' => _nx_noop( -+'all' => _nx_noop( - 'All (%s)', - 'All (%s)', - 'sites' +- 'All (%s)', +- 'All (%s)', +- 'sites' - ), ++'all' => _nx_noop( ++ 'All (%s)', ++ 'All (%s)', ++ 'sites' +), /* translators: %s: Number of sites. */ - 'public' => _n_noop( -+'public' => _n_noop( - 'Public (%s)', - 'Public (%s)' +- 'Public (%s)', +- 'Public (%s)' - ), ++'public' => _n_noop( ++ 'Public (%s)', ++ 'Public (%s)' +), /* translators: %s: Number of sites. */ - 'archived' => _n_noop( -+'archived' => _n_noop( - 'Archived (%s)', - 'Archived (%s)' +- 'Archived (%s)', +- 'Archived (%s)' - ), ++'archived' => _n_noop( ++ 'Archived (%s)', ++ 'Archived (%s)' +), /* translators: %s: Number of sites. */ - 'mature' => _n_noop( -+'mature' => _n_noop( - 'Mature (%s)', - 'Mature (%s)' +- 'Mature (%s)', +- 'Mature (%s)' - ), ++'mature' => _n_noop( ++ 'Mature (%s)', ++ 'Mature (%s)' +), /* translators: %s: Number of sites. */ - 'spam' => _nx_noop( -+'spam' => _nx_noop( - 'Spam (%s)', - 'Spam (%s)', - 'sites' +- 'Spam (%s)', +- 'Spam (%s)', +- 'sites' - ), ++'spam' => _nx_noop( ++ 'Spam (%s)', ++ 'Spam (%s)', ++ 'sites' +), /* translators: %s: Number of sites. */ - 'deleted' => _n_noop( -+'deleted' => _n_noop( - 'Deleted (%s)', - 'Deleted (%s)' +- 'Deleted (%s)', +- 'Deleted (%s)' - ), ++'deleted' => _n_noop( ++ 'Deleted (%s)', ++ 'Deleted (%s)' +), ); @@ -100514,9 +100232,10 @@ $label = sprintf( - translate_nooped_plural( $label_count, $counts[ $status ] ), - number_format_i18n( $counts[ $status ] ) -+ translate_nooped_plural($label_count, $counts[ $status ]), -+ number_format_i18n($counts[ $status ]) - ); +- ); ++ translate_nooped_plural($label_count, $counts[ $status ]), ++ number_format_i18n($counts[ $status ]) ++ ); - $full_url = 'all' === $status ? $url : add_query_arg( 'status', $status, $url ); + $full_url = 'all' === $status ? $url : add_query_arg('status', $status, $url); @@ -100675,12 +100394,14 @@ %2$s', +- '%2$s', - esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ), -+ esc_url(network_admin_url('site-info.php?id=' . $blog['blog_id'])), - $blogname +- $blogname - ); ++printf( ++ '%2$s', ++ esc_url(network_admin_url('site-info.php?id=' . $blog['blog_id'])), ++ $blogname +); - $this->site_states( $blog ); @@ -100699,9 +100420,9 @@ - get_option( 'blogname' ), - '' . get_option( 'blogdescription' ) . '' - ); -+ __('%1$s – %2$s'), -+ get_option('blogname'), -+ '' . get_option('blogdescription') . '' ++ __('%1$s – %2$s'), ++ get_option('blogname'), ++ '' . get_option('blogdescription') . '' +); echo '

    '; restore_current_blog(); @@ -100753,8 +100474,9 @@ + $user_count = wp_cache_get($blog['blog_id'] . '_user_count', 'blog-details'); if ( ! $user_count ) { - $blog_users = new WP_User_Query( +- array( +$blog_users = new WP_User_Query( - array( ++ array( 'blog_id' => $blog['blog_id'], 'fields' => 'ID', 'number' => 1, @@ -100907,6 +100629,7 @@ - ) - ), - __( 'Activate' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -100915,7 +100638,7 @@ + ) + ), + __('Activate') - ); ++ ); } else { $actions['deactivate'] = sprintf( - '%2$s', @@ -100926,6 +100649,7 @@ - ) - ), - __( 'Deactivate' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -100934,7 +100658,7 @@ + ) + ), + __('Deactivate') - ); ++ ); } if ( '1' === $blog['archived'] ) { @@ -100947,6 +100671,7 @@ - ) - ), - __( 'Unarchive' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -100955,7 +100680,7 @@ + ) + ), + __('Unarchive') - ); ++ ); } else { $actions['archive'] = sprintf( - '%2$s', @@ -100966,6 +100691,7 @@ - ) - ), - _x( 'Archive', 'verb; site' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -100974,7 +100700,7 @@ + ) + ), + _x('Archive', 'verb; site') - ); ++ ); } if ( '1' === $blog['spam'] ) { @@ -100987,6 +100713,7 @@ - ) - ), - _x( 'Not Spam', 'site' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -100995,7 +100722,7 @@ + ) + ), + _x('Not Spam', 'site') - ); ++ ); } else { $actions['spam'] = sprintf( - '%2$s', @@ -101006,6 +100733,7 @@ - ) - ), - _x( 'Spam', 'site' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -101014,7 +100742,7 @@ + ) + ), + _x('Spam', 'site') - ); ++ ); } - if ( current_user_can( 'delete_site', $blog['blog_id'] ) ) { @@ -101028,6 +100756,7 @@ - ) - ), - __( 'Delete' ) +- ); + '%2$s', + esc_url( + wp_nonce_url( @@ -101036,7 +100765,7 @@ + ) + ), + __('Delete') - ); ++ ); } } @@ -101065,7 +100794,7 @@ } } diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php -index cc0206eec0..83b8b107d5 100644 +index cc0206eec0..e9d1d27f23 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -45,15 +45,15 @@ class WP_MS_Themes_List_Table extends WP_List_Table { @@ -101078,10 +100807,9 @@ + array( 'plural' => 'themes', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); - $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all'; @@ -101262,9 +100990,8 @@ + array( 'themes' => $js_themes, 'totals' => wp_get_update_data(), -- ) + ) - ); -+ ) +); if ( $orderby ) { @@ -101297,9 +101024,8 @@ + array( 'total_items' => $total_this_page, 'per_page' => $themes_per_page, -- ) + ) - ); -+ ) +); } @@ -101555,8 +101281,8 @@ - __( 'Select %s' ), - $theme->display( 'Name' ) - ); -+ __('Select %s'), -+ $theme->display('Name') ++ __('Select %s'), ++ $theme->display('Name') +); ?> @@ -101574,7 +101300,7 @@ } // Pre-order. -@@ -560,37 +560,37 @@ class WP_MS_Themes_List_Table extends WP_List_Table { +@@ -560,87 +560,87 @@ class WP_MS_Themes_List_Table extends WP_List_Table { ); $stylesheet = $theme->get_stylesheet(); @@ -101585,20 +101311,16 @@ if ( ! $theme->errors() ) { $url = add_query_arg( - array( -- 'action' => 'enable', -- 'theme' => $theme_key, -- 'paged' => $page, -- 's' => $s, -- ), -- $url + array( -+ 'action' => 'enable', -+ 'theme' => $theme_key, -+ 'paged' => $page, -+ 's' => $s, -+ ), + 'action' => 'enable', + 'theme' => $theme_key, + 'paged' => $page, + 's' => $s, + ), +- $url +- ); + $url - ); ++ ); if ( $this->is_site_themes ) { /* translators: %s: Theme name. */ @@ -101615,23 +101337,26 @@ - esc_url( wp_nonce_url( $url, 'enable-theme_' . $stylesheet ) ), - esc_attr( $aria_label ), - ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) +- ); + '%s', + esc_url(wp_nonce_url($url, 'enable-theme_' . $stylesheet)), + esc_attr($aria_label), + ( $this->is_site_themes ? __('Enable') : __('Network Enable') ) - ); ++ ); } } else { - $url = add_query_arg( +- array( +$url = add_query_arg( - array( ++ array( 'action' => 'disable', 'theme' => $theme_key, -@@ -598,30 +598,30 @@ class WP_MS_Themes_List_Table extends WP_List_Table { + 'paged' => $page, 's' => $s, ), - $url +- $url - ); ++ $url +); if ( $this->is_site_themes ) { @@ -101645,15 +101370,16 @@ } - $actions['disable'] = sprintf( -+$actions['disable'] = sprintf( - '%s', +- '%s', - esc_url( wp_nonce_url( $url, 'disable-theme_' . $stylesheet ) ), - esc_attr( $aria_label ), - ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) - ); -+ esc_url(wp_nonce_url($url, 'disable-theme_' . $stylesheet)), -+ esc_attr($aria_label), -+ ( $this->is_site_themes ? __('Disable') : __('Network Disable') ) ++$actions['disable'] = sprintf( ++ '%s', ++ esc_url(wp_nonce_url($url, 'disable-theme_' . $stylesheet)), ++ esc_attr($aria_label), ++ ( $this->is_site_themes ? __('Disable') : __('Network Disable') ) +); } @@ -101666,31 +101392,36 @@ + && get_option('template') !== $stylesheet ) { - $url = add_query_arg( +- array( +$url = add_query_arg( - array( ++ array( 'action' => 'delete-selected', 'checked[]' => $theme_key, -@@ -630,17 +630,17 @@ class WP_MS_Themes_List_Table extends WP_List_Table { + 'theme_status' => $context, + 'paged' => $page, 's' => $s, ), - 'themes.php' +- 'themes.php' - ); ++ 'themes.php' +); /* translators: %s: Theme name. */ - $aria_label = sprintf( _x( 'Delete %s', 'theme' ), $theme->display( 'Name' ) ); -+ $aria_label = sprintf(_x('Delete %s', 'theme'), $theme->display('Name')); - +- - $actions['delete'] = sprintf( -+$actions['delete'] = sprintf( - '%s', +- '%s', - esc_url( wp_nonce_url( $url, 'bulk-themes' ) ), - esc_attr( $aria_label ), - __( 'Delete' ) - ); -+ esc_url(wp_nonce_url($url, 'bulk-themes')), -+ esc_attr($aria_label), -+ __('Delete') ++ $aria_label = sprintf(_x('Delete %s', 'theme'), $theme->display('Name')); ++ ++$actions['delete'] = sprintf( ++ '%s', ++ esc_url(wp_nonce_url($url, 'bulk-themes')), ++ esc_attr($aria_label), ++ __('Delete') +); } /** @@ -101761,18 +101492,20 @@ + if ( $theme->get('ThemeURI') ) { /* translators: %s: Theme name. */ - $aria_label = sprintf( __( 'Visit theme site for %s' ), $theme->display( 'Name' ) ); -+ $aria_label = sprintf(__('Visit theme site for %s'), $theme->display('Name')); - +- - $theme_meta[] = sprintf( -+$theme_meta[] = sprintf( - '%s', +- '%s', - $theme->display( 'ThemeURI' ), - esc_attr( $aria_label ), - __( 'Visit Theme Site' ) - ); -+ $theme->display('ThemeURI'), -+ esc_attr($aria_label), -+ __('Visit Theme Site') ++ $aria_label = sprintf(__('Visit theme site for %s'), $theme->display('Name')); ++ ++$theme_meta[] = sprintf( ++ '%s', ++ $theme->display('ThemeURI'), ++ esc_attr($aria_label), ++ __('Visit Theme Site') +); } @@ -101783,8 +101516,8 @@ - __( 'Child theme of %s' ), - '' . $theme->parent()->display( 'Name' ) . '' - ); -+ __('Child theme of %s'), -+ '' . $theme->parent()->display('Name') . '' ++ __('Child theme of %s'), ++ '' . $theme->parent()->display('Name') . '' +); } @@ -101855,12 +101588,14 @@ $html[] = '' . $text . ''; } else { - $html[] = sprintf( -+$html[] = sprintf( - '', +- '', - wp_nonce_url( $url, 'updates' ), -+ wp_nonce_url($url, 'updates'), - $action +- $action - ); ++$html[] = sprintf( ++ '', ++ wp_nonce_url($url, 'updates'), ++ $action +); $html[] = ''; @@ -101871,12 +101606,15 @@ - if ( isset( $available_updates->response[ $stylesheet ] ) ) { - $html[] = sprintf( +- '
    %s
    ', +- $time_class, +- wp_get_auto_update_message() +- ); + if ( isset($available_updates->response[ $stylesheet ]) ) { +$html[] = sprintf( - '
    %s
    ', - $time_class, - wp_get_auto_update_message() -- ); ++ '
    %s
    ', ++ $time_class, ++ wp_get_auto_update_message() +); } @@ -101900,9 +101638,8 @@ + array( 'type' => 'error', 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -- ) + ) - ); -+ ) +); } @@ -102051,7 +101788,7 @@ } } diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php -index d02d380536..f7be4dd771 100644 +index d02d380536..bd0bcf504d 100644 --- a/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/wp-admin/includes/class-wp-ms-users-list-table.php @@ -19,7 +19,7 @@ class WP_MS_Users_List_Table extends WP_List_Table { @@ -102147,9 +101884,8 @@ + array( 'total_items' => $wp_user_search->get_total(), 'per_page' => $users_per_page, -- ) + ) - ); -+ ) +); } @@ -102193,19 +101929,21 @@ + 'url' => network_admin_url('users.php'), +'label' => sprintf( /* translators: Number of users. */ - _nx( +- _nx( - 'All (%s)', - 'All (%s)', - $total_users, - 'users' +- ), +- number_format_i18n( $total_users ) +- ), ++ _nx( + 'All (%s)', + 'All (%s)', + $total_users, + 'users' - ), -- number_format_i18n( $total_users ) -- ), -+ number_format_i18n($total_users) ++ ), ++ number_format_i18n($total_users) +), 'current' => 'super' !== $role, ); @@ -102216,17 +101954,19 @@ + 'url' => network_admin_url('users.php?role=super'), +'label' => sprintf( /* translators: Number of users. */ - _n( +- _n( - 'Super Admin (%s)', - 'Super Admins (%s)', - $total_admins +- ), +- number_format_i18n( $total_admins ) +- ), ++ _n( + 'Super Admin (%s)', + 'Super Admins (%s)', + $total_admins - ), -- number_format_i18n( $total_admins ) -- ), -+ number_format_i18n($total_admins) ++ ), ++ number_format_i18n($total_admins) +), 'current' => 'super' === $role, ); @@ -102345,10 +102085,12 @@ +printf( /* translators: 1: User's first name, 2: Last name. */ - _x( '%1$s %2$s', 'Display name based on first name and last name' ), -+ _x('%1$s %2$s', 'Display name based on first name and last name'), - $user->first_name, - $user->last_name +- $user->first_name, +- $user->last_name - ); ++ _x('%1$s %2$s', 'Display name based on first name and last name'), ++ $user->first_name, ++ $user->last_name +); } elseif ( $user->first_name ) { echo $user->first_name; @@ -102513,7 +102255,7 @@ } } diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php -index 7823f00b70..412e65e4ba 100644 +index 7823f00b70..14c99e2f3b 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -26,7 +26,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { @@ -102711,9 +102453,8 @@ + array( 'total_items' => $api->info['results'], 'per_page' => $args['per_page'], -- ) + ) - ); -+ ) +); - if ( isset( $api->info['groups'] ) ) { @@ -102723,10 +102464,12 @@ if ( $installed_plugins ) { - $js_plugins = array_fill_keys( -+$js_plugins = array_fill_keys( - array( 'all', 'search', 'active', 'inactive', 'recently_activated', 'mustuse', 'dropins' ), - array() +- array( 'all', 'search', 'active', 'inactive', 'recently_activated', 'mustuse', 'dropins' ), +- array() - ); ++$js_plugins = array_fill_keys( ++ array( 'all', 'search', 'active', 'inactive', 'recently_activated', 'mustuse', 'dropins' ), ++ array() +); - $js_plugins['all'] = array_values( wp_list_pluck( $installed_plugins, 'plugin' ) ); @@ -102740,10 +102483,13 @@ } - wp_localize_script( +- 'updates', +- '_wpUpdatesItemCounts', +- array( +wp_localize_script( - 'updates', - '_wpUpdatesItemCounts', - array( ++ 'updates', ++ '_wpUpdatesItemCounts', ++ array( 'plugins' => $js_plugins, 'totals' => wp_get_update_data(), ) @@ -102760,10 +102506,12 @@ $error_message = '

    ' . $this->error->get_error_message() . '

    '; - $error_message .= '

    '; - wp_admin_notice( +- $error_message, +- array( + $error_message .= '

    '; +wp_admin_notice( - $error_message, - array( ++ $error_message, ++ array( 'additional_classes' => array( 'inline', 'error' ), 'paragraph_wrap' => false, ) @@ -102927,7 +102675,7 @@ /** * Filters the plugin card description on the Add Plugins screen. -@@ -534,47 +534,47 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { +@@ -534,48 +534,48 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { * @param array $plugin An array of plugin data. See {@see plugins_api()} * for the list of possible values. */ @@ -102980,24 +102728,27 @@ - esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ), - esc_attr( $name ), - __( 'Install Now' ) +- ); + '
    %s', + esc_attr($plugin['slug']), + esc_url($status['url']), + /* translators: %s: Plugin name and version. */ -+ esc_attr(sprintf(_x('Install %s now', 'plugin'), $name)), ++ esc_attr(sprintf(_x('Install %s now', 'plugin'), $name)), + esc_attr($name), + __('Install Now') - ); ++ ); } else { $action_links[] = sprintf( - '', - _x( 'Cannot Install', 'plugin' ) +- ); + '', + _x('Cannot Install', 'plugin') - ); ++ ); } } -@@ -584,19 +584,19 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { + break; +@@ -584,93 +584,93 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { if ( $status['url'] ) { if ( $compatible_php && $compatible_wp ) { $action_links[] = sprintf( @@ -103009,37 +102760,40 @@ - esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ), - esc_attr( $name ), - __( 'Update Now' ) +- ); + '%s', + esc_attr($status['file']), + esc_attr($plugin['slug']), + esc_url($status['url']), + /* translators: %s: Plugin name and version. */ -+ esc_attr(sprintf(_x('Update %s now', 'plugin'), $name)), ++ esc_attr(sprintf(_x('Update %s now', 'plugin'), $name)), + esc_attr($name), + __('Update Now') - ); ++ ); } else { $action_links[] = sprintf( - '', - _x( 'Cannot Update', 'plugin' ) +- ); + '', + _x('Cannot Update', 'plugin') - ); ++ ); } } -@@ -604,73 +604,73 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { + break; case 'latest_installed': case 'newer_installed': - if ( is_plugin_active( $status['file'] ) ) { - $action_links[] = sprintf( -+ if ( is_plugin_active($status['file']) ) { -+ $action_links[] = sprintf( - '', +- '', - _x( 'Active', 'plugin' ) - ); - } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) { -+ _x('Active', 'plugin') ++ if ( is_plugin_active($status['file']) ) { ++ $action_links[] = sprintf( ++ '', ++ _x('Active', 'plugin') + ); + } elseif ( current_user_can('activate_plugin', $status['file']) ) { if ( $compatible_php && $compatible_wp ) { @@ -103051,17 +102805,15 @@ $activate_url = add_query_arg( - array( - '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ), -- 'action' => 'activate', -- 'plugin' => $status['file'], -- ), -- network_admin_url( 'plugins.php' ) + array( -+ '_wpnonce' => wp_create_nonce('activate-plugin_' . $status['file']), -+ 'action' => 'activate', -+ 'plugin' => $status['file'], -+ ), ++ '_wpnonce' => wp_create_nonce('activate-plugin_' . $status['file']), + 'action' => 'activate', + 'plugin' => $status['file'], + ), +- network_admin_url( 'plugins.php' ) +- ); + network_admin_url('plugins.php') - ); ++ ); if ( is_network_admin() ) { - $button_text = __( 'Network Activate' ); @@ -103078,26 +102830,29 @@ - esc_url( $activate_url ), - esc_attr( sprintf( $button_label, $plugin['name'] ) ), - $button_text +- ); + '%3$s', + esc_url($activate_url), + esc_attr(sprintf($button_label, $plugin['name'])), + $button_text - ); ++ ); } else { $action_links[] = sprintf( - '', - _x( 'Cannot Activate', 'plugin' ) +- ); + '', + _x('Cannot Activate', 'plugin') - ); ++ ); } } else { - $action_links[] = sprintf( -+ $action_links[] = sprintf( - '', +- '', - _x( 'Installed', 'plugin' ) - ); -+ _x('Installed', 'plugin') ++ $action_links[] = sprintf( ++ '', ++ _x('Installed', 'plugin') + ); } break; @@ -103105,28 +102860,33 @@ } - $details_link = self_admin_url( +- 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . +$details_link = self_admin_url( - 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . ++ 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . '&TB_iframe=true&width=600&height=550' - ); -+); - +- - $action_links[] = sprintf( -+$action_links[] = sprintf( - '%s', +- '%s', - esc_url( $details_link ), -+ esc_url($details_link), - /* translators: %s: Plugin name and version. */ +- /* translators: %s: Plugin name and version. */ - esc_attr( sprintf( __( 'More information about %s' ), $name ) ), - esc_attr( $name ), - __( 'More Details' ) - ); +- +- if ( ! empty( $plugin['icons']['svg'] ) ) { ++); ++ ++$action_links[] = sprintf( ++ '%s', ++ esc_url($details_link), ++ /* translators: %s: Plugin name and version. */ + esc_attr(sprintf(__('More information about %s'), $name)), -+ esc_attr($name), -+ __('More Details') ++ esc_attr($name), ++ __('More Details') +); - -- if ( ! empty( $plugin['icons']['svg'] ) ) { ++ + if ( ! empty($plugin['icons']['svg']) ) { $plugin_icon_url = $plugin['icons']['svg']; - } elseif ( ! empty( $plugin['icons']['2x'] ) ) { @@ -103232,15 +102992,13 @@ wp_admin_notice( - $incompatible_notice_message, - array( -- 'type' => 'error', -- 'additional_classes' => array( 'notice-alt', 'inline' ), -- ) + $incompatible_notice_message, + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'notice-alt', 'inline' ), -+ ) - ); + 'type' => 'error', + 'additional_classes' => array( 'notice-alt', 'inline' ), + ) +- ); ++ ); } ?>
    @@ -103268,17 +103026,13 @@ $plugin['rating'], -- 'type' => 'percent', -- 'number' => $plugin['num_ratings'], -- ) -- ); + wp_star_rating( + array( -+ 'rating' => $plugin['rating'], -+ 'type' => 'percent', -+ 'number' => $plugin['num_ratings'], -+ ) + 'rating' => $plugin['rating'], + 'type' => 'percent', + 'number' => $plugin['num_ratings'], + ) +- ); + ); ?> - @@ -103343,7 +103097,7 @@ } } diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php -index 5c92fba7aa..24165711c6 100644 +index 5c92fba7aa..0d2eeb867d 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -39,29 +39,29 @@ class WP_Plugins_List_Table extends WP_List_Table { @@ -103356,10 +103110,9 @@ + array( 'plural' => 'plugins', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); $allowed_statuses = array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search', 'paused', 'auto-update-enabled', 'auto-update-disabled' ); @@ -103648,9 +103401,8 @@ + array( 'plugins' => $js_plugins, 'totals' => wp_get_update_data(), -- ) + ) - ); -+ ) +); if ( ! $orderby ) { @@ -103682,9 +103434,8 @@ + array( 'total_items' => $total_this_page, 'per_page' => $plugins_per_page, -- ) + ) - ); -+ ) +); } @@ -104015,8 +103766,8 @@ - __( 'Files in the %s directory are executed automatically.' ), - '' . str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) . '' - ) . '

    '; -+ __('Files in the %s directory are executed automatically.'), -+ '' . str_replace(ABSPATH, '/', WPMU_PLUGIN_DIR) . '' ++ __('Files in the %s directory are executed automatically.'), ++ '' . str_replace(ABSPATH, '/', WPMU_PLUGIN_DIR) . '' +) . '

    '; } elseif ( 'top' === $which && 'dropins' === $status ) { - echo '

    ' . sprintf( @@ -104025,8 +103776,8 @@ - __( 'Drop-ins are single files, found in the %s directory, that replace or enhance WordPress features in ways that are not possible for traditional plugins.' ), - '' . str_replace( ABSPATH, '', WP_CONTENT_DIR ) . '' - ) . '

    '; -+ __('Drop-ins are single files, found in the %s directory, that replace or enhance WordPress features in ways that are not possible for traditional plugins.'), -+ '' . str_replace(ABSPATH, '', WP_CONTENT_DIR) . '' ++ __('Drop-ins are single files, found in the %s directory, that replace or enhance WordPress features in ways that are not possible for traditional plugins.'), ++ '' . str_replace(ABSPATH, '', WP_CONTENT_DIR) . '' +) . '

    '; } echo '
    '; @@ -104146,7 +103897,7 @@ + wp_nonce_url('plugins.php?action=deactivate&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file), + esc_attr($plugin_id_attr), + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(_x('Network Deactivate %s', 'plugin'), $plugin_data['Name'])), ++ esc_attr(sprintf(_x('Network Deactivate %s', 'plugin'), $plugin_data['Name'])), + __('Network Deactivate') + ); } @@ -104155,26 +103906,29 @@ + if ( current_user_can('manage_network_plugins') ) { if ( $compatible_php && $compatible_wp ) { - $actions['activate'] = sprintf( -+ $actions['activate'] = sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ), - esc_attr( $plugin_id_attr ), -+ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file), -+ esc_attr($plugin_id_attr), - /* translators: %s: Plugin name. */ +- /* translators: %s: Plugin name. */ - esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ), - __( 'Network Activate' ) - ); ++ $actions['activate'] = sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file), ++ esc_attr($plugin_id_attr), ++ /* translators: %s: Plugin name. */ + esc_attr(sprintf(_x('Network Activate %s', 'plugin'), $plugin_data['Name'])), -+ __('Network Activate') ++ __('Network Activate') + ); } else { - $actions['activate'] = sprintf( -+ $actions['activate'] = sprintf( - '%s', +- '%s', - _x( 'Cannot Activate', 'plugin' ) - ); -+ _x('Cannot Activate', 'plugin') ++ $actions['activate'] = sprintf( ++ '%s', ++ _x('Cannot Activate', 'plugin') + ); } } @@ -104194,7 +103948,7 @@ + wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins'), + esc_attr($plugin_id_attr), + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(_x('Delete %s', 'plugin'), $plugin_data['Name'])), ++ esc_attr(sprintf(_x('Delete %s', 'plugin'), $plugin_data['Name'])), + __('Delete') + ); } @@ -104226,7 +103980,7 @@ + wp_nonce_url('plugins.php?action=deactivate&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file), + esc_attr($plugin_id_attr), + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(_x('Deactivate %s', 'plugin'), $plugin_data['Name'])), ++ esc_attr(sprintf(_x('Deactivate %s', 'plugin'), $plugin_data['Name'])), + __('Deactivate') + ); } @@ -104246,7 +104000,7 @@ + wp_nonce_url('plugins.php?action=resume&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'resume-plugin_' . $plugin_file), + esc_attr($plugin_id_attr), + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(_x('Resume %s', 'plugin'), $plugin_data['Name'])), ++ esc_attr(sprintf(_x('Resume %s', 'plugin'), $plugin_data['Name'])), + __('Resume') + ); } @@ -104255,26 +104009,29 @@ + if ( current_user_can('activate_plugin', $plugin_file) ) { if ( $compatible_php && $compatible_wp ) { - $actions['activate'] = sprintf( -+ $actions['activate'] = sprintf( - '%s', +- '%s', - wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ), - esc_attr( $plugin_id_attr ), -+ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file), -+ esc_attr($plugin_id_attr), - /* translators: %s: Plugin name. */ +- /* translators: %s: Plugin name. */ - esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ), - __( 'Activate' ) - ); ++ $actions['activate'] = sprintf( ++ '%s', ++ wp_nonce_url('plugins.php?action=activate&plugin=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file), ++ esc_attr($plugin_id_attr), ++ /* translators: %s: Plugin name. */ + esc_attr(sprintf(_x('Activate %s', 'plugin'), $plugin_data['Name'])), -+ __('Activate') ++ __('Activate') + ); } else { - $actions['activate'] = sprintf( -+ $actions['activate'] = sprintf( - '%s', +- '%s', - _x( 'Cannot Activate', 'plugin' ) - ); -+ _x('Cannot Activate', 'plugin') ++ $actions['activate'] = sprintf( ++ '%s', ++ _x('Cannot Activate', 'plugin') + ); } } @@ -104294,7 +104051,7 @@ + wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . urlencode($plugin_file) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins'), + esc_attr($plugin_id_attr), + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(_x('Delete %s', 'plugin'), $plugin_data['Name'])), ++ esc_attr(sprintf(_x('Delete %s', 'plugin'), $plugin_data['Name'])), + __('Delete') + ); } @@ -104355,15 +104112,18 @@ $checkbox = ''; } else { - $checkbox = sprintf( +- '' . +$checkbox = sprintf( - '' . ++ '' . '', - esc_attr( $plugin_file ), -+ esc_attr($plugin_file), - $checkbox_id, - /* translators: Hidden accessibility text. %s: Plugin name. */ +- $checkbox_id, +- /* translators: Hidden accessibility text. %s: Plugin name. */ - sprintf( __( 'Select %s' ), $plugin_data['Name'] ) - ); ++ esc_attr($plugin_file), ++ $checkbox_id, ++ /* translators: Hidden accessibility text. %s: Plugin name. */ + sprintf(__('Select %s'), $plugin_data['Name']) +); } @@ -104455,7 +104215,13 @@ - esc_url( - network_admin_url( - 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . -- '&TB_iframe=true&width=600&height=550' ++ if ( isset($plugin_data['slug']) && current_user_can('install_plugins') ) { ++ $plugin_meta[] = sprintf( ++ '%s', ++ esc_url( ++ network_admin_url( ++ 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . + '&TB_iframe=true&width=600&height=550' - ) - ), - /* translators: %s: Plugin name. */ @@ -104464,17 +104230,10 @@ - __( 'View details' ) - ); - } elseif ( ! empty( $plugin_data['PluginURI'] ) ) { -+ if ( isset($plugin_data['slug']) && current_user_can('install_plugins') ) { -+ $plugin_meta[] = sprintf( -+ '%s', -+ esc_url( -+ network_admin_url( -+ 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . -+ '&TB_iframe=true&width=600&height=550' + ) + ), + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(__('More information about %s'), $plugin_name)), ++ esc_attr(sprintf(__('More information about %s'), $plugin_name)), + esc_attr($plugin_name), + __('View details') + ); @@ -104618,22 +104377,18 @@ * of possible values. */ - echo apply_filters( 'plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data ); -- ++ echo apply_filters('plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data); + - wp_admin_notice( - '', - array( -- 'type' => 'error', -- 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -- ) -- ); -+ echo apply_filters('plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data); -+ + wp_admin_notice( + '', + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -+ ) + 'type' => 'error', + 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), + ) +- ); + ); echo ''; @@ -104652,11 +104407,12 @@ if ( ! $compatible_php || ! $compatible_wp ) { - printf( -+printf( - '
    @@ -134974,29 +134930,26 @@ /* translators: %s: User login. */ - __( 'What should be done with content owned by %s?' ), - '' . $delete_user->user_login . '' +- ); + __('What should be done with content owned by %s?'), + '' . $delete_user->user_login . '' - ); ++ ); ?>

    $details ) { - $blog_users = get_users( - array( -- 'blog_id' => $details->userblog_id, -- 'fields' => array( 'ID', 'user_login' ), -- ) -- ); -- -- if ( is_array( $blog_users ) && ! empty( $blog_users ) ) { -- $user_site = "{$details->blogname}"; + $blog_users = get_users( + array( -+ 'blog_id' => $details->userblog_id, -+ 'fields' => array( 'ID', 'user_login' ), -+ ) + 'blog_id' => $details->userblog_id, + 'fields' => array( 'ID', 'user_login' ), + ) +- ); + ); -+ + +- if ( is_array( $blog_users ) && ! empty( $blog_users ) ) { +- $user_site = "{$details->blogname}"; + if ( is_array($blog_users) && ! empty($blog_users) ) { + $user_site = "{$details->blogname}"; $user_dropdown = '
    @@ -137201,11 +137111,13 @@ /* translators: 1: Host name. */ - _x( 'like %1$s/site1 and %1$s/site2', 'subdirectory examples' ), - $hostname +- ); + _x('like %1$s/site1 and %1$s/site2', 'subdirectory examples'), + $hostname - ); ++ ); ?> + @@ -290,125 +290,125 @@ function network_step1( $errors = false ) { endif; @@ -137221,9 +137133,8 @@ + $subdirectory_warning_message, + array( 'additional_classes' => array( 'error', 'inline' ), -- ) + ) - ); -+ ) +); } @@ -137416,9 +137327,8 @@ + $errors->get_error_message(), + array( 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) +); } @@ -137442,9 +137352,10 @@ - wp_admin_notice( - '' . __( 'Warning:' ) . ' ' . __( 'An existing WordPress network was detected.' ), +- array( +wp_admin_notice( -+ '' . __('Warning:') . ' ' . __('An existing WordPress network was detected.'), - array( ++ '' . __('Warning:') . ' ' . __('An existing WordPress network was detected.'), ++ array( 'additional_classes' => array( 'error' ), ) - ); @@ -137477,30 +137388,35 @@ +$notice_message .= sprintf( /* translators: 1: wp-config.php, 2: .htaccess */ - __( 'You should back up your existing %1$s and %2$s files.' ), -+ __('You should back up your existing %1$s and %2$s files.'), - 'wp-config.php', - '.htaccess' +- 'wp-config.php', +- '.htaccess' - ); - } elseif ( file_exists( $home_path . 'web.config' ) ) { - $notice_message .= sprintf( ++ __('You should back up your existing %1$s and %2$s files.'), ++ 'wp-config.php', ++ '.htaccess' +); + } elseif ( file_exists($home_path . 'web.config') ) { +$notice_message .= sprintf( /* translators: 1: wp-config.php, 2: web.config */ - __( 'You should back up your existing %1$s and %2$s files.' ), -+ __('You should back up your existing %1$s and %2$s files.'), - 'wp-config.php', - 'web.config' +- 'wp-config.php', +- 'web.config' - ); ++ __('You should back up your existing %1$s and %2$s files.'), ++ 'wp-config.php', ++ 'web.config' +); } else { - $notice_message .= sprintf( +$notice_message .= sprintf( /* translators: %s: wp-config.php */ - __( 'You should back up your existing %s file.' ), -+ __('You should back up your existing %s file.'), - 'wp-config.php' +- 'wp-config.php' - ); ++ __('You should back up your existing %s file.'), ++ 'wp-config.php' +); } @@ -137528,7 +137444,7 @@ */ - '/* ' . __( 'That’s all, stop editing! Happy publishing.' ) . ' */' - ); -+ '/* ' . __('That’s all, stop editing! Happy publishing.') . ' */' ++ '/* ' . __('That’s all, stop editing! Happy publishing.') . ' */' +); ?>

    @@ -137538,9 +137454,10 @@ +printf( /* translators: %s: File name (wp-config.php, .htaccess or web.config). */ - __( 'Network configuration rules for %s' ), -+ __('Network configuration rules for %s'), - 'wp-config.php' +- 'wp-config.php' - ); ++ __('Network configuration rules for %s'), ++ 'wp-config.php' +); ?>

    @@ -137585,17 +137502,19 @@ /* translators: %s: wp-config.php */ - __( 'This unique authentication key is also missing from your %s file.' ), - 'wp-config.php' +- ); + __('This unique authentication key is also missing from your %s file.'), + 'wp-config.php' - ); ++ ); } else { printf( /* translators: %s: wp-config.php */ - __( 'These unique authentication keys are also missing from your %s file.' ), - 'wp-config.php' +- ); + __('These unique authentication keys are also missing from your %s file.'), + 'wp-config.php' - ); ++ ); } ?> - @@ -137636,10 +137555,12 @@ +printf( /* translators: 1: File name (.htaccess or web.config), 2: File path. */ - __( 'Add the following to your %1$s file in %2$s, replacing other WordPress rules:' ), -+ __('Add the following to your %1$s file in %2$s, replacing other WordPress rules:'), - 'web.config', - '' . $home_path . '' +- 'web.config', +- '' . $home_path . '' - ); ++ __('Add the following to your %1$s file in %2$s, replacing other WordPress rules:'), ++ 'web.config', ++ '' . $home_path . '' +); echo '

    '; if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) { @@ -137653,9 +137574,10 @@ /* translators: %s: File name (wp-config.php, .htaccess or web.config). */ - __( 'Network configuration rules for %s' ), - 'web.config' +- ); + __('Network configuration rules for %s'), + 'web.config' - ); ++ ); ?>

    - @@ -137713,9 +137635,10 @@ /* translators: %s: File name (wp-config.php, .htaccess or web.config). */ - __( 'Network configuration rules for %s' ), - '.htaccess' +- ); + __('Network configuration rules for %s'), + '.htaccess' - ); ++ ); ?>

    - @@ -137774,7 +137697,7 @@ + echo '

    ' . __('The character encoding of your site (UTF-8 is recommended)') . '

    '; } diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php -index 7662076581..f3f0fc0624 100644 +index 7662076581..2b9173d378 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -103,22 +103,22 @@ function plugins_api( $action, $args = array() ) { @@ -137830,10 +137753,9 @@ + array( 'action' => $action, 'request' => $args, -- ), + ), - $url - ); -+ ), + $url +); @@ -137858,18 +137780,18 @@ if ( ! wp_is_json_request() ) { trigger_error( - sprintf( -- /* translators: %s: Support forums URL. */ ++ sprintf( + /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), - headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE -+ sprintf( -+ /* translators: %s: Support forums URL. */ +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') + ) . ' ' . __('(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)'), + headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE - ); ++ ); } - $request = wp_remote_get( $http_url, $http_args ); @@ -137878,18 +137800,22 @@ - if ( is_wp_error( $request ) ) { - $res = new WP_Error( +- 'plugins_api_failed', +- sprintf( + if ( is_wp_error($request) ) { +$res = new WP_Error( - 'plugins_api_failed', - sprintf( ++ 'plugins_api_failed', ++ sprintf( /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) +- ), +- $request->get_error_message() +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') - ), - $request->get_error_message() -- ); ++ ), ++ $request->get_error_message() +); } else { - $res = json_decode( wp_remote_retrieve_body( $request ), true ); @@ -137902,19 +137828,19 @@ $res = new WP_Error( - 'plugins_api_failed', - sprintf( -- /* translators: %s: Support forums URL. */ ++ 'plugins_api_failed', ++ sprintf( + /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ), - wp_remote_retrieve_body( $request ) -+ 'plugins_api_failed', -+ sprintf( -+ /* translators: %s: Support forums URL. */ +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') + ), + wp_remote_retrieve_body($request) - ); ++ ); } - if ( isset( $res->error ) ) { @@ -138006,10 +137932,9 @@ + 'single_text' => __('%s plugin'), /* translators: %s: Number of plugins. */ - 'multiple_text' => __( '%s plugins' ), -- ) -- ); + 'multiple_text' => __('%s plugins'), -+ ) + ) +- ); +); } echo '


    '; @@ -138109,9 +138034,10 @@ +printf( /* translators: %s: URL to "Features as Plugins" page. */ - '

    ' . __( 'You are using a development version of WordPress. These feature plugins are also under development. Learn more.' ) . '

    ', -+ '

    ' . __('You are using a development version of WordPress. These feature plugins are also under development. Learn more.') . '

    ', - 'https://make.wordpress.org/core/handbook/about/release-cycle/features-as-plugins/' +- 'https://make.wordpress.org/core/handbook/about/release-cycle/features-as-plugins/' - ); ++ '

    ' . __('You are using a development version of WordPress. These feature plugins are also under development. Learn more.') . '

    ', ++ 'https://make.wordpress.org/core/handbook/about/release-cycle/features-as-plugins/' +); break; case 'install_plugins_featured': @@ -138121,8 +138047,8 @@ - '

    ' . __( 'Plugins extend and expand the functionality of WordPress. You may install plugins in the WordPress Plugin Directory right from here, or upload a plugin in .zip format by clicking the button at the top of this page.' ) . '

    ', - __( 'https://wordpress.org/plugins/' ) - ); -+ '

    ' . __('Plugins extend and expand the functionality of WordPress. You may install plugins in the WordPress Plugin Directory right from here, or upload a plugin in .zip format by clicking the button at the top of this page.') . '

    ', -+ __('https://wordpress.org/plugins/') ++ '

    ' . __('Plugins extend and expand the functionality of WordPress. You may install plugins in the WordPress Plugin Directory right from here, or upload a plugin in .zip format by clicking the button at the top of this page.') . '

    ', ++ __('https://wordpress.org/plugins/') +); break; case 'install_plugins_recommended': @@ -138242,13 +138168,12 @@ - 'plugin_information', - array( - 'slug' => wp_unslash( $_REQUEST['plugin'] ), -- ) -- ); +$api = plugins_api( + 'plugin_information', + array( -+ 'slug' => wp_unslash($_REQUEST['plugin']), -+ ) ++ 'slug' => wp_unslash($_REQUEST['plugin']), + ) +- ); +); - if ( is_wp_error( $api ) ) { @@ -138355,11 +138280,10 @@ + array( 'tab' => $tab, 'section' => $section_name, -- ) + ) - ); - $href = esc_url( $href ); - $san_section = esc_attr( $section_name ); -+ ) +); + $href = esc_url($href); + $san_section = esc_attr($section_name); @@ -138460,8 +138384,9 @@ +

    $api->rating, 'type' => 'percent', 'number' => $api->num_ratings, @@ -138475,9 +138400,10 @@ /* translators: %s: Number of ratings. */ - _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), - number_format_i18n( $api->num_ratings ) +- ); + _n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), + number_format_i18n($api->num_ratings) - ); ++ ); ?>

    num_ratings ? ( $ratecount / $api->num_ratings ) : 0; $aria_label = esc_attr( - sprintf( -- /* translators: 1: Number of stars (used to determine singular/plural), 2: Number of reviews. */ ++ sprintf( + /* translators: 1: Number of stars (used to determine singular/plural), 2: Number of reviews. */ - _n( - 'Reviews with %1$d star: %2$s. Opens in a new tab.', - 'Reviews with %1$d stars: %2$s. Opens in a new tab.', @@ -138505,8 +138432,7 @@ - $key, - number_format_i18n( $ratecount ) - ) -+ sprintf( -+ /* translators: 1: Number of stars (used to determine singular/plural), 2: Number of reviews. */ +- ); + _n( + 'Reviews with %1$d star: %2$s. Opens in a new tab.', + 'Reviews with %1$d stars: %2$s. Opens in a new tab.', @@ -138515,19 +138441,23 @@ + $key, + number_format_i18n($ratecount) + ) - ); ++ ); ?>
    %s', - "https://wordpress.org/support/plugin/{$api->slug}/reviews/?filter={$key}", - $aria_label, - /* translators: %s: Number of stars. */ +- '%s', +- "https://wordpress.org/support/plugin/{$api->slug}/reviews/?filter={$key}", +- $aria_label, +- /* translators: %s: Number of stars. */ - sprintf( _n( '%d star', '%d stars', $key ), $key ) - ); ++ printf( ++ '%s', ++ "https://wordpress.org/support/plugin/{$api->slug}/reviews/?filter={$key}", ++ $aria_label, ++ /* translators: %s: Number of stars. */ + sprintf(_n('%d star', '%d stars', $key), $key) + ); ?> @@ -138599,8 +138529,8 @@ - ' ' . __( 'Click here to learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) - ) . wp_update_php_annotation( '

    ', '', false ); -+ ' ' . __('Click here to learn more about updating PHP.'), -+ esc_url(wp_get_update_php_url()) ++ ' ' . __('Click here to learn more about updating PHP.'), ++ esc_url(wp_get_update_php_url()) +) . wp_update_php_annotation('

    ', '', false); } else { $compatible_php_notice_message .= '

    '; @@ -138615,9 +138545,8 @@ 'type' => 'error', 'additional_classes' => array( 'notice-alt' ), 'paragraph_wrap' => false, -- ) + ) - ); -+ ) +); } @@ -138630,9 +138559,8 @@ + array( 'type' => 'warning', 'additional_classes' => array( 'notice-alt' ), -- ) + ) - ); -+ ) +); } elseif ( ! $compatible_wp ) { - $compatible_wp_notice_message = __( 'Error: This plugin requires a newer version of WordPress.' ); @@ -138645,8 +138573,8 @@ - ' ' . __( 'Click here to update WordPress.' ), - esc_url( self_admin_url( 'update-core.php' ) ) - ); -+ ' ' . __('Click here to update WordPress.'), -+ esc_url(self_admin_url('update-core.php')) ++ ' ' . __('Click here to update WordPress.'), ++ esc_url(self_admin_url('update-core.php')) +); } @@ -138658,9 +138586,8 @@ + array( 'type' => 'error', 'additional_classes' => array( 'notice-alt' ), -- ) + ) - ); -+ ) +); } @@ -138730,7 +138657,7 @@ } } diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php -index f55bbd80eb..70322e9e64 100644 +index f55bbd80eb..27f00f3d2b 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -88,27 +88,27 @@ function get_plugin_data( $plugin_file, $markup = true, $translate = true ) { @@ -138836,9 +138763,10 @@ +$plugin_data['Description'] .= sprintf( /* translators: %s: Plugin author. */ - ' ' . __( 'By %s.' ) . '', -+ ' ' . __('By %s.') . '', - $plugin_data['Author'] +- $plugin_data['Author'] - ); ++ ' ' . __('By %s.') . '', ++ $plugin_data['Author'] +); } } @@ -140735,25 +140663,32 @@ +$explanation = sprintf( /* translators: 1: Name of deactivated plugin, 2: Plugin version deactivated, 3: Current WP version, 4: Compatible plugin version. */ - __( '%1$s %2$s was deactivated due to incompatibility with WordPress %3$s, please upgrade to %1$s %4$s or later.' ), -+ __('%1$s %2$s was deactivated due to incompatibility with WordPress %3$s, please upgrade to %1$s %4$s or later.'), - $plugin['plugin_name'], - $plugin['version_deactivated'], - $GLOBALS['wp_version'], - $plugin['version_compatible'] -- ); +- $plugin['plugin_name'], +- $plugin['version_deactivated'], +- $GLOBALS['wp_version'], +- $plugin['version_compatible'] +- ); ++ __('%1$s %2$s was deactivated due to incompatibility with WordPress %3$s, please upgrade to %1$s %4$s or later.'), ++ $plugin['plugin_name'], ++ $plugin['version_deactivated'], ++ $GLOBALS['wp_version'], ++ $plugin['version_compatible'] +); } else { - $explanation = sprintf( +$explanation = sprintf( /* translators: 1: Name of deactivated plugin, 2: Plugin version deactivated, 3: Current WP version. */ - __( '%1$s %2$s was deactivated due to incompatibility with WordPress %3$s.' ), -+ __('%1$s %2$s was deactivated due to incompatibility with WordPress %3$s.'), - $plugin['plugin_name'], +- $plugin['plugin_name'], - ! empty( $plugin['version_deactivated'] ) ? $plugin['version_deactivated'] : '', -+ ! empty($plugin['version_deactivated']) ? $plugin['version_deactivated'] : '', - $GLOBALS['wp_version'], - $plugin['version_compatible'] +- $GLOBALS['wp_version'], +- $plugin['version_compatible'] - ); ++ __('%1$s %2$s was deactivated due to incompatibility with WordPress %3$s.'), ++ $plugin['plugin_name'], ++ ! empty($plugin['version_deactivated']) ? $plugin['version_deactivated'] : '', ++ $GLOBALS['wp_version'], ++ $plugin['version_compatible'] +); } @@ -140791,7 +140726,7 @@ } } diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php -index c93ac71bec..ff7749d11c 100644 +index c93ac71bec..2c37484e7d 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -20,7 +20,7 @@ @@ -141123,10 +141058,9 @@ + array( 'order' => 'ASC', 'posts_per_page' => 1, -- ) + ) - ); - $revision = current( $revisions ); -+ ) +); + $revision = current($revisions); @@ -141646,14 +141580,13 @@ + 'post_title' => __('Auto Draft'), 'post_type' => $post_type, 'post_status' => 'auto-draft', -- ), + ), - false, - false - ); - $post = get_post( $post_id ); - if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) { - set_post_format( $post, get_option( 'default_post_format' ) ); -+ ), + false, + false +); @@ -142500,16 +142433,19 @@ - if ( ! empty( $thumbnail_html ) ) { - $content = sprintf( -+ if ( ! empty($thumbnail_html) ) { -+$content = sprintf( - $set_thumbnail_link, +- $set_thumbnail_link, - esc_url( $upload_iframe_src ), -+ esc_url($upload_iframe_src), - ' aria-describedby="set-post-thumbnail-desc"', - $thumbnail_html +- ' aria-describedby="set-post-thumbnail-desc"', +- $thumbnail_html - ); - $content .= '

    ' . __( 'Click the image to edit or update' ) . '

    '; - $content .= '

    ' . esc_html( $post_type_object->labels->remove_featured_image ) . '

    '; ++ if ( ! empty($thumbnail_html) ) { ++$content = sprintf( ++ $set_thumbnail_link, ++ esc_url($upload_iframe_src), ++ ' aria-describedby="set-post-thumbnail-desc"', ++ $thumbnail_html +); + $content .= '

    ' . __('Click the image to edit or update') . '

    '; + $content .= '

    ' . esc_html($post_type_object->labels->remove_featured_image) . '

    '; @@ -143057,9 +142993,8 @@ 'name' => $term, 'fields' => 'ids', 'hide_empty' => false, -- ) + ) - ); -+ ) +); - if ( ! empty( $_term ) ) { @@ -143303,7 +143238,7 @@ + add_post_type_support($post_type, 'editor'); } diff --git a/wp-admin/includes/privacy-tools.php b/wp-admin/includes/privacy-tools.php -index c5d7c9a97f..a129e4ec03 100644 +index c5d7c9a97f..130f226103 100644 --- a/wp-admin/includes/privacy-tools.php +++ b/wp-admin/includes/privacy-tools.php @@ -16,19 +16,19 @@ @@ -143351,15 +143286,12 @@ - $result = wp_update_post( - array( -- 'ID' => $request_id, -- 'post_status' => 'request-completed', -- ) -- ); +$result = wp_update_post( + array( -+ 'ID' => $request_id, -+ 'post_status' => 'request-completed', -+ ) + 'ID' => $request_id, + 'post_status' => 'request-completed', + ) +- ); +); return $result; @@ -143370,33 +143302,42 @@ function _wp_personal_data_handle_actions() { - if ( isset( $_POST['privacy_action_email_retry'] ) ) { - check_admin_referer( 'bulk-privacy_requests' ); -+ if ( isset($_POST['privacy_action_email_retry']) ) { -+ check_admin_referer('bulk-privacy_requests'); - +- - $request_id = absint( current( array_keys( (array) wp_unslash( $_POST['privacy_action_email_retry'] ) ) ) ); - $result = _wp_privacy_resend_request( $request_id ); -+ $request_id = absint(current(array_keys((array) wp_unslash($_POST['privacy_action_email_retry'])))); -+ $result = _wp_privacy_resend_request($request_id); - +- - if ( is_wp_error( $result ) ) { - add_settings_error( +- 'privacy_action_email_retry', +- 'privacy_action_email_retry', +- $result->get_error_message(), +- 'error' +- ); ++ if ( isset($_POST['privacy_action_email_retry']) ) { ++ check_admin_referer('bulk-privacy_requests'); ++ ++ $request_id = absint(current(array_keys((array) wp_unslash($_POST['privacy_action_email_retry'])))); ++ $result = _wp_privacy_resend_request($request_id); ++ + if ( is_wp_error($result) ) { +add_settings_error( - 'privacy_action_email_retry', - 'privacy_action_email_retry', - $result->get_error_message(), - 'error' -- ); ++ 'privacy_action_email_retry', ++ 'privacy_action_email_retry', ++ $result->get_error_message(), ++ 'error' +); } else { - add_settings_error( -+add_settings_error( - 'privacy_action_email_retry', - 'privacy_action_email_retry', +- 'privacy_action_email_retry', +- 'privacy_action_email_retry', - __( 'Confirmation request sent again successfully.' ), -+ __('Confirmation request sent again successfully.'), - 'success' +- 'success' - ); ++add_settings_error( ++ 'privacy_action_email_retry', ++ 'privacy_action_email_retry', ++ __('Confirmation request sent again successfully.'), ++ 'success' +); } - } elseif ( isset( $_POST['action'] ) ) { @@ -143538,37 +143479,25 @@ break; } } -@@ -194,33 +194,33 @@ function _wp_personal_data_handle_actions() { +@@ -194,10 +194,10 @@ function _wp_personal_data_handle_actions() { */ function _wp_personal_data_cleanup_requests() { /** This filter is documented in wp-includes/user.php */ - $expires = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS ); -- ++ $expires = (int) apply_filters('user_request_key_expiration', DAY_IN_SECONDS); + - $requests_query = new WP_Query( - array( -- 'post_type' => 'user_request', -- 'posts_per_page' => -1, -- 'post_status' => 'request-pending', -- 'fields' => 'ids', -- 'date_query' => array( -+ $expires = (int) apply_filters('user_request_key_expiration', DAY_IN_SECONDS); -+ +$requests_query = new WP_Query( + array( -+ 'post_type' => 'user_request', -+ 'posts_per_page' => -1, -+ 'post_status' => 'request-pending', -+ 'fields' => 'ids', -+ 'date_query' => array( - array( - 'column' => 'post_modified_gmt', - 'before' => $expires . ' seconds ago', + 'post_type' => 'user_request', + 'posts_per_page' => -1, + 'post_status' => 'request-pending', +@@ -209,18 +209,18 @@ function _wp_personal_data_cleanup_requests() { ), -- ), -- ) + ), + ) - ); -+ ), -+ ) +); $request_ids = $requests_query->posts; @@ -143581,9 +143510,8 @@ 'ID' => $request_id, 'post_status' => 'request-failed', 'post_password' => '', -- ) + ) - ); -+ ) +); } } @@ -143772,13 +143700,16 @@ } else { if ( false !== $groups ) { - _doing_it_wrong( -+_doing_it_wrong( - __FUNCTION__, - /* translators: %s: Post meta key. */ +- __FUNCTION__, +- /* translators: %s: Post meta key. */ - sprintf( __( 'The %s post meta must be an array.' ), '_export_data_grouped' ), -+ sprintf(__('The %s post meta must be an array.'), '_export_data_grouped'), - '5.8.0' +- '5.8.0' - ); ++_doing_it_wrong( ++ __FUNCTION__, ++ /* translators: %s: Post meta key. */ ++ sprintf(__('The %s post meta must be an array.'), '_export_data_grouped'), ++ '5.8.0' +); } @@ -144332,7 +144263,7 @@ return $response; } diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php -index 8ed45fd193..c7405b11cd 100644 +index 8ed45fd193..c77f0e8f0c 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -19,13 +19,13 @@ @@ -144460,16 +144391,13 @@ - $revisions = wp_get_post_revisions( - $post->ID, - array( -- 'order' => 'ASC', -- 'check_enabled' => false, -- ) -- ); +$revisions = wp_get_post_revisions( + $post->ID, + array( -+ 'order' => 'ASC', -+ 'check_enabled' => false, -+ ) + 'order' => 'ASC', + 'check_enabled' => false, + ) +- ); +); // If revisions are disabled, we only want autosaves and the current post. - if ( ! wp_revisions_enabled( $post ) ) { @@ -144501,28 +144429,29 @@ + $modified_gmt = strtotime($revision->post_modified_gmt . ' +0000'); if ( $can_restore ) { - $restore_link = str_replace( -+$restore_link = str_replace( - '&', - '&', - wp_nonce_url( +- '&', +- '&', +- wp_nonce_url( - add_query_arg( - array( -- 'revision' => $revision->ID, -- 'action' => 'restore', -- ), ++$restore_link = str_replace( ++ '&', ++ '&', ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'revision' => $revision->ID, + 'action' => 'restore', + ), - admin_url( 'revision.php' ) - ), - "restore-post_{$revision->ID}" -+ add_query_arg( -+ array( -+ 'revision' => $revision->ID, -+ 'action' => 'restore', -+ ), +- ) +- ); + admin_url('revision.php') + ), + "restore-post_{$revision->ID}" - ) -- ); ++ ) +); } @@ -144764,7 +144693,7 @@ <# _.each( data.fields, function( field ) { #>

    {{ field.name }}

    diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php -index d339af3b17..9917041176 100644 +index d339af3b17..52ba5eb2dd 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -39,11 +39,11 @@ function wp_get_db_schema( $scope = 'all', $blog_id = null ) { @@ -145353,9 +145282,8 @@ + array( 'domain' => $domain, 'path' => $path, -- ) + ) - ); -+ ) +); $network_id = $wpdb->insert_id; } else { @@ -145368,27 +145296,22 @@ 'domain' => $domain, 'path' => $path, 'id' => $network_id, -- ) + ) - ); -+ ) +); } - populate_network_meta( - $network_id, - array( -- 'admin_email' => $email, -- 'site_name' => $site_name, -- 'subdomain_install' => $subdomain_install, -- ) -- ); +populate_network_meta( + $network_id, + array( -+ 'admin_email' => $email, -+ 'site_name' => $site_name, -+ 'subdomain_install' => $subdomain_install, -+ ) + 'admin_email' => $email, + 'site_name' => $site_name, + 'subdomain_install' => $subdomain_install, + ) +- ); +); /* @@ -145410,10 +145333,9 @@ 'domain' => $domain, 'path' => $path, - 'registered' => current_time( 'mysql' ), -- ) -- ); + 'registered' => current_time('mysql'), -+ ) + ) +- ); +); $current_site->blog_id = $wpdb->insert_id; @@ -145449,9 +145371,8 @@ 'site_id' => $network_id, 'meta_key' => 'main_site', 'meta_value' => $current_site->blog_id, -- ) + ) - ); -+ ) +); if ( $subdomain_install ) { @@ -145477,10 +145398,9 @@ + array( 'timeout' => 5, 'httpversion' => '1.1', -- ) + ) - ); - if ( is_wp_error( $page ) ) { -+ ) +); + if ( is_wp_error($page) ) { $errstr = $page->get_error_message(); @@ -145497,10 +145417,11 @@ +$msg .= '

    ' . sprintf( /* translators: %s: Host name. */ - __( 'The installer attempted to contact a random hostname (%s) on your domain.' ), -+ __('The installer attempted to contact a random hostname (%s) on your domain.'), - '' . $hostname . '' +- '' . $hostname . '' - ); - if ( ! empty( $errstr ) ) { ++ __('The installer attempted to contact a random hostname (%s) on your domain.'), ++ '' . $hostname . '' +); + if ( ! empty($errstr) ) { /* translators: %s: Error message. */ @@ -145513,9 +145434,10 @@ +$msg .= '

    ' . sprintf( /* translators: %s: Asterisk symbol (*). */ - __( 'To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a %s hostname record pointing at your web server in your DNS configuration tool.' ), -+ __('To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a %s hostname record pointing at your web server in your DNS configuration tool.'), - '*' +- '*' - ) . '

    '; ++ __('To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a %s hostname record pointing at your web server in your DNS configuration tool.'), ++ '*' +) . '

    '; - $msg .= '

    ' . __( 'You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.' ) . '

    '; @@ -145583,9 +145505,8 @@ + array( 'fields' => array( 'user_login' ), 'role' => 'administrator', -- ) + ) - ); -+ ) +); if ( $users ) { foreach ( $users as $user ) { @@ -145731,7 +145652,7 @@ wp_cache_set_sites_last_changed(); } diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php -index bf5aefcca0..0719ed1408 100644 +index bf5aefcca0..74a3ac2fae 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -17,11 +17,11 @@ @@ -145820,7 +145741,7 @@ continue; } -@@ -124,17 +124,17 @@ function meta_box_prefs( $screen ) { +@@ -124,18 +124,18 @@ function meta_box_prefs( $screen ) { $widget_title = $box['title']; @@ -145837,13 +145758,15 @@ - esc_attr( $box['id'] ), - checked( $is_hidden, false, false ), - $widget_title +- ); + '', + esc_attr($box['id']), + checked($is_hidden, false, false), + $widget_title - ); ++ ); } } + } @@ -150,20 +150,20 @@ function meta_box_prefs( $screen ) { * @return string[] IDs of hidden meta boxes. */ @@ -145914,7 +145837,7 @@ + WP_Screen::get($hook_name)->set_current_screen(); } diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php -index 7765084fa7..485449551e 100644 +index 7765084fa7..be6e9bdb1c 100644 --- a/wp-admin/includes/taxonomy.php +++ b/wp-admin/includes/taxonomy.php @@ -22,8 +22,8 @@ @@ -145951,15 +145874,12 @@ - return wp_insert_category( - array( -- 'cat_name' => $cat_name, -- 'category_parent' => $category_parent, -- ) -- ); +return wp_insert_category( + array( -+ 'cat_name' => $cat_name, -+ 'category_parent' => $category_parent, -+ ) + 'cat_name' => $cat_name, + 'category_parent' => $category_parent, + ) +- ); +); } @@ -146149,34 +146069,27 @@ + return wp_insert_term($tag_name, $taxonomy); } diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php -index 90b375e882..b37d7e5939 100644 +index 90b375e882..b7ce8a1c32 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php -@@ -38,17 +38,17 @@ require_once ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php'; +@@ -38,9 +38,9 @@ require_once ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php'; * the top of the list. Default true. */ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { - wp_terms_checklist( - $post_id, - array( -- 'taxonomy' => 'category', -- 'descendants_and_self' => $descendants_and_self, -- 'selected_cats' => $selected_cats, -- 'popular_cats' => $popular_cats, -- 'walker' => $walker, -- 'checked_ontop' => $checked_ontop, -- ) -- ); +wp_terms_checklist( + $post_id, + array( -+ 'taxonomy' => 'category', -+ 'descendants_and_self' => $descendants_and_self, -+ 'selected_cats' => $selected_cats, -+ 'popular_cats' => $popular_cats, -+ 'walker' => $walker, -+ 'checked_ontop' => $checked_ontop, -+ ) + 'taxonomy' => 'category', + 'descendants_and_self' => $descendants_and_self, + 'selected_cats' => $selected_cats, +@@ -48,7 +48,7 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select + 'walker' => $walker, + 'checked_ontop' => $checked_ontop, + ) +- ); +); } @@ -146196,7 +146109,7 @@ $walker = new Walker_Category_Checklist(); } else { $walker = $parsed_args['walker']; -@@ -114,52 +114,52 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) { +@@ -114,24 +114,24 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) { $args = array( 'taxonomy' => $taxonomy ); @@ -146231,12 +146144,11 @@ 'taxonomy' => $taxonomy, 'fields' => 'ids', 'orderby' => 'count', - 'order' => 'DESC', +@@ -139,27 +139,27 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) { 'number' => 10, 'hierarchical' => false, -- ) + ) - ); -+ ) +); } @@ -146249,11 +146161,10 @@ 'child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0, -- ) + ) - ); - $self = get_term( $descendants_and_self, $taxonomy ); - array_unshift( $categories, $self ); -+ ) +); + $self = get_term($descendants_and_self, $taxonomy); + array_unshift($categories, $self); @@ -146264,9 +146175,8 @@ + array( 'taxonomy' => $taxonomy, 'get' => 'all', -- ) + ) - ); -+ ) +); } @@ -146309,21 +146219,15 @@ - $terms = get_terms( - array( -- 'taxonomy' => $taxonomy, -- 'orderby' => 'count', -- 'order' => 'DESC', -- 'number' => $number, -- 'hierarchical' => false, -- ) -- ); +$terms = get_terms( + array( -+ 'taxonomy' => $taxonomy, -+ 'orderby' => 'count', -+ 'order' => 'DESC', -+ 'number' => $number, -+ 'hierarchical' => false, -+ ) + 'taxonomy' => $taxonomy, + 'orderby' => 'count', + 'order' => 'DESC', + 'number' => $number, + 'hierarchical' => false, + ) +- ); +); - $tax = get_taxonomy( $taxonomy ); @@ -146367,17 +146271,13 @@ - $categories = get_terms( - array( -- 'taxonomy' => 'link_category', -- 'orderby' => 'name', -- 'hide_empty' => 0, -- ) -- ); +$categories = get_terms( + array( -+ 'taxonomy' => 'link_category', -+ 'orderby' => 'name', -+ 'hide_empty' => 0, -+ ) + 'taxonomy' => 'link_category', + 'orderby' => 'name', + 'hide_empty' => 0, + ) +- ); +); - if ( empty( $categories ) ) { @@ -146522,23 +146422,18 @@ - 'wp_comment_reply', - '', - array( -- 'position' => $position, -- 'checkbox' => $checkbox, -- 'mode' => $mode, -- ) -- ); -- -- if ( ! empty( $content ) ) { +$content = apply_filters( + 'wp_comment_reply', + '', + array( -+ 'position' => $position, -+ 'checkbox' => $checkbox, -+ 'mode' => $mode, -+ ) + 'position' => $position, + 'checkbox' => $checkbox, + 'mode' => $mode, + ) +- ); +); -+ + +- if ( ! empty( $content ) ) { + if ( ! empty($content) ) { echo $content; return; @@ -146580,19 +146475,15 @@ - '', - 'replycontent', - array( -- 'media_buttons' => false, -- 'tinymce' => false, -- 'quicktags' => $quicktags_settings, -- ) -- ); +wp_editor( + '', + 'replycontent', + array( -+ 'media_buttons' => false, -+ 'tinymce' => false, -+ 'quicktags' => $quicktags_settings, -+ ) + 'media_buttons' => false, + 'tinymce' => false, + 'quicktags' => $quicktags_settings, + ) +- ); +); ?>
    @@ -146641,9 +146532,8 @@ 'type' => 'error', 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), 'paragraph_wrap' => false, -- ) + ) - ); -+ ) +); ?> @@ -146887,19 +146777,16 @@ - 'addmeta', - false, - array( -- 'id' => 'newmeta-submit', -- 'data-wp-lists' => 'add:the-list:newmeta', -- ) -- ); +submit_button( + __('Add Custom Field'), + '', + 'addmeta', + false, + array( -+ 'id' => 'newmeta-submit', -+ 'data-wp-lists' => 'add:the-list:newmeta', -+ ) + 'id' => 'newmeta-submit', + 'data-wp-lists' => 'add:the-list:newmeta', + ) +- ); +); ?> @@ -147100,9 +146987,8 @@ + array( 'additional_classes' => array( 'error' ), 'paragraph_wrap' => false, -- ) + ) - ); -+ ) +); else : ?> @@ -147120,7 +147006,7 @@ + ' (%s)', + __('Choose a file from your computer:'), + /* translators: %s: Maximum allowed file size. */ -+ sprintf(__('Maximum size: %s'), $size) ++ sprintf(__('Maximum size: %s'), $size) +); ?> @@ -147237,12 +147123,13 @@ - if ( current_user_can( 'install_plugins' ) ) { - $install_url = wp_nonce_url( - self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ), +- 'save_wporg_username_' . get_current_user_id() +- ); + if ( empty($plugins['classic-editor/classic-editor.php']) ) { + if ( current_user_can('install_plugins') ) { +$install_url = wp_nonce_url( -+ self_admin_url('plugin-install.php?tab=favorites&user=wordpressdotorg&save=0'), - 'save_wporg_username_' . get_current_user_id() -- ); ++ self_admin_url('plugin-install.php?tab=favorites&user=wordpressdotorg&save=0'), ++ 'save_wporg_username_' . get_current_user_id() +); echo '

    '; @@ -147255,12 +147142,13 @@ - if ( current_user_can( 'activate_plugins' ) ) { - $activate_url = wp_nonce_url( - self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php' ), +- 'activate-plugin_classic-editor/classic-editor.php' +- ); + } elseif ( is_plugin_inactive('classic-editor/classic-editor.php') ) { + if ( current_user_can('activate_plugins') ) { +$activate_url = wp_nonce_url( -+ self_admin_url('plugins.php?action=activate&plugin=classic-editor/classic-editor.php'), - 'activate-plugin_classic-editor/classic-editor.php' -- ); ++ self_admin_url('plugins.php?action=activate&plugin=classic-editor/classic-editor.php'), ++ 'activate-plugin_classic-editor/classic-editor.php' +); echo '

    '; @@ -147276,10 +147164,9 @@ + array( 'classic-editor' => '', 'classic-editor__forget' => '', -- ), + ), - get_edit_post_link( $data_object ) - ); -+ ), + get_edit_post_link($data_object) +); echo '

    '; @@ -147506,14 +147393,17 @@ + $meta_box_not_compatible_message = sprintf( /* translators: %s: The name of the plugin that generated this meta box. */ - __( 'This meta box, from the %s plugin, is not compatible with the block editor.' ), -+ __('This meta box, from the %s plugin, is not compatible with the block editor.'), - "{$plugin['Name']}" +- "{$plugin['Name']}" - ); - wp_admin_notice( +- $meta_box_not_compatible_message, +- array( ++ __('This meta box, from the %s plugin, is not compatible with the block editor.'), ++ "{$plugin['Name']}" + ); + wp_admin_notice( - $meta_box_not_compatible_message, - array( ++ $meta_box_not_compatible_message, ++ array( 'additional_classes' => array( 'error', 'inline' ), ) - ); @@ -148426,20 +148316,15 @@ - wp_admin_notice( - $local_storage_message, - array( -- 'id' => 'local-storage-notice', -- 'additional_classes' => array( 'hidden' ), -- 'dismissible' => true, -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $local_storage_message, + array( -+ 'id' => 'local-storage-notice', -+ 'additional_classes' => array( 'hidden' ), -+ 'dismissible' => true, -+ 'paragraph_wrap' => false, -+ ) + 'id' => 'local-storage-notice', + 'additional_classes' => array( 'hidden' ), + 'dismissible' => true, + 'paragraph_wrap' => false, + ) +- ); +); } @@ -148498,16 +148383,13 @@ - wp_admin_notice( - __( 'You are currently editing the page that shows your latest posts.' ), - array( -- 'type' => 'warning', -- 'additional_classes' => array( 'inline' ), -- ) -- ); +wp_admin_notice( + __('You are currently editing the page that shows your latest posts.'), + array( -+ 'type' => 'warning', -+ 'additional_classes' => array( 'inline' ), -+ ) + 'type' => 'warning', + 'additional_classes' => array( 'inline' ), + ) +- ); +); } @@ -148751,7 +148633,7 @@ exit; } diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php -index 91e92995ec..a53755b658 100644 +index 91e92995ec..8673b86edc 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -21,20 +21,20 @@ @@ -148857,7 +148739,7 @@ +return new WP_Error( + 'could_not_remove_theme', + /* translators: %s: Theme name. */ -+ sprintf(__('Could not fully remove the theme %s.'), $stylesheet) ++ sprintf(__('Could not fully remove the theme %s.'), $stylesheet) +); } @@ -148942,7 +148824,7 @@ } if ( ! ( $theme instanceof WP_Theme ) ) { -@@ -208,65 +208,65 @@ function get_theme_update_available( $theme ) { +@@ -208,66 +208,66 @@ function get_theme_update_available( $theme ) { $html = ''; @@ -148958,11 +148840,10 @@ 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800, -- ), + ), - $update['url'] - ); // Theme browser inside WP? Replace this. Also, theme preview JS will override this on the available list. - $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet ); -+ ), + $update['url'] +); // Theme browser inside WP? Replace this. Also, theme preview JS will override this on the available list. + $update_url = wp_nonce_url(admin_url('update.php?action=upgrade-theme&theme=' . urlencode($stylesheet)), 'upgrade-theme_' . $stylesheet); @@ -148981,17 +148862,18 @@ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ) - ), - $update['new_version'] +- ); +- } elseif ( empty( $update['package'] ) ) { + '

    ' . __('There is a new version of %1$s available. View version %4$s details.') . '

    ', + $theme_name, + esc_url($details_url), + sprintf( + 'class="thickbox open-plugin-details-modal" aria-label="%s"', + /* translators: 1: Theme name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $update['new_version'])) ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $update['new_version'])) + ), + $update['new_version'] - ); -- } elseif ( empty( $update['package'] ) ) { ++ ); + } elseif ( empty($update['package']) ) { $html = sprintf( /* translators: 1: Theme name, 2: Theme details URL, 3: Additional link attributes, 4: Version number. */ @@ -149004,16 +148886,17 @@ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme_name, $update['new_version'] ) ) - ), - $update['new_version'] +- ); + '

    ' . __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.') . '

    ', + $theme_name, + esc_url($details_url), + sprintf( + 'class="thickbox open-plugin-details-modal" aria-label="%s"', + /* translators: 1: Theme name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $update['new_version'])) ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $update['new_version'])) + ), + $update['new_version'] - ); ++ ); } else { $html = sprintf( /* translators: 1: Theme name, 2: Theme details URL, 3: Additional link attributes, 4: Version number, 5: Update URL, 6: Additional link attributes. */ @@ -149033,25 +148916,27 @@ - esc_attr( sprintf( _x( 'Update %s now', 'theme' ), $theme_name ) ), - $stylesheet - ) +- ); + '

    ' . __('There is a new version of %1$s available. View version %4$s details or update now.') . '

    ', + $theme_name, + esc_url($details_url), + sprintf( + 'class="thickbox open-plugin-details-modal" aria-label="%s"', + /* translators: 1: Theme name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $update['new_version'])) ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $update['new_version'])) + ), + $update['new_version'], + $update_url, + sprintf( + 'aria-label="%s" id="update-theme" data-slug="%s"', + /* translators: %s: Theme name. */ -+ esc_attr(sprintf(_x('Update %s now', 'theme'), $theme_name)), ++ esc_attr(sprintf(_x('Update %s now', 'theme'), $theme_name)), + $stylesheet + ) - ); ++ ); } } + } @@ -314,64 +314,64 @@ function get_theme_feature_list( $api = true ) { // Hard-coded list is used if API is not accessible. $features = array( @@ -149245,10 +149130,9 @@ + array( 'action' => $action, 'request' => $args, -- ), + ), - $url - ); -+ ), + $url +); @@ -149273,18 +149157,18 @@ if ( ! wp_doing_ajax() ) { trigger_error( - sprintf( -- /* translators: %s: Support forums URL. */ ++ sprintf( + /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), - headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE -+ sprintf( -+ /* translators: %s: Support forums URL. */ +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') + ) . ' ' . __('(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)'), + headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE - ); ++ ); } - $request = wp_remote_get( $http_url, $http_args ); + $request = wp_remote_get($http_url, $http_args); @@ -149292,18 +149176,22 @@ - if ( is_wp_error( $request ) ) { - $res = new WP_Error( +- 'themes_api_failed', +- sprintf( + if ( is_wp_error($request) ) { +$res = new WP_Error( - 'themes_api_failed', - sprintf( ++ 'themes_api_failed', ++ sprintf( /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) +- ), +- $request->get_error_message() +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') - ), - $request->get_error_message() -- ); ++ ), ++ $request->get_error_message() +); } else { - $res = json_decode( wp_remote_retrieve_body( $request ), true ); @@ -149316,19 +149204,19 @@ $res = new WP_Error( - 'themes_api_failed', - sprintf( -- /* translators: %s: Support forums URL. */ ++ 'themes_api_failed', ++ sprintf( + /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ), - wp_remote_retrieve_body( $request ) -+ 'themes_api_failed', -+ sprintf( -+ /* translators: %s: Support forums URL. */ +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') + ), + wp_remote_retrieve_body($request) - ); ++ ); } - if ( isset( $res->error ) ) { @@ -149434,14 +149322,16 @@ } if ( null !== $customize_action ) { - $customize_action = add_query_arg( -+$customize_action = add_query_arg( - array( +- array( - 'return' => urlencode( sanitize_url( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ), ++$customize_action = add_query_arg( ++ array( + 'return' => urlencode(sanitize_url(remove_query_arg(wp_removable_query_args(), wp_unslash($_SERVER['REQUEST_URI'])))), ), - $customize_action +- $customize_action - ); - $customize_action = esc_url( $customize_action ); ++ $customize_action +); + $customize_action = esc_url($customize_action); } @@ -149602,7 +149492,7 @@ ?> -@@ -881,11 +881,11 @@ function customize_themes_print_templates() { +@@ -881,12 +881,12 @@ function customize_themes_print_templates() { %2$s', + /* translators: %s: Number of ratings. */ -+ sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'), ++ sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'), + /* translators: Hidden accessibility text. */ -+ __('(opens in a new tab)') - ); ++ __('(opens in a new tab)') ++ ); ?> + @@ -895,72 +895,72 @@ function customize_themes_print_templates() { <# if ( data.hasUpdate ) { #> <# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #> @@ -149655,9 +149547,9 @@ - wp_update_php_annotation( '

    ', '' ); - } elseif ( current_user_can( 'update_core' ) ) { - printf( -+ ' ' . __('Please update WordPress, and then learn more about updating PHP.'), -+ self_admin_url('update-core.php'), -+ esc_url(wp_get_update_php_url()) ++ ' ' . __('Please update WordPress, and then learn more about updating PHP.'), ++ self_admin_url('update-core.php'), ++ esc_url(wp_get_update_php_url()) + ); + wp_update_php_annotation('

    ', ''); + } elseif ( current_user_can('update_core') ) { @@ -149668,8 +149560,8 @@ - ); - } elseif ( current_user_can( 'update_php' ) ) { - printf( -+ ' ' . __('Please update WordPress.'), -+ self_admin_url('update-core.php') ++ ' ' . __('Please update WordPress.'), ++ self_admin_url('update-core.php') + ); + } elseif ( current_user_can('update_php') ) { + printf( @@ -149678,8 +149570,8 @@ - esc_url( wp_get_update_php_url() ) - ); - wp_update_php_annotation( '

    ', '' ); -+ ' ' . __('Learn more about updating PHP.'), -+ esc_url(wp_get_update_php_url()) ++ ' ' . __('Learn more about updating PHP.'), ++ esc_url(wp_get_update_php_url()) + ); + wp_update_php_annotation('

    ', ''); } @@ -149703,8 +149595,8 @@ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) - ); -+ ' ' . __('Please update WordPress.'), -+ self_admin_url('update-core.php') ++ ' ' . __('Please update WordPress.'), ++ self_admin_url('update-core.php') + ); } ?> @@ -149728,8 +149620,8 @@ - esc_url( wp_get_update_php_url() ) - ); - wp_update_php_annotation( '

    ', '' ); -+ ' ' . __('Learn more about updating PHP.'), -+ esc_url(wp_get_update_php_url()) ++ ' ' . __('Learn more about updating PHP.'), ++ esc_url(wp_get_update_php_url()) + ); + wp_update_php_annotation('

    ', ''); } @@ -149743,9 +149635,10 @@ + printf( /* translators: %s: Theme name. */ - __( 'This is a child theme of %s.' ), -+ __('This is a child theme of %s.'), - '{{{ data.parent }}}' +- '{{{ data.parent }}}' - ); ++ __('This is a child theme of %s.'), ++ '{{{ data.parent }}}' + ); ?>

    @@ -149847,9 +149740,10 @@ + printf( /* translators: %s: URL to the themes page (also it activates the theme). */ - ' ' . __( 'However, you can still activate this theme, and use the Site Editor to customize it.' ), -+ ' ' . __('However, you can still activate this theme, and use the Site Editor to customize it.'), - '{{{ data.actions.activate }}}' +- '{{{ data.actions.activate }}}' - ); ++ ' ' . __('However, you can still activate this theme, and use the Site Editor to customize it.'), ++ '{{{ data.actions.activate }}}' + ); ?> <# } #> @@ -149970,17 +149864,19 @@ - if ( ! empty( $functions_path ) ) { - wp_redirect( -+ if ( ! empty($functions_path) ) { -+wp_redirect( - add_query_arg( +- add_query_arg( - '_error_nonce', - wp_create_nonce( 'theme-resume-error_' . $theme ), - $redirect +- ) +- ); ++ if ( ! empty($functions_path) ) { ++wp_redirect( ++ add_query_arg( + '_error_nonce', + wp_create_nonce('theme-resume-error_' . $theme), + $redirect - ) -- ); ++ ) +); // Load the theme's functions.php to test whether it throws a fatal error. @@ -150034,10 +149930,6 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'error', -- 'paragraph_wrap' => false, -- ) -- ); +$message = sprintf( + '

    %s
    %s

    %s

    ', + __('One or more themes failed to load properly.'), @@ -150048,13 +149940,14 @@ +wp_admin_notice( + $message, + array( -+ 'type' => 'error', -+ 'paragraph_wrap' => false, -+ ) + 'type' => 'error', + 'paragraph_wrap' => false, + ) +- ); +); } diff --git a/wp-admin/includes/translation-install.php b/wp-admin/includes/translation-install.php -index 01c61bbb7b..a18a4eb291 100644 +index 01c61bbb7b..10f6798ab7 100644 --- a/wp-admin/includes/translation-install.php +++ b/wp-admin/includes/translation-install.php @@ -20,8 +20,8 @@ function translations_api( $type, $args = null ) { @@ -150086,7 +149979,7 @@ } $options = array( -@@ -56,42 +56,42 @@ function translations_api( $type, $args = null ) { +@@ -56,43 +56,43 @@ function translations_api( $type, $args = null ) { $options['body']['slug'] = $args['slug']; // Plugin or theme slug. } @@ -150095,18 +149988,20 @@ - if ( $ssl && is_wp_error( $request ) ) { - trigger_error( +- sprintf( + if ( $ssl && is_wp_error($request) ) { +trigger_error( - sprintf( ++ sprintf( /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), +- headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') -+ ) . ' ' . __('(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)'), - headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE -- ); ++ ) . ' ' . __('(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)'), ++ headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE +); - $request = wp_remote_post( $http_url, $options ); @@ -150115,18 +150010,22 @@ - if ( is_wp_error( $request ) ) { - $res = new WP_Error( +- 'translations_api_failed', +- sprintf( + if ( is_wp_error($request) ) { +$res = new WP_Error( - 'translations_api_failed', - sprintf( ++ 'translations_api_failed', ++ sprintf( /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) +- ), +- $request->get_error_message() +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') - ), - $request->get_error_message() -- ); ++ ), ++ $request->get_error_message() +); } else { - $res = json_decode( wp_remote_retrieve_body( $request ), true ); @@ -150136,21 +150035,22 @@ $res = new WP_Error( - 'translations_api_failed', - sprintf( -- /* translators: %s: Support forums URL. */ ++ 'translations_api_failed', ++ sprintf( + /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ), - wp_remote_retrieve_body( $request ) -+ 'translations_api_failed', -+ sprintf( -+ /* translators: %s: Support forums URL. */ +- ); + __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), + __('https://wordpress.org/support/forums/') + ), + wp_remote_retrieve_body($request) - ); ++ ); } } + } @@ -106,7 +106,7 @@ function translations_api( $type, $args = null ) { * @param string $type The type of translations being requested. * @param object $args Translation API arguments. @@ -150202,8 +150102,7 @@ + if ( isset($languages[ $wp_local_package ]) ) { $language = $languages[ $wp_local_package ]; - printf( -+printf( - '' . "\n", +- '' . "\n", - esc_attr( $language['language'] ), - esc_attr( current( $language['iso'] ) ), - esc_attr( $language['strings']['continue'] ? $language['strings']['continue'] : 'Continue' ), @@ -150212,11 +150111,13 @@ - ); - - unset( $languages[ $wp_local_package ] ); -+ esc_attr($language['language']), -+ esc_attr(current($language['iso'])), -+ esc_attr($language['strings']['continue'] ? $language['strings']['continue'] : 'Continue'), -+ in_array($language['language'], $installed_languages, true) ? ' data-installed="1"' : '', -+ esc_html($language['native_name']) ++printf( ++ '' . "\n", ++ esc_attr($language['language']), ++ esc_attr(current($language['iso'])), ++ esc_attr($language['strings']['continue'] ? $language['strings']['continue'] : 'Continue'), ++ in_array($language['language'], $installed_languages, true) ? ' data-installed="1"' : '', ++ esc_html($language['native_name']) +); + + unset($languages[ $wp_local_package ]); @@ -150304,7 +150205,7 @@ } diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php -index 0c66ad3ee9..bdcbf86e38 100644 +index 0c66ad3ee9..ea9622b1db 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -1062,8 +1062,8 @@ $_new_bundled_files = array( @@ -150627,10 +150528,11 @@ - 'files_not_writable', - __( 'The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.' ), - implode( ', ', $error_data ) +- ); + 'files_not_writable', + __('The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.'), + implode(', ', $error_data) - ); ++ ); } } } @@ -150674,15 +150576,17 @@ - if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { - $wp_filesystem->delete( $from, true ); - $result = new WP_Error( +- 'copy_failed_for_version_file', +- __( 'The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.' ), +- 'wp-includes/version.php' +- ); + if ( ! is_wp_error($result) ) { + if ( ! $wp_filesystem->copy($from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */) ) { + $wp_filesystem->delete($from, true); +$result = new WP_Error( - 'copy_failed_for_version_file', -- __( 'The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.' ), -+ __('The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.'), - 'wp-includes/version.php' -- ); ++ 'copy_failed_for_version_file', ++ __('The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.'), ++ 'wp-includes/version.php' +); } @@ -150752,7 +150656,7 @@ } } -@@ -1409,18 +1409,18 @@ function update_core( $from, $to ) { +@@ -1409,19 +1409,19 @@ function update_core( $from, $to ) { * If we don't have enough free space, it isn't worth trying again. * Unlikely to be hit due to the check in unzip_file(). */ @@ -150772,12 +150676,14 @@ - $result->get_error_code() . '_retry', - $result->get_error_message(), - substr( $result->get_error_data(), strlen( $to ) ) +- ); + $result->get_error_code() . '_retry', + $result->get_error_message(), + substr($result->get_error_data(), strlen($to)) - ); ++ ); } } + } @@ -1430,8 +1430,8 @@ function update_core( $from, $to ) { * Custom content directory needs updating now. * Copy languages. @@ -151061,7 +150967,9 @@ // self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional. - show_message( - '' . sprintf( -- /* translators: 1: WordPress version, 2: URL to About screen. */ ++show_message( ++ '' . sprintf( + /* translators: 1: WordPress version, 2: URL to About screen. */ - __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.' ), - $new_version, - 'about.php?updated' @@ -151069,15 +150977,6 @@ - ); - show_message( - '' . sprintf( -- /* translators: 1: WordPress version, 2: URL to About screen. */ -- __( 'Welcome to WordPress %1$s. Learn more.' ), -- $new_version, -- 'about.php?updated' -- ) . '' -- ); -+show_message( -+ '' . sprintf( -+ /* translators: 1: WordPress version, 2: URL to About screen. */ + __('Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.'), + $new_version, + 'about.php?updated' @@ -151085,7 +150984,12 @@ +); +show_message( + '' . sprintf( -+ /* translators: 1: WordPress version, 2: URL to About screen. */ + /* translators: 1: WordPress version, 2: URL to About screen. */ +- __( 'Welcome to WordPress %1$s. Learn more.' ), +- $new_version, +- 'about.php?updated' +- ) . '' +- ); + __('Welcome to WordPress %1$s. Learn more.'), + $new_version, + 'about.php?updated' @@ -151135,7 +151039,7 @@ } } } -@@ -1793,38 +1793,38 @@ function _upgrade_422_remove_genericons() { +@@ -1793,24 +1793,24 @@ function _upgrade_422_remove_genericons() { * @return array */ function _upgrade_422_find_genericons_files_in_folder( $directory ) { @@ -151160,23 +151064,21 @@ - $dirs = array_filter( - $dirs, - static function ( $dir ) { -- /* + $dirs = glob($directory . '*', GLOB_ONLYDIR); +$dirs = array_filter( + $dirs, + static function ( $dir ) { -+ /* + /* * Skip any node_modules directories. * - * Note: str_contains() is not used here, as this file is included +@@ -1818,13 +1818,13 @@ function _upgrade_422_find_genericons_files_in_folder( $directory ) { * when updating from older WordPress versions, in which case * the polyfills from wp-includes/compat.php may not be available. */ - return false === strpos( $dir, 'node_modules' ); -- } ++ return false === strpos($dir, 'node_modules'); + } - ); -+ return false === strpos($dir, 'node_modules'); -+ } +); if ( $dirs ) { @@ -151229,7 +151131,7 @@ } } diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php -index 7e68440b8e..08ff67fc7e 100644 +index 7e68440b8e..4bd7e4d373 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -16,11 +16,11 @@ @@ -151252,16 +151154,13 @@ function get_core_updates( $options = array() ) { - $options = array_merge( - array( -- 'available' => true, -- 'dismissed' => false, -- ), -- $options -- ); +$options = array_merge( + array( -+ 'available' => true, -+ 'dismissed' => false, -+ ), + 'available' => true, + 'dismissed' => false, + ), +- $options +- ); + $options +); @@ -151473,13 +151372,15 @@ switch ( $cur->response ) { case 'upgrade': - return sprintf( -+return sprintf( - '%s', +- '%s', - network_admin_url( 'update-core.php' ), -+ network_admin_url('update-core.php'), - /* translators: %s: WordPress version. */ +- /* translators: %s: WordPress version. */ - sprintf( __( 'Get Version %s' ), $cur->current ) - ); ++return sprintf( ++ '%s', ++ network_admin_url('update-core.php'), ++ /* translators: %s: WordPress version. */ + sprintf(__('Get Version %s'), $cur->current) +); @@ -151553,18 +151454,14 @@ - wp_admin_notice( - $msg, - array( -- 'type' => 'warning', -- 'additional_classes' => array( 'update-nag', 'inline' ), -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $msg, + array( -+ 'type' => 'warning', -+ 'additional_classes' => array( 'update-nag', 'inline' ), -+ 'paragraph_wrap' => false, -+ ) + 'type' => 'warning', + 'additional_classes' => array( 'update-nag', 'inline' ), + 'paragraph_wrap' => false, + ) +- ); +); } @@ -151587,14 +151484,16 @@ - if ( isset( $cur->response ) && 'upgrade' === $cur->response ) { - $msg .= sprintf( -+ if ( isset($cur->response) && 'upgrade' === $cur->response ) { -+$msg .= sprintf( - '%s ', +- '%s ', - network_admin_url( 'update-core.php' ), -+ network_admin_url('update-core.php'), - /* translators: %s: WordPress version number, or 'Latest' string. */ +- /* translators: %s: WordPress version number, or 'Latest' string. */ - sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) - ); ++ if ( isset($cur->response) && 'upgrade' === $cur->response ) { ++$msg .= sprintf( ++ '%s ', ++ network_admin_url('update-core.php'), ++ /* translators: %s: WordPress version number, or 'Latest' string. */ + sprintf(__('Update to %s'), $cur->current ? $cur->current : __('Latest')) +); } @@ -151688,18 +151587,14 @@ - $details_url = add_query_arg( - array( -- 'TB_iframe' => 'true', -- 'width' => 600, -- 'height' => 800, -- ), -- $details_url -- ); +$details_url = add_query_arg( + array( -+ 'TB_iframe' => 'true', -+ 'width' => 600, -+ 'height' => 800, -+ ), + 'TB_iframe' => 'true', + 'width' => 600, + 'height' => 800, + ), +- $details_url +- ); + $details_url +); @@ -151707,14 +151602,12 @@ - $wp_list_table = _get_list_table( - 'WP_Plugins_List_Table', - array( -- 'screen' => get_current_screen(), -- ) -- ); +$wp_list_table = _get_list_table( + 'WP_Plugins_List_Table', + array( -+ 'screen' => get_current_screen(), -+ ) + 'screen' => get_current_screen(), + ) +- ); +); if ( is_network_admin() || ! is_multisite() ) { @@ -151734,8 +151627,10 @@ - printf( - '
    ' . -- '' . + '' . -+ '' . -- '' . + '' . -+ ' @@ -162808,7 +162592,7 @@ diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php -index defcc26e44..de653a09ab 100644 +index defcc26e44..ce868d3be5 100644 --- a/wp-admin/network/site-info.php +++ b/wp-admin/network/site-info.php @@ -10,40 +10,40 @@ @@ -162942,18 +162726,15 @@ - wp_redirect( - add_query_arg( - array( -- 'update' => 'updated', -- 'id' => $id, -- ), -- 'site-info.php' -- ) -- ); +wp_redirect( + add_query_arg( + array( -+ 'update' => 'updated', -+ 'id' => $id, -+ ), + 'update' => 'updated', + 'id' => $id, + ), +- 'site-info.php' +- ) +- ); + 'site-info.php' + ) +); @@ -162976,7 +162757,7 @@ $parent_file = 'sites.php'; $submenu_file = 'sites.php'; -@@ -135,17 +135,17 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -135,7 +135,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

    @@ -162985,14 +162766,8 @@ $id, -- 'selected' => 'site-info', -- ) -+ array( -+ 'blog_id' => $id, -+ 'selected' => 'site-info', -+ ) +@@ -145,7 +145,7 @@ network_edit_site_nav( + ) ); -if ( ! empty( $messages ) ) { @@ -163091,7 +162866,7 @@ submit_button(); ?> diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php -index 4bdd559e7d..311f1280fe 100644 +index 4bdd559e7d..466917fa25 100644 --- a/wp-admin/network/site-new.php +++ b/wp-admin/network/site-new.php @@ -13,53 +13,53 @@ require_once __DIR__ . '/admin.php'; @@ -163105,29 +162880,25 @@ } get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.' ) . '

    ' . - '

    ' . __( 'If the admin email for the new site does not exist in the database, a new user will also be created.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.') . '

    ' . -+ '

    ' . __('If the admin email for the new site does not exist in the database, a new user will also be created.') . '

    ', -+ ) ++ '

    ' . __('This screen is for Super Admins to add new sites to the network. This is not affected by the registration settings.') . '

    ' . ++ '

    ' . __('If the admin email for the new site does not exist in the database, a new user will also be created.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Site Management' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Site Management') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Site Management') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); -if ( isset( $_REQUEST['action'] ) && 'add-site' === $_REQUEST['action'] ) { @@ -163158,16 +162929,18 @@ - if ( in_array( $domain, $subdirectory_reserved_names, true ) ) { - wp_die( +- sprintf( + if ( in_array($domain, $subdirectory_reserved_names, true) ) { +wp_die( - sprintf( ++ sprintf( /* translators: %s: Reserved names list. */ - __( 'The following words are reserved for use by WordPress functions and cannot be used as site names: %s' ), - '' . implode( ', ', $subdirectory_reserved_names ) . '' +- ) +- ); + __('The following words are reserved for use by WordPress functions and cannot be used as site names: %s'), + '' . implode(', ', $subdirectory_reserved_names) . '' - ) -- ); ++ ) +); } } @@ -163283,20 +163056,17 @@ - wp_redirect( - add_query_arg( - array( -- 'update' => 'added', -- 'id' => $id, -- ), -- 'site-new.php' -- ) -- ); + wpmu_new_site_admin_notification($id, $user_id); + wpmu_welcome_notification($id, $user_id, $password, $title, array( 'public' => 1 )); +wp_redirect( + add_query_arg( + array( -+ 'update' => 'added', -+ 'id' => $id, -+ ), + 'update' => 'added', + 'id' => $id, + ), +- 'site-new.php' +- ) +- ); + 'site-new.php' + ) +); @@ -163420,23 +163190,17 @@ - wp_dropdown_languages( - array( -- 'name' => 'WPLANG', -- 'id' => 'site-language', -- 'selected' => $lang, -- 'languages' => $languages, -- 'translations' => $translations, -- 'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(), -- ) -- ); + wp_dropdown_languages( + array( -+ 'name' => 'WPLANG', -+ 'id' => 'site-language', -+ 'selected' => $lang, -+ 'languages' => $languages, -+ 'translations' => $translations, -+ 'show_available_translations' => current_user_can('install_languages') && wp_can_install_language_pack(), -+ ) + 'name' => 'WPLANG', + 'id' => 'site-language', + 'selected' => $lang, + 'languages' => $languages, + 'translations' => $translations, +- 'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(), ++ 'show_available_translations' => current_user_can('install_languages') && wp_can_install_language_pack(), + ) +- ); + ); ?> @@ -163472,7 +163236,7 @@
    diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php -index adfc95cfa9..c47fbddf29 100644 +index adfc95cfa9..8e7fa11523 100644 --- a/wp-admin/network/site-settings.php +++ b/wp-admin/network/site-settings.php @@ -10,43 +10,43 @@ @@ -163548,18 +163312,15 @@ - wp_redirect( - add_query_arg( - array( -- 'update' => 'updated', -- 'id' => $id, -- ), -- 'site-settings.php' -- ) -- ); +wp_redirect( + add_query_arg( + array( -+ 'update' => 'updated', -+ 'id' => $id, -+ ), + 'update' => 'updated', + 'id' => $id, + ), +- 'site-settings.php' +- ) +- ); + 'site-settings.php' + ) +); @@ -163582,7 +163343,7 @@ $parent_file = 'sites.php'; $submenu_file = 'sites.php'; -@@ -92,18 +92,18 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -92,7 +92,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

    @@ -163591,15 +163352,8 @@ $id, -- 'selected' => 'site-settings', -- ) -+ array( -+ 'blog_id' => $id, -+ 'selected' => 'site-settings', -+ ) +@@ -103,7 +103,7 @@ network_edit_site_nav( + ) ); -if ( ! empty( $messages ) ) { @@ -163695,7 +163449,7 @@
    "; - echo call_user_func( array( $this, 'column_' . $column_name ), $item ); @@ -99320,8 +99009,8 @@ - _n( '%s item', '%s items', $this->_pagination_args['total_items'] ), - number_format_i18n( $this->_pagination_args['total_items'] ) - ); -+ _n('%s item', '%s items', $this->_pagination_args['total_items']), -+ number_format_i18n($this->_pagination_args['total_items']) ++ _n('%s item', '%s items', $this->_pagination_args['total_items']), ++ number_format_i18n($this->_pagination_args['total_items']) +); } - if ( isset( $this->_pagination_args['total_pages'] ) ) { @@ -99353,7 +99042,7 @@ } } diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php -index 02362e3a89..3aeb051a60 100644 +index 02362e3a89..6fa4377b3a 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -37,26 +37,26 @@ class WP_Media_List_Table extends WP_List_Table { @@ -99376,10 +99065,9 @@ + array( 'plural' => 'media', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); } @@ -99445,9 +99133,8 @@ 'total_items' => $wp_query->found_posts, 'total_pages' => $wp_query->max_num_pages, 'per_page' => $wp_query->query_vars['posts_per_page'], -- ) + ) - ); -+ ) +); if ( $wp_query->posts ) { - update_post_thumbnail_cache( $wp_query ); @@ -99484,22 +99171,28 @@ - $selected = selected( - $filter && str_starts_with( $filter, 'post_mime_type:' ) && - wp_match_mime_types( $mime_type, str_replace( 'post_mime_type:', '', $filter ) ), -+$selected = selected( -+ $filter && str_starts_with($filter, 'post_mime_type:') && -+ wp_match_mime_types($mime_type, str_replace('post_mime_type:', '', $filter)), - true, - false +- true, +- false - ); -+); - +- - $type_links[ $mime_type ] = sprintf( -+$type_links[ $mime_type ] = sprintf( - '', +- '', - esc_attr( $mime_type ), -+ esc_attr($mime_type), - $selected, - $label[0] +- $selected, +- $label[0] - ); ++$selected = selected( ++ $filter && str_starts_with($filter, 'post_mime_type:') && ++ wp_match_mime_types($mime_type, str_replace('post_mime_type:', '', $filter)), ++ true, ++ false ++); ++ ++$type_links[ $mime_type ] = sprintf( ++ '', ++ esc_attr($mime_type), ++ $selected, ++ $label[0] +); } @@ -99519,14 +99212,15 @@ - if ( $this->is_trash || ( defined( 'MEDIA_TRASH' ) && MEDIA_TRASH ) ) { - $type_links['trash'] = sprintf( -+ if ( $this->is_trash || ( defined('MEDIA_TRASH') && MEDIA_TRASH ) ) { -+$type_links['trash'] = sprintf( - '', +- '', - selected( 'trash' === $filter, true, false ), - _x( 'Trash', 'attachment filter' ) - ); -+ selected('trash' === $filter, true, false), -+ _x('Trash', 'attachment filter') ++ if ( $this->is_trash || ( defined('MEDIA_TRASH') && MEDIA_TRASH ) ) { ++$type_links['trash'] = sprintf( ++ '', ++ selected('trash' === $filter, true, false), ++ _x('Trash', 'attachment filter') +); } @@ -99713,11 +99407,12 @@ - esc_attr__( 'Comments' ), - /* translators: Hidden accessibility text. */ - __( 'Comments' ) +- ); + '%2$s', + esc_attr__('Comments'), + /* translators: Hidden accessibility text. */ -+ __('Comments') - ); ++ __('Comments') ++ ); } } @@ -99798,14 +99493,16 @@ - if ( current_user_can( 'edit_post', $post->ID ) && ! $this->is_trash ) { - $link_start = sprintf( -+ if ( current_user_can('edit_post', $post->ID) && ! $this->is_trash ) { -+$link_start = sprintf( - '', +- '', - get_edit_post_link( $post->ID ), -+ get_edit_post_link($post->ID), - /* translators: %s: Attachment title. */ +- /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( '“%s” (Edit)' ), $title ) ) - ); ++ if ( current_user_can('edit_post', $post->ID) && ! $this->is_trash ) { ++$link_start = sprintf( ++ '', ++ get_edit_post_link($post->ID), ++ /* translators: %s: Attachment title. */ + esc_attr(sprintf(__('“%s” (Edit)'), $title)) +); $link_end = ''; @@ -99898,7 +99595,7 @@ } /** -@@ -570,55 +570,55 @@ class WP_Media_List_Table extends WP_List_Table { +@@ -570,56 +570,56 @@ class WP_Media_List_Table extends WP_List_Table { * @param WP_Post $post The current WP_Post object. */ public function column_parent( $post ) { @@ -99934,30 +99631,29 @@ if ( $user_can_edit ) : $detach_url = add_query_arg( - array( -- 'parent_post_id' => $post->post_parent, -- 'media[]' => $post->ID, ++ array( + 'parent_post_id' => $post->post_parent, + 'media[]' => $post->ID, - '_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] ), -- ), ++ '_wpnonce' => wp_create_nonce('bulk-' . $this->_args['plural']), + ), - 'upload.php' -+ array( -+ 'parent_post_id' => $post->post_parent, -+ 'media[]' => $post->ID, -+ '_wpnonce' => wp_create_nonce('bulk-' . $this->_args['plural']), -+ ), +- ); + 'upload.php' - ); ++ ); printf( - '
    %s', - $detach_url, - /* translators: %s: Title of the post the attachment is attached to. */ - esc_attr( sprintf( __( 'Detach from “%s”' ), $title ) ), - __( 'Detach' ) +- ); + '
    %s', + $detach_url, + /* translators: %s: Title of the post the attachment is attached to. */ -+ esc_attr(sprintf(__('Detach from “%s”'), $title)), ++ esc_attr(sprintf(__('Detach from “%s”'), $title)), + __('Detach') - ); ++ ); endif; } else { - _e( '(Unattached)' ); @@ -99973,14 +99669,16 @@ - /* translators: %s: Attachment title. */ - esc_attr( sprintf( __( 'Attach “%s” to existing content' ), $title ) ), - __( 'Attach' ) +- ); + '
    %s', + $post->ID, + /* translators: %s: Attachment title. */ -+ esc_attr(sprintf(__('Attach “%s” to existing content'), $title)), ++ esc_attr(sprintf(__('Attach “%s” to existing content'), $title)), + __('Attach') - ); ++ ); } } + } @@ -634,13 +634,13 @@ class WP_Media_List_Table extends WP_List_Table { public function column_comments( $post ) { echo '
    '; @@ -100080,23 +99778,25 @@
    ', +- '
    ', - esc_attr( $this->get_column_count() ) - ); -+ esc_attr($this->get_column_count()) ++printf( ++ '
    ', ++ esc_attr($this->get_column_count()) +); $incompatible_message = ''; @@ -104738,9 +104494,11 @@ } - wp_admin_notice( +- $incompatible_message, +- array( +wp_admin_notice( - $incompatible_message, - array( ++ $incompatible_message, ++ array( 'type' => 'error', 'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ), ) @@ -104795,7 +104553,7 @@ 'posts', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); $post_type = $this->screen->post_type; @@ -104823,9 +104580,8 @@ +$exclude_states = get_post_stati( + array( 'show_in_admin_all_list' => false, -- ) + ) - ); -+ ) +); - $this->user_posts_count = (int) $wpdb->get_var( @@ -104867,18 +104623,20 @@ + $sticky_posts = implode(', ', array_map('absint', (array) $sticky_posts)); - $this->sticky_posts_count = (int) $wpdb->get_var( -+$this->sticky_posts_count = (int) $wpdb->get_var( - $wpdb->prepare( +- $wpdb->prepare( - "SELECT COUNT( 1 ) ++$this->sticky_posts_count = (int) $wpdb->get_var( ++ $wpdb->prepare( + "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft') AND ID IN ($sticky_posts)", - $post_type -+ $post_type - ) +- ) - ); ++ $post_type ++ ) +); } } @@ -104911,11 +104669,10 @@ - $this->set_hierarchical_display( - is_post_type_hierarchical( $this->screen->post_type ) -- && 'menu_order title' === $wp_query->query['orderby'] -- ); +$this->set_hierarchical_display( + is_post_type_hierarchical($this->screen->post_type) -+ && 'menu_order title' === $wp_query->query['orderby'] + && 'menu_order title' === $wp_query->query['orderby'] +- ); +); $post_type = $this->screen->post_type; @@ -104964,9 +104721,8 @@ + array( 'total_items' => $total_items, 'per_page' => $per_page, -- ) + ) - ); -+ ) +); } @@ -105017,12 +104773,13 @@ - if ( ! empty( $css_class ) ) { - $class_html = sprintf( -+ if ( ! empty($css_class) ) { -+$class_html = sprintf( - ' class="%s"', +- ' class="%s"', - esc_attr( $css_class ) - ); -+ esc_attr($css_class) ++ if ( ! empty($css_class) ) { ++$class_html = sprintf( ++ ' class="%s"', ++ esc_attr($css_class) +); if ( 'current' === $css_class ) { @@ -105086,19 +104843,21 @@ - $mine_inner_html = sprintf( +$mine_inner_html = sprintf( /* translators: %s: Number of posts. */ - _nx( +- _nx( - 'Mine (%s)', - 'Mine (%s)', - $this->user_posts_count, - 'posts' +- ), +- number_format_i18n( $this->user_posts_count ) +- ); ++ _nx( + 'Mine (%s)', + 'Mine (%s)', + $this->user_posts_count, + 'posts' - ), -- number_format_i18n( $this->user_posts_count ) -- ); -+ number_format_i18n($this->user_posts_count) ++ ), ++ number_format_i18n($this->user_posts_count) +); $mine = array( @@ -105170,8 +104929,8 @@ - number_format_i18n( $num_posts->$status_name ) - ); +$status_label = sprintf( -+ translate_nooped_plural($status->label_count, $num_posts->$status_name), -+ number_format_i18n($num_posts->$status_name) ++ translate_nooped_plural($status->label_count, $num_posts->$status_name), ++ number_format_i18n($num_posts->$status_name) +); $status_links[ $status_name ] = array( @@ -105196,19 +104955,21 @@ - $sticky_inner_html = sprintf( +$sticky_inner_html = sprintf( /* translators: %s: Number of posts. */ - _nx( +- _nx( - 'Sticky (%s)', - 'Sticky (%s)', - $this->sticky_posts_count, - 'posts' +- ), +- number_format_i18n( $this->sticky_posts_count ) +- ); ++ _nx( + 'Sticky (%s)', + 'Sticky (%s)', + $this->sticky_posts_count, + 'posts' - ), -- number_format_i18n( $this->sticky_posts_count ) -- ); -+ number_format_i18n($this->sticky_posts_count) ++ ), ++ number_format_i18n($this->sticky_posts_count) +); $sticky_link = array( @@ -105313,9 +105074,8 @@ + array( 'taxonomy' => 'post_format', 'hide_empty' => true, -- ) + ) - ); -+ ) +); // Return if there are no posts using formats. @@ -105476,13 +105236,15 @@ + && ! in_array($post_status, array( 'pending', 'draft', 'future' ), true) ) { - $posts_columns['comments'] = sprintf( -+$posts_columns['comments'] = sprintf( - '%2$s', +- '%2$s', - esc_attr__( 'Comments' ), -+ esc_attr__('Comments'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( 'Comments' ) - ); ++$posts_columns['comments'] = sprintf( ++ '%2$s', ++ esc_attr__('Comments'), ++ /* translators: Hidden accessibility text. */ + __('Comments') +); } @@ -105738,17 +105500,19 @@ ?> -@@ -1049,8 +1049,8 @@ class WP_Posts_List_Table extends WP_List_Table { +@@ -1049,9 +1049,9 @@ class WP_Posts_List_Table extends WP_List_Table { + @@ -1069,8 +1069,8 @@ class WP_Posts_List_Table extends WP_List_Table { */ protected function _column_title( $post, $classes, $data, $primary ) { @@ -105815,24 +105579,31 @@ if ( $can_edit_post && 'trash' !== $post->post_status ) { - printf( -+printf( - '%s%s', +- '%s%s', - get_edit_post_link( $post->ID ), -+ get_edit_post_link($post->ID), - /* translators: %s: Post title. */ +- /* translators: %s: Post title. */ - esc_attr( sprintf( __( '“%s” (Edit)' ), $title ) ), -+ esc_attr(sprintf(__('“%s” (Edit)'), $title)), - $pad, - $title +- $pad, +- $title - ); ++printf( ++ '%s%s', ++ get_edit_post_link($post->ID), ++ /* translators: %s: Post title. */ ++ esc_attr(sprintf(__('“%s” (Edit)'), $title)), ++ $pad, ++ $title +); } else { - printf( -+printf( - '%s%s', - $pad, - $title +- '%s%s', +- $pad, +- $title - ); ++printf( ++ '%s%s', ++ $pad, ++ $title +); } - _post_states( $post ); @@ -105886,17 +105657,20 @@ +$t_time = sprintf( /* translators: 1: Post date, 2: Post time. */ - __( '%1$s at %2$s' ), -+ __('%1$s at %2$s'), - /* translators: Post date format. See https://www.php.net/manual/datetime.format.php */ +- /* translators: Post date format. See https://www.php.net/manual/datetime.format.php */ - get_the_time( __( 'Y/m/d' ), $post ), -+ get_the_time(__('Y/m/d'), $post), - /* translators: Post time format. See https://www.php.net/manual/datetime.format.php */ +- /* translators: Post time format. See https://www.php.net/manual/datetime.format.php */ - get_the_time( __( 'g:i a' ), $post ) - ); +- +- $time = get_post_timestamp( $post ); ++ __('%1$s at %2$s'), ++ /* translators: Post date format. See https://www.php.net/manual/datetime.format.php */ ++ get_the_time(__('Y/m/d'), $post), ++ /* translators: Post time format. See https://www.php.net/manual/datetime.format.php */ + get_the_time(__('g:i a'), $post) +); - -- $time = get_post_timestamp( $post ); ++ + $time = get_post_timestamp($post); $time_diff = time() - $time; } @@ -106091,16 +105865,18 @@ if ( $can_edit_post && 'trash' !== $post->post_status ) { - $actions['edit'] = sprintf( -+$actions['edit'] = sprintf( - '%s', +- '%s', - get_edit_post_link( $post->ID ), -+ get_edit_post_link($post->ID), - /* translators: %s: Post title. */ +- /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ), - __( 'Edit' ) - ); ++$actions['edit'] = sprintf( ++ '%s', ++ get_edit_post_link($post->ID), ++ /* translators: %s: Post title. */ + esc_attr(sprintf(__('Edit “%s”'), $title)), -+ __('Edit') ++ __('Edit') +); /** @@ -106118,11 +105894,12 @@ - /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $title ) ), - __( 'Quick Edit' ) +- ); + '', + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('Quick edit “%s” inline'), $title)), ++ esc_attr(sprintf(__('Quick edit “%s” inline'), $title)), + __('Quick Edit') - ); ++ ); } } @@ -106135,12 +105912,13 @@ - /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Restore “%s” from the Trash' ), $title ) ), - __( 'Restore' ) +- ); + '%s', + wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&action=untrash', $post->ID)), 'untrash-post_' . $post->ID), + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('Restore “%s” from the Trash'), $title)), ++ esc_attr(sprintf(__('Restore “%s” from the Trash'), $title)), + __('Restore') - ); ++ ); } elseif ( EMPTY_TRASH_DAYS ) { $actions['trash'] = sprintf( - '%s', @@ -106148,12 +105926,13 @@ - /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $title ) ), - _x( 'Trash', 'verb' ) +- ); + '%s', + get_delete_post_link($post->ID), + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('Move “%s” to the Trash'), $title)), ++ esc_attr(sprintf(__('Move “%s” to the Trash'), $title)), + _x('Trash', 'verb') - ); ++ ); } if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) { @@ -106163,12 +105942,13 @@ - /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Delete “%s” permanently' ), $title ) ), - __( 'Delete Permanently' ) +- ); + '%s', + get_delete_post_link($post->ID, '', true), + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('Delete “%s” permanently'), $title)), ++ esc_attr(sprintf(__('Delete “%s” permanently'), $title)), + __('Delete Permanently') - ); ++ ); } } @@ -106190,7 +105970,7 @@ + '%s', + esc_url($preview_link), + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('Preview “%s”'), $title)), ++ esc_attr(sprintf(__('Preview “%s”'), $title)), + __('Preview') + ); } @@ -106201,26 +105981,30 @@ - /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'View “%s”' ), $title ) ), - __( 'View' ) +- ); + '%s', + get_permalink($post->ID), + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('View “%s”'), $title)), ++ esc_attr(sprintf(__('View “%s”'), $title)), + __('View') - ); ++ ); } } if ( 'wp_block' === $post->post_type ) { - $actions['export'] = sprintf( -+$actions['export'] = sprintf( - '', - $post->ID, - /* translators: %s: Post title. */ +- '', +- $post->ID, +- /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Export “%s” as JSON' ), $title ) ), - __( 'Export as JSON' ) - ); ++$actions['export'] = sprintf( ++ '', ++ $post->ID, ++ /* translators: %s: Post title. */ + esc_attr(sprintf(__('Export “%s” as JSON'), $title)), -+ __('Export as JSON') ++ __('Export as JSON') +); } @@ -106706,7 +106490,7 @@ } else { /** -@@ -2068,39 +2068,39 @@ class WP_Posts_List_Table extends WP_List_Table { +@@ -2068,40 +2068,40 @@ class WP_Posts_List_Table extends WP_List_Table { * @param string $post_type The post type slug, or current screen name if this is a taxonomy list table. * @param string $taxonomy The taxonomy name, if any. */ @@ -106748,21 +106532,19 @@ wp_admin_notice( - '

    ', - array( -- 'type' => 'error', -- 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -- 'paragraph_wrap' => false, -- ) + '

    ', + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -+ 'paragraph_wrap' => false, -+ ) - ); + 'type' => 'error', + 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), + 'paragraph_wrap' => false, + ) +- ); ++ ); ?> + diff --git a/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php b/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php -index aa68c84649..f17bfe9b0f 100644 +index aa68c84649..8af83b69bb 100644 --- a/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php +++ b/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php @@ -7,7 +7,7 @@ @@ -106812,45 +106594,46 @@ if ( 'request-completed' !== $status ) { $complete_request_markup = ''; - $complete_request_markup .= sprintf( -+$complete_request_markup .= sprintf( - '%s', - esc_url( +- '%s', +- esc_url( - wp_nonce_url( - add_query_arg( - array( -- 'action' => 'complete', -- 'request_id' => array( $request_id ), -- ), ++$complete_request_markup .= sprintf( ++ '%s', ++ esc_url( ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'complete', + 'request_id' => array( $request_id ), + ), - admin_url( 'export-personal-data.php' ) - ), - 'bulk-privacy_requests' - ) -+ wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'complete', -+ 'request_id' => array( $request_id ), -+ ), +- ), +- esc_attr( +- sprintf( + admin_url('export-personal-data.php') + ), + 'bulk-privacy_requests' + ) - ), - esc_attr( -- sprintf( -- /* translators: %s: Request email. */ ++ ), ++ esc_attr( ++ sprintf( + /* translators: %s: Request email. */ - __( 'Mark export request for “%s” as completed.' ), - $item->email - ) -+ sprintf( -+ /* translators: %s: Request email. */ +- ), +- __( 'Complete request' ) +- ); + __('Mark export request for “%s” as completed.'), + $item->email + ) - ), -- __( 'Complete request' ) -- ); -+ __('Complete request') ++ ), ++ __('Complete request') +); $complete_request_markup .= ''; } @@ -106914,30 +106697,27 @@ - wp_nonce_url( - add_query_arg( - array( -- 'action' => 'delete', -- 'request_id' => array( $item->ID ), -- ), ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'delete', + 'request_id' => array( $item->ID ), + ), - admin_url( 'export-personal-data.php' ) - ), - 'bulk-privacy_requests' - ) - ) . '">' . esc_html__( 'Remove request' ) . ''; -+ wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'delete', -+ 'request_id' => array( $item->ID ), -+ ), + admin_url('export-personal-data.php') + ), + 'bulk-privacy_requests' + ) -+ ) . '">' . esc_html__('Remove request') . ''; ++ ) . '">' . esc_html__('Remove request') . ''; break; } } diff --git a/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php b/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php -index 716535160f..dc824ddb34 100644 +index 716535160f..9c6fac8e3d 100644 --- a/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php +++ b/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php @@ -7,7 +7,7 @@ @@ -106985,45 +106765,46 @@ if ( 'request-completed' !== $status ) { $complete_request_markup = ''; - $complete_request_markup .= sprintf( -+$complete_request_markup .= sprintf( - '%s', - esc_url( +- '%s', +- esc_url( - wp_nonce_url( - add_query_arg( - array( -- 'action' => 'complete', -- 'request_id' => array( $request_id ), -- ), ++$complete_request_markup .= sprintf( ++ '%s', ++ esc_url( ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'complete', + 'request_id' => array( $request_id ), + ), - admin_url( 'erase-personal-data.php' ) - ), - 'bulk-privacy_requests' - ) -+ wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'complete', -+ 'request_id' => array( $request_id ), -+ ), +- ), +- esc_attr( +- sprintf( + admin_url('erase-personal-data.php') + ), + 'bulk-privacy_requests' + ) - ), - esc_attr( -- sprintf( -- /* translators: %s: Request email. */ ++ ), ++ esc_attr( ++ sprintf( + /* translators: %s: Request email. */ - __( 'Mark export request for “%s” as completed.' ), - $item->email - ) -+ sprintf( -+ /* translators: %s: Request email. */ +- ), +- __( 'Complete request' ) +- ); + __('Mark export request for “%s” as completed.'), + $item->email + ) - ), -- __( 'Complete request' ) -- ); -+ __('Complete request') ++ ), ++ __('Complete request') +); $complete_request_markup .= ''; } @@ -107088,30 +106869,27 @@ - wp_nonce_url( - add_query_arg( - array( -- 'action' => 'delete', -- 'request_id' => array( $item->ID ), -- ), ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'delete', + 'request_id' => array( $item->ID ), + ), - admin_url( 'erase-personal-data.php' ) - ), - 'bulk-privacy_requests' - ) - ) . '">' . esc_html__( 'Remove request' ) . ''; -+ wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'delete', -+ 'request_id' => array( $item->ID ), -+ ), + admin_url('erase-personal-data.php') + ), + 'bulk-privacy_requests' + ) -+ ) . '">' . esc_html__('Remove request') . ''; ++ ) . '">' . esc_html__('Remove request') . ''; break; } } diff --git a/wp-admin/includes/class-wp-privacy-policy-content.php b/wp-admin/includes/class-wp-privacy-policy-content.php -index d676875932..0a3b5fc094 100644 +index d676875932..f5bbdb9452 100644 --- a/wp-admin/includes/class-wp-privacy-policy-content.php +++ b/wp-admin/includes/class-wp-privacy-policy-content.php @@ -34,7 +34,7 @@ final class WP_Privacy_Policy_Content { @@ -107235,9 +107013,8 @@ 'type' => 'warning', 'additional_classes' => array( 'policy-text-updated' ), 'dismissible' => true, -- ) + ) - ); -+ ) +); } @@ -107404,34 +107181,44 @@ 'label' => $label, ); - wp_add_inline_script( -+wp_add_inline_script( - 'wp-notices', - sprintf( +- 'wp-notices', +- sprintf( - 'wp.data.dispatch( "core/notices" ).createWarningNotice( "%s", { actions: [ %s ], isDismissible: false } )', - $message, - wp_json_encode( $action ) +- ), +- 'after' +- ); ++wp_add_inline_script( ++ 'wp-notices', ++ sprintf( + 'wp.data.dispatch( "core/notices" ).createWarningNotice( "%s", { actions: [ %s ], isDismissible: false } )', + $message, + wp_json_encode($action) - ), - 'after' -- ); ++ ), ++ 'after' +); } else { - $message .= sprintf( -+$message .= sprintf( - ' %s %s', - $url, - $label, - /* translators: Hidden accessibility text. */ +- ' %s %s', +- $url, +- $label, +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ); - wp_admin_notice( +- $message, +- array( ++$message .= sprintf( ++ ' %s %s', ++ $url, ++ $label, ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +); +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'warning', 'additional_classes' => array( 'inline', 'wp-pp-notice' ), ) @@ -107467,16 +107254,14 @@ $removed = wp_get_admin_notice( - $removed, - array( -- 'type' => 'info', -- 'additional_classes' => array( 'inline' ), -- ) + $removed, + array( -+ 'type' => 'info', -+ 'additional_classes' => array( 'inline' ), -+ ) - ); + 'type' => 'info', + 'additional_classes' => array( 'inline' ), + ) +- ); - } elseif ( ! empty( $section['updated'] ) ) { ++ ); + } elseif ( ! empty($section['updated']) ) { $badge_class = ' blue'; - $date = date_i18n( $date_format, $section['updated'] ); @@ -107835,7 +107620,7 @@ } } diff --git a/wp-admin/includes/class-wp-privacy-requests-table.php b/wp-admin/includes/class-wp-privacy-requests-table.php -index 61a917c3f6..5ea307ccb1 100644 +index 61a917c3f6..22ba70aefa 100644 --- a/wp-admin/includes/class-wp-privacy-requests-table.php +++ b/wp-admin/includes/class-wp-privacy-requests-table.php @@ -40,10 +40,10 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { @@ -107968,8 +107753,8 @@ - number_format_i18n( $total_status_requests ) - ); +$status_label = sprintf( -+ translate_nooped_plural($post_status->label_count, $total_status_requests), -+ number_format_i18n($total_status_requests) ++ translate_nooped_plural($post_status->label_count, $total_status_requests), ++ number_format_i18n($total_status_requests) +); - $status_link = add_query_arg( 'filter-status', $status, $admin_url ); @@ -108038,7 +107823,11 @@ - 'bulk_action', - 'bulk_action', - sprintf( -- /* translators: %d: Number of requests. */ ++ add_settings_error( ++ 'bulk_action', ++ 'bulk_action', ++ sprintf( + /* translators: %d: Number of requests. */ - _n( - '%d confirmation request failed to resend.', - '%d confirmation requests failed to resend.', @@ -108048,11 +107837,6 @@ - ), - 'error' - ); -+ add_settings_error( -+ 'bulk_action', -+ 'bulk_action', -+ sprintf( -+ /* translators: %d: Number of requests. */ + _n( + '%d confirmation request failed to resend.', + '%d confirmation requests failed to resend.', @@ -108069,7 +107853,11 @@ - 'bulk_action', - 'bulk_action', - sprintf( -- /* translators: %d: Number of requests. */ ++ add_settings_error( ++ 'bulk_action', ++ 'bulk_action', ++ sprintf( + /* translators: %d: Number of requests. */ - _n( - '%d confirmation request re-sent successfully.', - '%d confirmation requests re-sent successfully.', @@ -108079,11 +107867,6 @@ - ), - 'success' - ); -+ add_settings_error( -+ 'bulk_action', -+ 'bulk_action', -+ sprintf( -+ /* translators: %d: Number of requests. */ + _n( + '%d confirmation request re-sent successfully.', + '%d confirmation requests re-sent successfully.', @@ -108112,7 +107895,10 @@ - 'bulk_action', - 'bulk_action', - sprintf( -- /* translators: %d: Number of requests. */ ++ 'bulk_action', ++ 'bulk_action', ++ sprintf( + /* translators: %d: Number of requests. */ - _n( - '%d request marked as complete.', - '%d requests marked as complete.', @@ -108121,10 +107907,7 @@ - $count - ), - 'success' -+ 'bulk_action', -+ 'bulk_action', -+ sprintf( -+ /* translators: %d: Number of requests. */ +- ); + _n( + '%d request marked as complete.', + '%d requests marked as complete.', @@ -108133,7 +107916,7 @@ + $count + ), + 'success' - ); ++ ); break; case 'delete': @@ -108151,7 +107934,11 @@ - 'bulk_action', - 'bulk_action', - sprintf( -- /* translators: %d: Number of requests. */ ++ add_settings_error( ++ 'bulk_action', ++ 'bulk_action', ++ sprintf( + /* translators: %d: Number of requests. */ - _n( - '%d request failed to delete.', - '%d requests failed to delete.', @@ -108161,11 +107948,6 @@ - ), - 'error' - ); -+ add_settings_error( -+ 'bulk_action', -+ 'bulk_action', -+ sprintf( -+ /* translators: %d: Number of requests. */ + _n( + '%d request failed to delete.', + '%d requests failed to delete.', @@ -108182,7 +107964,11 @@ - 'bulk_action', - 'bulk_action', - sprintf( -- /* translators: %d: Number of requests. */ ++ add_settings_error( ++ 'bulk_action', ++ 'bulk_action', ++ sprintf( + /* translators: %d: Number of requests. */ - _n( - '%d request deleted successfully.', - '%d requests deleted successfully.', @@ -108192,11 +107978,6 @@ - ), - 'success' - ); -+ add_settings_error( -+ 'bulk_action', -+ 'bulk_action', -+ sprintf( -+ /* translators: %d: Number of requests. */ + _n( + '%d request deleted successfully.', + '%d requests deleted successfully.', @@ -108267,9 +108048,8 @@ + array( 'total_items' => $requests_query->found_posts, 'per_page' => $posts_per_page, -- ) + ) - ); -+ ) +); } @@ -108280,17 +108060,16 @@ public function column_cb( $item ) { - return sprintf( - '' . -- '', ++return sprintf( ++ '' . + '', - esc_attr( $item->ID ), - /* translators: Hidden accessibility text. %s: Email address. */ - sprintf( __( 'Select %s' ), $item->email ) - ); -+return sprintf( -+ '' . -+ '', + esc_attr($item->ID), + /* translators: Hidden accessibility text. %s: Email address. */ -+ sprintf(__('Select %s'), $item->email) ++ sprintf(__('Select %s'), $item->email) +); } @@ -108385,7 +108164,7 @@ } diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php -index 67bceef060..0099dbf9a5 100644 +index 67bceef060..37519e2e0e 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -221,41 +221,41 @@ final class WP_Screen { @@ -108715,12 +108494,16 @@ * @param string $old_help_default Default contextual help text. */ - $default_help = apply_filters_deprecated( -+$default_help = apply_filters_deprecated( - 'default_contextual_help', - array( '' ), - '3.3.0', - 'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()' +- 'default_contextual_help', +- array( '' ), +- '3.3.0', +- 'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()' - ); ++$default_help = apply_filters_deprecated( ++ 'default_contextual_help', ++ array( '' ), ++ '3.3.0', ++ 'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()' +); if ( $default_help ) { $old_help = '

    ' . $default_help . '

    '; @@ -108729,8 +108512,9 @@ if ( $old_help ) { - $this->add_help_tab( +- array( +$this->add_help_tab( - array( ++ array( 'id' => 'old-contextual-help', - 'title' => __( 'Overview' ), + 'title' => __('Overview'), @@ -108879,9 +108663,8 @@ + $options, + array( 'wrap' => true, -- ) + ) - ); -+ ) +); $wrapper_start = ''; @@ -109010,7 +108793,7 @@ echo "$title\n"; } ?> -@@ -1197,24 +1197,24 @@ final class WP_Screen { +@@ -1197,25 +1197,25 @@ final class WP_Screen { * @since 3.3.0 */ public function render_screen_layout() { @@ -109036,11 +108819,13 @@ /* translators: %s: Number of columns on the page. */ - _n( '%s column', '%s columns', $i ), - number_format_i18n( $i ) +- ); + _n('%s column', '%s columns', $i), + number_format_i18n($i) - ); ++ ); ?> + @@ -1229,60 +1229,60 @@ final class WP_Screen { * @since 3.3.0 */ @@ -109180,7 +108965,7 @@ } echo "<$tag class='screen-reader-text'>" . $this->_screen_reader_content[ $key ] . ""; diff --git a/wp-admin/includes/class-wp-site-health-auto-updates.php b/wp-admin/includes/class-wp-site-health-auto-updates.php -index 85decaaad2..771f0e9eef 100644 +index 85decaaad2..31a3da6a95 100644 --- a/wp-admin/includes/class-wp-site-health-auto-updates.php +++ b/wp-admin/includes/class-wp-site-health-auto-updates.php @@ -28,7 +28,7 @@ class WP_Site_Health_Auto_Updates { @@ -109210,16 +108995,15 @@ } return $test; -- }, + }, - $tests - ); -+ }, + $tests +); return $tests; } -@@ -71,13 +71,13 @@ class WP_Site_Health_Auto_Updates { +@@ -71,14 +71,14 @@ class WP_Site_Health_Auto_Updates { public function test_constants( $constant, $value ) { $acceptable_values = (array) $value; @@ -109231,13 +109015,15 @@ - __( 'The %1$s constant is defined as %2$s' ), - "$constant", - '' . esc_html( var_export( constant( $constant ), true ) ) . '' +- ), + __('The %1$s constant is defined as %2$s'), + "$constant", + '' . esc_html(var_export(constant($constant), true)) . '' - ), ++ ), 'severity' => 'fail', ); -@@ -93,13 +93,13 @@ class WP_Site_Health_Auto_Updates { + } +@@ -93,14 +93,14 @@ class WP_Site_Health_Auto_Updates { */ public function test_wp_version_check_attached() { if ( ( ! is_multisite() || is_main_site() && is_network_admin() ) @@ -109249,12 +109035,14 @@ /* translators: %s: Name of the filter used. */ - __( 'A plugin has prevented updates by disabling %s.' ), - 'wp_version_check()' +- ), + __('A plugin has prevented updates by disabling %s.'), + 'wp_version_check()' - ), ++ ), 'severity' => 'fail', ); -@@ -115,12 +115,12 @@ class WP_Site_Health_Auto_Updates { + } +@@ -115,13 +115,13 @@ class WP_Site_Health_Auto_Updates { */ public function test_filters_automatic_updater_disabled() { /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ @@ -109265,11 +109053,13 @@ /* translators: %s: Name of the filter used. */ - __( 'The %s filter is enabled.' ), - 'automatic_updater_disabled' +- ), + __('The %s filter is enabled.'), + 'automatic_updater_disabled' - ), ++ ), 'severity' => 'fail', ); + } @@ -135,7 +135,7 @@ class WP_Site_Health_Auto_Updates { * @return array|false The test results. False if auto-updates are enabled. */ @@ -109311,9 +109101,10 @@ +$description .= ' ' . sprintf( /* translators: %s: Code of error shown. */ - __( 'The error code was %s.' ), -+ __('The error code was %s.'), - '' . $failed['error_code'] . '' +- '' . $failed['error_code'] . '' - ); ++ __('The error code was %s.'), ++ '' . $failed['error_code'] . '' +); return array( 'description' => $description, @@ -109343,7 +109134,7 @@ return array( 'description' => $description, 'severity' => 'warning', -@@ -215,35 +215,35 @@ class WP_Site_Health_Auto_Updates { +@@ -215,36 +215,36 @@ class WP_Site_Health_Auto_Updates { $check_dirs[] = $context_dir; // Once we've hit '/' or 'C:\', we need to stop. dirname will keep returning the input here. @@ -109381,13 +109172,15 @@ - '' . $check_dir . '', - "$vcs_dir", - 'automatic_updates_is_vcs_checkout' +- ), + __('The folder %1$s was detected as being under version control (%2$s), but the %3$s filter is allowing updates.'), + '' . $check_dir . '', + "$vcs_dir", + 'automatic_updates_is_vcs_checkout' - ), ++ ), 'severity' => 'info', ); + } @@ -253,16 +253,16 @@ class WP_Site_Health_Auto_Updates { return array( 'description' => sprintf( @@ -109395,10 +109188,11 @@ - __( 'The folder %1$s was detected as being under version control (%2$s).' ), - '' . $check_dir . '', - "$vcs_dir" +- ), + __('The folder %1$s was detected as being under version control (%2$s).'), + '' . $check_dir . '', + "$vcs_dir" - ), ++ ), 'severity' => 'warning', ); } @@ -109476,10 +109270,11 @@ +$description = sprintf( /* translators: %s: WordPress version. */ - __( "Couldn't retrieve a list of the checksums for WordPress %s." ), -+ __("Couldn't retrieve a list of the checksums for WordPress %s."), - $wp_version +- $wp_version - ); - $description .= ' ' . __( 'This could mean that connections are failing to WordPress.org.' ); ++ __("Couldn't retrieve a list of the checksums for WordPress %s."), ++ $wp_version +); + $description .= ' ' . __('This could mean that connections are failing to WordPress.org.'); return array( @@ -109524,7 +109319,7 @@ 'severity' => 'pass', ); } -@@ -396,28 +396,28 @@ class WP_Site_Health_Auto_Updates { +@@ -396,29 +396,29 @@ class WP_Site_Health_Auto_Updates { public function test_accepts_dev_updates() { require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z // Only for dev versions. @@ -109540,9 +109335,10 @@ /* translators: %s: Name of the constant used. */ - __( 'WordPress development updates are blocked by the %s constant.' ), - 'WP_AUTO_UPDATE_CORE' +- ), + __('WordPress development updates are blocked by the %s constant.'), + 'WP_AUTO_UPDATE_CORE' - ), ++ ), 'severity' => 'fail', ); } @@ -109555,12 +109351,14 @@ /* translators: %s: Name of the filter used. */ - __( 'WordPress development updates are blocked by the %s filter.' ), - 'allow_dev_auto_core_updates' +- ), + __('WordPress development updates are blocked by the %s filter.'), + 'allow_dev_auto_core_updates' - ), ++ ), 'severity' => 'fail', ); -@@ -432,24 +432,24 @@ class WP_Site_Health_Auto_Updates { + } +@@ -432,25 +432,25 @@ class WP_Site_Health_Auto_Updates { * @return array The test results. */ public function test_accepts_minor_updates() { @@ -109571,9 +109369,10 @@ /* translators: %s: Name of the constant used. */ - __( 'WordPress security and maintenance releases are blocked by %s.' ), - "define( 'WP_AUTO_UPDATE_CORE', false );" +- ), + __('WordPress security and maintenance releases are blocked by %s.'), + "define( 'WP_AUTO_UPDATE_CORE', false );" - ), ++ ), 'severity' => 'fail', ); } @@ -109586,13 +109385,15 @@ /* translators: %s: Name of the filter used. */ - __( 'WordPress security and maintenance releases are blocked by the %s filter.' ), - 'allow_minor_auto_core_updates' +- ), + __('WordPress security and maintenance releases are blocked by the %s filter.'), + 'allow_minor_auto_core_updates' - ), ++ ), 'severity' => 'fail', ); + } diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php -index da6c81e985..78cc770496 100644 +index da6c81e985..613e2efed7 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -38,22 +38,22 @@ class WP_Site_Health { @@ -109775,27 +109576,32 @@ +$result['label'] = sprintf( /* translators: %s: Your current version of WordPress. */ - __( 'WordPress version %s' ), -+ __('WordPress version %s'), - $core_current_version +- $core_current_version - ); -+); - +- - $result['description'] = sprintf( -+$result['description'] = sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Unable to check if any new versions of WordPress are available.' ) - ); -+ __('Unable to check if any new versions of WordPress are available.') -+); - +- - $result['actions'] = sprintf( -+$result['actions'] = sprintf( - '%s', +- '%s', - esc_url( admin_url( 'update-core.php?force-check=1' ) ), - __( 'Check for updates manually' ) - ); -+ esc_url(admin_url('update-core.php?force-check=1')), -+ __('Check for updates manually') ++ __('WordPress version %s'), ++ $core_current_version ++); ++ ++$result['description'] = sprintf( ++ '

    %s

    ', ++ __('Unable to check if any new versions of WordPress are available.') ++); ++ ++$result['actions'] = sprintf( ++ '%s', ++ esc_url(admin_url('update-core.php?force-check=1')), ++ __('Check for updates manually') +); } else { foreach ( $core_updates as $core => $update ) { @@ -109891,20 +109697,22 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Plugins extend your site’s functionality with things like contact forms, ecommerce and much more. That means they have deep access to your site, so it’s vital to keep them up to date.' ) - ), - 'actions' => sprintf( -+ __('Plugins extend your site’s functionality with things like contact forms, ecommerce and much more. That means they have deep access to your site, so it’s vital to keep them up to date.') -+), -+'actions' => sprintf( - '

    %s

    ', +- '

    %s

    ', - esc_url( admin_url( 'plugins.php' ) ), - __( 'Manage your plugins' ) - ), -+ esc_url(admin_url('plugins.php')), -+ __('Manage your plugins') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Plugins extend your site’s functionality with things like contact forms, ecommerce and much more. That means they have deep access to your site, so it’s vital to keep them up to date.') ++), ++'actions' => sprintf( ++ '

    %s

    ', ++ esc_url(admin_url('plugins.php')), ++ __('Manage your plugins') +), 'test' => 'plugin_version', ); @@ -109923,7 +109731,7 @@ ++$plugins_need_update; } } -@@ -396,49 +396,49 @@ class WP_Site_Health { +@@ -396,50 +396,50 @@ class WP_Site_Health { if ( $plugins_need_update > 0 ) { $result['status'] = 'critical'; @@ -109931,9 +109739,11 @@ + $result['label'] = __('You have plugins waiting to be updated'); - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %d: The number of outdated plugins. */ - _n( - 'Your site has %d plugin waiting to be updated.', @@ -109941,38 +109751,44 @@ - $plugins_need_update - ), - $plugins_need_update +- ) +- ); +- +- $result['actions'] .= sprintf( +- '

    %s

    ', +- esc_url( network_admin_url( 'plugins.php?plugin_status=upgrade' ) ), +- __( 'Update your plugins' ) +- ); + _n( + 'Your site has %d plugin waiting to be updated.', + 'Your site has %d plugins waiting to be updated.', + $plugins_need_update + ), + $plugins_need_update - ) -- ); ++ ) +); - -- $result['actions'] .= sprintf( ++ +$result['actions'] .= sprintf( - '

    %s

    ', -- esc_url( network_admin_url( 'plugins.php?plugin_status=upgrade' ) ), -- __( 'Update your plugins' ) -- ); -+ esc_url(network_admin_url('plugins.php?plugin_status=upgrade')), -+ __('Update your plugins') ++ '

    %s

    ', ++ esc_url(network_admin_url('plugins.php?plugin_status=upgrade')), ++ __('Update your plugins') +); } else { if ( 1 === $plugins_active ) { $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your site has 1 active plugin, and it is up to date.' ) +- ); + '

    %s

    ', + __('Your site has 1 active plugin, and it is up to date.') - ); ++ ); } elseif ( $plugins_active > 0 ) { $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: %d: The number of active plugins. */ ++ '

    %s

    ', ++ sprintf( + /* translators: %d: The number of active plugins. */ - _n( - 'Your site has %d active plugin, and it is up to date.', - 'Your site has %d active plugins, and they are all up to date.', @@ -109980,9 +109796,7 @@ - ), - $plugins_active - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: %d: The number of active plugins. */ +- ); + _n( + 'Your site has %d active plugin, and it is up to date.', + 'Your site has %d active plugins, and they are all up to date.', @@ -109990,16 +109804,18 @@ + ), + $plugins_active + ) - ); ++ ); } else { $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your site does not have any active plugins.' ) +- ); + '

    %s

    ', + __('Your site does not have any active plugins.') - ); ++ ); } } + @@ -449,27 +449,27 @@ class WP_Site_Health { $result['status'] = 'recommended'; @@ -110008,9 +109824,11 @@ + $result['label'] = __('You should remove inactive plugins'); - $result['description'] .= sprintf( +- '

    %s %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s %s

    ', - sprintf( ++ '

    %s %s

    ', ++ sprintf( /* translators: %d: The number of inactive plugins. */ - _n( - 'Your site has %d inactive plugin.', @@ -110018,26 +109836,29 @@ - $unused_plugins - ), - $unused_plugins +- ), +- __( 'Inactive plugins are tempting targets for attackers. If you are not going to use a plugin, you should consider removing it.' ) +- ); +- +- $result['actions'] .= sprintf( +- '

    %s

    ', +- esc_url( admin_url( 'plugins.php?plugin_status=inactive' ) ), +- __( 'Manage inactive plugins' ) +- ); + _n( + 'Your site has %d inactive plugin.', + 'Your site has %d inactive plugins.', + $unused_plugins + ), + $unused_plugins - ), -- __( 'Inactive plugins are tempting targets for attackers. If you are not going to use a plugin, you should consider removing it.' ) -- ); -+ __('Inactive plugins are tempting targets for attackers. If you are not going to use a plugin, you should consider removing it.') ++ ), ++ __('Inactive plugins are tempting targets for attackers. If you are not going to use a plugin, you should consider removing it.') +); - -- $result['actions'] .= sprintf( ++ +$result['actions'] .= sprintf( - '

    %s

    ', -- esc_url( admin_url( 'plugins.php?plugin_status=inactive' ) ), -- __( 'Manage inactive plugins' ) -- ); -+ esc_url(admin_url('plugins.php?plugin_status=inactive')), -+ __('Manage inactive plugins') ++ '

    %s

    ', ++ esc_url(admin_url('plugins.php?plugin_status=inactive')), ++ __('Manage inactive plugins') +); } @@ -110055,20 +109876,22 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Themes add your site’s look and feel. It’s important to keep them up to date, to stay consistent with your brand and keep your site secure.' ) - ), - 'actions' => sprintf( -+ __('Themes add your site’s look and feel. It’s important to keep them up to date, to stay consistent with your brand and keep your site secure.') -+), -+'actions' => sprintf( - '

    %s

    ', +- '

    %s

    ', - esc_url( admin_url( 'themes.php' ) ), - __( 'Manage your themes' ) - ), -+ esc_url(admin_url('themes.php')), -+ __('Manage your themes') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Themes add your site’s look and feel. It’s important to keep them up to date, to stay consistent with your brand and keep your site secure.') ++), ++'actions' => sprintf( ++ '

    %s

    ', ++ esc_url(admin_url('themes.php')), ++ __('Manage your themes') +), 'test' => 'theme_version', ); @@ -110091,7 +109914,7 @@ ++$themes_need_updates; } } -@@ -569,44 +569,44 @@ class WP_Site_Health { +@@ -569,45 +569,45 @@ class WP_Site_Health { if ( $themes_need_updates > 0 ) { $result['status'] = 'critical'; @@ -110099,9 +109922,11 @@ + $result['label'] = __('You have themes waiting to be updated'); - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %d: The number of outdated themes. */ - _n( - 'Your site has %d theme waiting to be updated.', @@ -110109,14 +109934,15 @@ - $themes_need_updates - ), - $themes_need_updates +- ) +- ); + _n( + 'Your site has %d theme waiting to be updated.', + 'Your site has %d themes waiting to be updated.', + $themes_need_updates + ), + $themes_need_updates - ) -- ); ++ ) +); } else { // Give positive feedback about the site being good about keeping things up to date. @@ -110124,14 +109950,17 @@ $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your site has 1 installed theme, and it is up to date.' ) +- ); + '

    %s

    ', + __('Your site has 1 installed theme, and it is up to date.') - ); ++ ); } elseif ( $themes_total > 0 ) { $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: %d: The number of themes. */ ++ '

    %s

    ', ++ sprintf( + /* translators: %d: The number of themes. */ - _n( - 'Your site has %d installed theme, and it is up to date.', - 'Your site has %d installed themes, and they are all up to date.', @@ -110139,9 +109968,7 @@ - ), - $themes_total - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: %d: The number of themes. */ +- ); + _n( + 'Your site has %d installed theme, and it is up to date.', + 'Your site has %d installed themes, and they are all up to date.', @@ -110149,16 +109976,18 @@ + ), + $themes_total + ) - ); ++ ); } else { $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your site does not have any installed themes.' ) +- ); + '

    %s

    ', + __('Your site does not have any installed themes.') - ); ++ ); } } + @@ -618,85 +618,85 @@ class WP_Site_Health { // Recommend removing inactive themes, except a default theme, your current one, and the parent theme. $result['status'] = 'recommended'; @@ -110170,7 +109999,10 @@ - $result['description'] .= sprintf( - '

    %s %s

    ', - sprintf( -- /* translators: %d: The number of inactive themes. */ ++ $result['description'] .= sprintf( ++ '

    %s %s

    ', ++ sprintf( + /* translators: %d: The number of inactive themes. */ - _n( - 'Your site has %d inactive theme.', - 'Your site has %d inactive themes.', @@ -110179,16 +110011,6 @@ - $themes_inactive - ), - sprintf( -- /* translators: 1: The currently active theme. 2: The active theme's parent theme. */ -- __( 'To enhance your site’s security, you should consider removing any themes you are not using. You should keep your active theme, %1$s, and %2$s, its parent theme.' ), -- $active_theme->name, -- $active_theme->parent()->name -- ) -- ); -+ $result['description'] .= sprintf( -+ '

    %s %s

    ', -+ sprintf( -+ /* translators: %d: The number of inactive themes. */ + _n( + 'Your site has %d inactive theme.', + 'Your site has %d inactive themes.', @@ -110197,7 +110019,12 @@ + $themes_inactive + ), + sprintf( -+ /* translators: 1: The currently active theme. 2: The active theme's parent theme. */ + /* translators: 1: The currently active theme. 2: The active theme's parent theme. */ +- __( 'To enhance your site’s security, you should consider removing any themes you are not using. You should keep your active theme, %1$s, and %2$s, its parent theme.' ), +- $active_theme->name, +- $active_theme->parent()->name +- ) +- ); + __('To enhance your site’s security, you should consider removing any themes you are not using. You should keep your active theme, %1$s, and %2$s, its parent theme.'), + $active_theme->name, + $active_theme->parent()->name @@ -110207,7 +110034,10 @@ - $result['description'] .= sprintf( - '

    %s %s

    ', - sprintf( -- /* translators: %d: The number of inactive themes. */ ++ $result['description'] .= sprintf( ++ '

    %s %s

    ', ++ sprintf( + /* translators: %d: The number of inactive themes. */ - _n( - 'Your site has %d inactive theme.', - 'Your site has %d inactive themes.', @@ -110216,17 +110046,6 @@ - $themes_inactive - ), - sprintf( -- /* translators: 1: The default theme for WordPress. 2: The currently active theme. 3: The active theme's parent theme. */ -- __( 'To enhance your site’s security, you should consider removing any themes you are not using. You should keep %1$s, the default WordPress theme, %2$s, your active theme, and %3$s, its parent theme.' ), -- $default_theme ? $default_theme->name : WP_DEFAULT_THEME, -- $active_theme->name, -- $active_theme->parent()->name -- ) -- ); -+ $result['description'] .= sprintf( -+ '

    %s %s

    ', -+ sprintf( -+ /* translators: %d: The number of inactive themes. */ + _n( + 'Your site has %d inactive theme.', + 'Your site has %d inactive themes.', @@ -110235,7 +110054,13 @@ + $themes_inactive + ), + sprintf( -+ /* translators: 1: The default theme for WordPress. 2: The currently active theme. 3: The active theme's parent theme. */ + /* translators: 1: The default theme for WordPress. 2: The currently active theme. 3: The active theme's parent theme. */ +- __( 'To enhance your site’s security, you should consider removing any themes you are not using. You should keep %1$s, the default WordPress theme, %2$s, your active theme, and %3$s, its parent theme.' ), +- $default_theme ? $default_theme->name : WP_DEFAULT_THEME, +- $active_theme->name, +- $active_theme->parent()->name +- ) +- ); + __('To enhance your site’s security, you should consider removing any themes you are not using. You should keep %1$s, the default WordPress theme, %2$s, your active theme, and %3$s, its parent theme.'), + $default_theme ? $default_theme->name : WP_DEFAULT_THEME, + $active_theme->name, @@ -110254,7 +110079,10 @@ - $result['description'] .= sprintf( - '

    %s %s

    ', - sprintf( -- /* translators: 1: The amount of inactive themes. 2: The currently active theme. */ ++ $result['description'] .= sprintf( ++ '

    %s %s

    ', ++ sprintf( + /* translators: 1: The amount of inactive themes. 2: The currently active theme. */ - _n( - 'Your site has %1$d inactive theme, other than %2$s, your active theme.', - 'Your site has %1$d inactive themes, other than %2$s, your active theme.', @@ -110265,10 +110093,6 @@ - ), - __( 'You should consider removing any unused themes to enhance your site’s security.' ) - ); -+ $result['description'] .= sprintf( -+ '

    %s %s

    ', -+ sprintf( -+ /* translators: 1: The amount of inactive themes. 2: The currently active theme. */ + _n( + 'Your site has %1$d inactive theme, other than %2$s, your active theme.', + 'Your site has %1$d inactive themes, other than %2$s, your active theme.', @@ -110283,7 +110107,10 @@ - $result['description'] .= sprintf( - '

    %s %s

    ', - sprintf( -- /* translators: 1: The amount of inactive themes. 2: The default theme for WordPress. 3: The currently active theme. */ ++ $result['description'] .= sprintf( ++ '

    %s %s

    ', ++ sprintf( + /* translators: 1: The amount of inactive themes. 2: The default theme for WordPress. 3: The currently active theme. */ - _n( - 'Your site has %1$d inactive theme, other than %2$s, the default WordPress theme, and %3$s, your active theme.', - 'Your site has %1$d inactive themes, other than %2$s, the default WordPress theme, and %3$s, your active theme.', @@ -110295,10 +110122,6 @@ - ), - __( 'You should consider removing any unused themes to enhance your site’s security.' ) - ); -+ $result['description'] .= sprintf( -+ '

    %s %s

    ', -+ sprintf( -+ /* translators: 1: The amount of inactive themes. 2: The default theme for WordPress. 3: The currently active theme. */ + _n( + 'Your site has %1$d inactive theme, other than %2$s, the default WordPress theme, and %3$s, your active theme.', + 'Your site has %1$d inactive themes, other than %2$s, the default WordPress theme, and %3$s, your active theme.', @@ -110321,11 +110144,12 @@ + $result['label'] = __('Have a default theme available'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Your site does not have any default theme. Default themes are used by WordPress automatically if anything is wrong with your chosen theme.' ) - ); -+ __('Your site does not have any default theme. Default themes are used by WordPress automatically if anything is wrong with your chosen theme.') ++$result['description'] .= sprintf( ++ '

    %s

    ', ++ __('Your site does not have any default theme. Default themes are used by WordPress automatically if anything is wrong with your chosen theme.') +); } @@ -110338,9 +110162,10 @@ +'label' => sprintf( /* translators: %s: The current PHP version. */ - __( 'Your site is running the current version of PHP (%s)' ), -+ __('Your site is running the current version of PHP (%s)'), - PHP_VERSION +- PHP_VERSION - ), ++ __('Your site is running the current version of PHP (%s)'), ++ PHP_VERSION +), 'status' => 'good', 'badge' => array( @@ -110349,27 +110174,32 @@ 'color' => 'blue', ), - 'description' => sprintf( +- '

    %s

    ', +- sprintf( +'description' => sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %s: The minimum recommended PHP version. */ - __( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance. The minimum recommended version of PHP is %s.' ), - $response ? $response['recommended_version'] : '' -+ __('PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance. The minimum recommended version of PHP is %s.'), -+ $response ? $response['recommended_version'] : '' - ) +- ) - ), - 'actions' => sprintf( -+), -+'actions' => sprintf( - '

    %s %s

    ', +- '

    %s %s

    ', - esc_url( wp_get_update_php_url() ), - __( 'Learn more about updating PHP' ), -+ esc_url(wp_get_update_php_url()), -+ __('Learn more about updating PHP'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ), ++ __('PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance. The minimum recommended version of PHP is %s.'), ++ $response ? $response['recommended_version'] : '' ++ ) ++), ++'actions' => sprintf( ++ '

    %s %s

    ', ++ esc_url(wp_get_update_php_url()), ++ __('Learn more about updating PHP'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +), 'test' => 'php_version', @@ -110387,9 +110217,10 @@ +$result['label'] = sprintf( /* translators: %s: The server PHP version. */ - __( 'Your site is running on an older version of PHP (%s)' ), -+ __('Your site is running on an older version of PHP (%s)'), - PHP_VERSION +- PHP_VERSION - ); ++ __('Your site is running on an older version of PHP (%s)'), ++ PHP_VERSION +); $result['status'] = 'recommended'; @@ -110402,9 +110233,10 @@ +$result['label'] = sprintf( /* translators: %s: The server PHP version. */ - __( 'Your site is running on an outdated version of PHP (%s), which soon will not be supported by WordPress.' ), -+ __('Your site is running on an outdated version of PHP (%s), which soon will not be supported by WordPress.'), - PHP_VERSION +- PHP_VERSION - ); ++ __('Your site is running on an outdated version of PHP (%s), which soon will not be supported by WordPress.'), ++ PHP_VERSION +); $result['status'] = 'critical'; @@ -110420,9 +110252,10 @@ +$result['label'] = sprintf( /* translators: %s: The server PHP version. */ - __( 'Your site is running on an older version of PHP (%s), which should be updated' ), -+ __('Your site is running on an older version of PHP (%s), which should be updated'), - PHP_VERSION +- PHP_VERSION - ); ++ __('Your site is running on an older version of PHP (%s), which should be updated'), ++ PHP_VERSION +); $result['status'] = 'recommended'; @@ -110435,9 +110268,10 @@ +$message = sprintf( /* translators: %s: The server PHP version. */ - __( 'Your site is running on an outdated version of PHP (%s), which does not receive security updates and soon will not be supported by WordPress.' ), -+ __('Your site is running on an outdated version of PHP (%s), which does not receive security updates and soon will not be supported by WordPress.'), - PHP_VERSION +- PHP_VERSION - ); ++ __('Your site is running on an outdated version of PHP (%s), which does not receive security updates and soon will not be supported by WordPress.'), ++ PHP_VERSION +); } else { // No more security updates for the PHP version, must be updated. @@ -110445,9 +110279,10 @@ +$message = sprintf( /* translators: %s: The server PHP version. */ - __( 'Your site is running on an outdated version of PHP (%s), which does not receive security updates. It should be updated.' ), -+ __('Your site is running on an outdated version of PHP (%s), which does not receive security updates. It should be updated.'), - PHP_VERSION +- PHP_VERSION - ); ++ __('Your site is running on an outdated version of PHP (%s), which does not receive security updates. It should be updated.'), ++ PHP_VERSION +); } @@ -110496,11 +110331,13 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    %s

    ', +- '

    %s

    %s

    ', - __( 'PHP modules perform most of the tasks on the server that make your site run. Any changes to these must be made by your server administrator.' ), -+ __('PHP modules perform most of the tasks on the server that make your site run. Any changes to these must be made by your server administrator.'), - sprintf( +- sprintf( ++'description' => sprintf( ++ '

    %s

    %s

    ', ++ __('PHP modules perform most of the tasks on the server that make your site run. Any changes to these must be made by your server administrator.'), ++ sprintf( /* translators: 1: Link to the hosting group page about recommended PHP modules. 2: Additional link attributes. 3: Accessibility text. */ - __( 'The WordPress Hosting Team maintains a list of those modules, both recommended and required, in the team handbook%3$s.' ), - /* translators: Localized team handbook, if one exists. */ @@ -110511,17 +110348,18 @@ - /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ) +- ) +- ), + __('The WordPress Hosting Team maintains a list of those modules, both recommended and required, in the team handbook%3$s.'), + /* translators: Localized team handbook, if one exists. */ -+ esc_url(__('https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions')), ++ esc_url(__('https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions')), + 'target="_blank" rel="noopener"', + sprintf( + ' %s', + /* translators: Hidden accessibility text. */ -+ __('(opens in a new tab)') ++ __('(opens in a new tab)') + ) - ) -- ), ++ ) +), 'actions' => '', 'test' => 'php_extensions', @@ -110600,7 +110438,7 @@ } if ( ! $module['required'] && 'good' === $result['status'] ) { -@@ -1080,13 +1080,13 @@ class WP_Site_Health { +@@ -1080,14 +1080,14 @@ class WP_Site_Health { } } @@ -110612,11 +110450,13 @@ $output .= sprintf( - '
  • %s
  • ', - $failure +- ); + '
  • %s
  • ', + $failure - ); ++ ); } + $output .= ''; @@ -1095,10 +1095,10 @@ class WP_Site_Health { if ( 'good' !== $result['status'] ) { @@ -110643,11 +110483,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'PHP default timezone was configured by WordPress on loading. This is necessary for correct calculations of dates and times.' ) - ), -+ __('PHP default timezone was configured by WordPress on loading. This is necessary for correct calculations of dates and times.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('PHP default timezone was configured by WordPress on loading. This is necessary for correct calculations of dates and times.') +), 'actions' => '', 'test' => 'php_default_timezone', @@ -110660,16 +110501,19 @@ + $result['label'] = __('PHP default timezone is invalid'); - $result['description'] = sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] = sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %s: date_default_timezone_set() */ - __( 'PHP default timezone was changed after WordPress loading by a %s function call. This interferes with correct calculations of dates and times.' ), - 'date_default_timezone_set()' +- ) +- ); + __('PHP default timezone was changed after WordPress loading by a %s function call. This interferes with correct calculations of dates and times.'), + 'date_default_timezone_set()' - ) -- ); ++ ) +); } @@ -110687,18 +110531,21 @@ 'color' => 'blue', ), - 'description' => sprintf( +- '

    %s

    ', +- sprintf( +'description' => sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: session_start(), 2: session_write_close() */ - __( 'PHP sessions created by a %1$s function call may interfere with REST API and loopback requests. An active session should be closed by %2$s before making any HTTP requests.' ), - 'session_start()', - 'session_write_close()' +- ) +- ), + __('PHP sessions created by a %1$s function call may interfere with REST API and loopback requests. An active session should be closed by %2$s before making any HTTP requests.'), + 'session_start()', + 'session_write_close()' - ) -- ), ++ ) +), 'test' => 'php_sessions', ); @@ -110711,18 +110558,21 @@ + $result['label'] = __('An active PHP session was detected'); - $result['description'] = sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] = sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: session_start(), 2: session_write_close() */ - __( 'A PHP session was created by a %1$s function call. This interferes with REST API and loopback requests. The session should be closed by %2$s before making any HTTP requests.' ), - 'session_start()', - 'session_write_close()' +- ) +- ); + __('A PHP session was created by a %1$s function call. This interferes with REST API and loopback requests. The session should be closed by %2$s before making any HTTP requests.'), + 'session_start()', + 'session_write_close()' - ) -- ); ++ ) +); } @@ -110740,23 +110590,27 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'The SQL server is a required piece of software for the database WordPress uses to store all your site’s content and settings.' ) - ), - 'actions' => sprintf( -+ __('The SQL server is a required piece of software for the database WordPress uses to store all your site’s content and settings.') -+), -+'actions' => sprintf( - '

    %s %s

    ', - /* translators: Localized version of WordPress requirements if one exists. */ +- '

    %s %s

    ', +- /* translators: Localized version of WordPress requirements if one exists. */ - esc_url( __( 'https://wordpress.org/about/requirements/' ) ), - __( 'Learn more about what WordPress requires to run.' ), -+ esc_url(__('https://wordpress.org/about/requirements/')), -+ __('Learn more about what WordPress requires to run.'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ), ++'description' => sprintf( ++ '

    %s

    ', ++ __('The SQL server is a required piece of software for the database WordPress uses to store all your site’s content and settings.') ++), ++'actions' => sprintf( ++ '

    %s %s

    ', ++ /* translators: Localized version of WordPress requirements if one exists. */ ++ esc_url(__('https://wordpress.org/about/requirements/')), ++ __('Learn more about what WordPress requires to run.'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +), 'test' => 'sql_server', @@ -110772,18 +110626,21 @@ + $result['label'] = __('Outdated SQL server'); - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: The database engine in use (MySQL or MariaDB). 2: Database server recommended version number. */ - __( 'For optimal performance and security reasons, you should consider running %1$s version %2$s or higher. Contact your web hosting company to correct this.' ), - ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ), - $this->mysql_recommended_version +- ) +- ); + __('For optimal performance and security reasons, you should consider running %1$s version %2$s or higher. Contact your web hosting company to correct this.'), + ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ), + $this->mysql_recommended_version - ) -- ); ++ ) +); } @@ -110796,51 +110653,54 @@ + $result['badge']['label'] = __('Security'); - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: The database engine in use (MySQL or MariaDB). 2: Database server minimum version number. */ - __( 'WordPress requires %1$s version %2$s or higher. Contact your web hosting company to correct this.' ), - ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ), - $this->mysql_required_version +- ) +- ); + __('WordPress requires %1$s version %2$s or higher. Contact your web hosting company to correct this.'), + ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ), + $this->mysql_required_version - ) -- ); ++ ) +); } if ( $db_dropin ) { - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    ', - wp_kses( +- '

    %s

    ', +- wp_kses( - sprintf( -- /* translators: 1: The name of the drop-in. 2: The name of the database engine. */ ++$result['description'] .= sprintf( ++ '

    %s

    ', ++ wp_kses( ++ sprintf( + /* translators: 1: The name of the drop-in. 2: The name of the database engine. */ - __( 'You are using a %1$s drop-in which might mean that a %2$s database is not being used.' ), - 'wp-content/db.php', - ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ) - ), - array( -- 'code' => true, -- ) -+ sprintf( -+ /* translators: 1: The name of the drop-in. 2: The name of the database engine. */ + __('You are using a %1$s drop-in which might mean that a %2$s database is not being used.'), + 'wp-content/db.php', + ( $this->is_mariadb ? 'MariaDB' : 'MySQL' ) + ), + array( -+ 'code' => true, -+ ) - ) + 'code' => true, + ) +- ) - ); ++ ) +); } return $result; -@@ -1296,58 +1296,58 @@ class WP_Site_Health { +@@ -1296,59 +1296,59 @@ class WP_Site_Health { } $result = array( @@ -110853,11 +110713,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'UTF8MB4 is the character set WordPress prefers for database storage because it safely supports the widest set of characters and encodings, including Emoji, enabling better support for non-English languages.' ) - ), -+ __('UTF8MB4 is the character set WordPress prefers for database storage because it safely supports the widest set of characters and encodings, including Emoji, enabling better support for non-English languages.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('UTF8MB4 is the character set WordPress prefers for database storage because it safely supports the widest set of characters and encodings, including Emoji, enabling better support for non-English languages.') +), 'actions' => '', 'test' => 'utf8mb4_support', @@ -110874,24 +110735,25 @@ $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: %s: Version number. */ ++ '

    %s

    ', ++ sprintf( + /* translators: %s: Version number. */ - __( 'WordPress’ utf8mb4 support requires MySQL version %s or greater. Please contact your server administrator.' ), - '5.5.3' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: %s: Version number. */ +- ); + __('WordPress’ utf8mb4 support requires MySQL version %s or greater. Please contact your server administrator.'), + '5.5.3' + ) - ); ++ ); } else { $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your MySQL version supports utf8mb4.' ) +- ); + '

    %s

    ', + __('Your MySQL version supports utf8mb4.') - ); ++ ); } } else { // MariaDB introduced utf8mb4 support in 5.5.0. - if ( version_compare( $this->mysql_server_version, '5.5.0', '<' ) ) { @@ -110904,27 +110766,29 @@ $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: %s: Version number. */ ++ '

    %s

    ', ++ sprintf( + /* translators: %s: Version number. */ - __( 'WordPress’ utf8mb4 support requires MariaDB version %s or greater. Please contact your server administrator.' ), - '5.5.0' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: %s: Version number. */ +- ); + __('WordPress’ utf8mb4 support requires MariaDB version %s or greater. Please contact your server administrator.'), + '5.5.0' + ) - ); ++ ); } else { $result['description'] .= sprintf( - '

    %s

    ', - __( 'Your MariaDB version supports utf8mb4.' ) +- ); + '

    %s

    ', + __('Your MariaDB version supports utf8mb4.') - ); ++ ); } } -@@ -1359,37 +1359,37 @@ class WP_Site_Health { + +@@ -1359,38 +1359,38 @@ class WP_Site_Health { * libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server. * mysqlnd has supported utf8mb4 since 5.0.9. */ @@ -110942,19 +110806,19 @@ $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: Name of the library, 2: Number of version. */ ++ '

    %s

    ', ++ sprintf( + /* translators: 1: Name of the library, 2: Number of version. */ - __( 'WordPress’ utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ), - 'mysqlnd', - '5.0.9' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: Name of the library, 2: Number of version. */ +- ); + __('WordPress’ utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.'), + 'mysqlnd', + '5.0.9' + ) - ); ++ ); } } else { - if ( version_compare( $mysql_client_version, '5.5.3', '<' ) ) { @@ -110967,21 +110831,22 @@ $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: Name of the library, 2: Number of version. */ ++ '

    %s

    ', ++ sprintf( + /* translators: 1: Name of the library, 2: Number of version. */ - __( 'WordPress’ utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.' ), - 'libmysql', - '5.5.3' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: Name of the library, 2: Number of version. */ +- ); + __('WordPress’ utf8mb4 support requires MySQL client library (%1$s) version %2$s or newer. Please contact your server administrator.'), + 'libmysql', + '5.5.3' + ) - ); ++ ); } } + @@ -1406,56 +1406,56 @@ class WP_Site_Health { */ public function get_test_dotorg_communication() { @@ -110995,11 +110860,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Communicating with the WordPress servers is used to check for new versions, and to both install and update WordPress core, themes or plugins.' ) - ), -+ __('Communicating with the WordPress servers is used to check for new versions, and to both install and update WordPress core, themes or plugins.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Communicating with the WordPress servers is used to check for new versions, and to both install and update WordPress core, themes or plugins.') +), 'actions' => '', 'test' => 'dotorg_communication', @@ -111012,10 +110878,9 @@ + 'https://api.wordpress.org', + array( 'timeout' => 10, -- ) + ) - ); - if ( ! is_wp_error( $wp_dotorg ) ) { -+ ) +); + if ( ! is_wp_error($wp_dotorg) ) { $result['status'] = 'good'; @@ -111026,42 +110891,48 @@ + $result['label'] = __('Could not reach WordPress.org'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    ', - sprintf( +- '

    %s

    ', +- sprintf( - '%s %s', - /* translators: Hidden accessibility text. */ - __( 'Error' ), - sprintf( -- /* translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup. */ ++$result['description'] .= sprintf( ++ '

    %s

    ', ++ sprintf( ++ '%s %s', ++ /* translators: Hidden accessibility text. */ ++ __('Error'), ++ sprintf( + /* translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup. */ - __( 'Your site is unable to reach WordPress.org at %1$s, and returned the error: %2$s' ), - gethostbyname( 'api.wordpress.org' ), - $wp_dotorg->get_error_message() - ) -+ '%s %s', -+ /* translators: Hidden accessibility text. */ -+ __('Error'), -+ sprintf( -+ /* translators: 1: The IP address WordPress.org resolves to. 2: The error returned by the lookup. */ +- ) +- ); +- +- $result['actions'] = sprintf( +- '

    %s %s

    ', +- /* translators: Localized Support reference. */ +- esc_url( __( 'https://wordpress.org/support/forums/' ) ), +- __( 'Get help resolving this issue.' ), +- /* translators: Hidden accessibility text. */ +- __( '(opens in a new tab)' ) +- ); + __('Your site is unable to reach WordPress.org at %1$s, and returned the error: %2$s'), + gethostbyname('api.wordpress.org'), + $wp_dotorg->get_error_message() + ) - ) -- ); ++ ) +); - -- $result['actions'] = sprintf( ++ +$result['actions'] = sprintf( - '

    %s %s

    ', - /* translators: Localized Support reference. */ -- esc_url( __( 'https://wordpress.org/support/forums/' ) ), -- __( 'Get help resolving this issue.' ), ++ '

    %s %s

    ', ++ /* translators: Localized Support reference. */ + esc_url(__('https://wordpress.org/support/forums/')), -+ __('Get help resolving this issue.'), - /* translators: Hidden accessibility text. */ -- __( '(opens in a new tab)' ) -- ); ++ __('Get help resolving this issue.'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +); } @@ -111080,23 +110951,27 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Debug mode is often enabled to gather more details about an error or site failure, but may contain sensitive information which should not be available on a publicly available website.' ) - ), - 'actions' => sprintf( -+ __('Debug mode is often enabled to gather more details about an error or site failure, but may contain sensitive information which should not be available on a publicly available website.') -+), -+'actions' => sprintf( - '

    %s %s

    ', - /* translators: Documentation explaining debugging in WordPress. */ +- '

    %s %s

    ', +- /* translators: Documentation explaining debugging in WordPress. */ - esc_url( __( 'https://wordpress.org/documentation/article/debugging-in-wordpress/' ) ), - __( 'Learn more about debugging in WordPress.' ), -+ esc_url(__('https://wordpress.org/documentation/article/debugging-in-wordpress/')), -+ __('Learn more about debugging in WordPress.'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ), ++'description' => sprintf( ++ '

    %s

    ', ++ __('Debug mode is often enabled to gather more details about an error or site failure, but may contain sensitive information which should not be available on a publicly available website.') ++), ++'actions' => sprintf( ++ '

    %s %s

    ', ++ /* translators: Documentation explaining debugging in WordPress. */ ++ esc_url(__('https://wordpress.org/documentation/article/debugging-in-wordpress/')), ++ __('Learn more about debugging in WordPress.'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +), 'test' => 'is_in_debug_mode', @@ -111115,17 +110990,17 @@ $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: %s: WP_DEBUG_LOG */ ++ '

    %s

    ', ++ sprintf( + /* translators: %s: WP_DEBUG_LOG */ - __( 'The value, %s, has been added to this website’s configuration file. This means any errors on the site will be written to a file which is potentially available to all users.' ), - 'WP_DEBUG_LOG' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: %s: WP_DEBUG_LOG */ +- ); + __('The value, %s, has been added to this website’s configuration file. This means any errors on the site will be written to a file which is potentially available to all users.'), + 'WP_DEBUG_LOG' + ) - ); ++ ); } - if ( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY ) { @@ -111135,27 +111010,28 @@ $result['status'] = 'critical'; -@@ -1524,13 +1524,13 @@ class WP_Site_Health { +@@ -1524,14 +1524,14 @@ class WP_Site_Health { } $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: WP_DEBUG_DISPLAY, 2: WP_DEBUG */ ++ '

    %s

    ', ++ sprintf( + /* translators: 1: WP_DEBUG_DISPLAY, 2: WP_DEBUG */ - __( 'The value, %1$s, has either been enabled by %2$s or added to your configuration file. This will make errors display on the front end of your site.' ), - 'WP_DEBUG_DISPLAY', - 'WP_DEBUG' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: WP_DEBUG_DISPLAY, 2: WP_DEBUG */ +- ); + __('The value, %1$s, has either been enabled by %2$s or added to your configuration file. This will make errors display on the front end of your site.'), + 'WP_DEBUG_DISPLAY', + 'WP_DEBUG' + ) - ); ++ ); } } + @@ -1558,23 +1558,23 @@ class WP_Site_Health { $default_update_url = wp_get_default_update_https_url(); @@ -111169,22 +111045,25 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'An HTTPS connection is a more secure way of browsing the web. Many services now have HTTPS as a requirement. HTTPS allows you to take advantage of new features that can increase site speed, improve search rankings, and gain the trust of your visitors by helping to protect their online privacy.' ) - ), - 'actions' => sprintf( -+ __('An HTTPS connection is a more secure way of browsing the web. Many services now have HTTPS as a requirement. HTTPS allows you to take advantage of new features that can increase site speed, improve search rankings, and gain the trust of your visitors by helping to protect their online privacy.') -+), -+'actions' => sprintf( - '

    %s %s

    ', +- '

    %s %s

    ', - esc_url( $default_update_url ), - __( 'Learn more about why you should use HTTPS' ), -+ esc_url($default_update_url), -+ __('Learn more about why you should use HTTPS'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ), ++'description' => sprintf( ++ '

    %s

    ', ++ __('An HTTPS connection is a more secure way of browsing the web. Many services now have HTTPS as a requirement. HTTPS allows you to take advantage of new features that can increase site speed, improve search rankings, and gain the trust of your visitors by helping to protect their online privacy.') ++), ++'actions' => sprintf( ++ '

    %s %s

    ', ++ esc_url($default_update_url), ++ __('Learn more about why you should use HTTPS'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +), 'test' => 'https_status', @@ -111202,15 +111081,14 @@ - $result['description'] = sprintf( - '

    %s

    ', - sprintf( -- /* translators: %s: URL to Settings > General > Site Address. */ ++ $result['description'] = sprintf( ++ '

    %s

    ', ++ sprintf( + /* translators: %s: URL to Settings > General > Site Address. */ - __( 'You are accessing this website using HTTPS, but your Site Address is not set up to use HTTPS by default.' ), - esc_url( admin_url( 'options-general.php' ) . '#home' ) - ) - ); -+ $result['description'] = sprintf( -+ '

    %s

    ', -+ sprintf( -+ /* translators: %s: URL to Settings > General > Site Address. */ + __('You are accessing this website using HTTPS, but your Site Address is not set up to use HTTPS by default.'), + esc_url(admin_url('options-general.php') . '#home') + ) @@ -111219,15 +111097,14 @@ - $result['description'] = sprintf( - '

    %s

    ', - sprintf( -- /* translators: %s: URL to Settings > General > Site Address. */ ++ $result['description'] = sprintf( ++ '

    %s

    ', ++ sprintf( + /* translators: %s: URL to Settings > General > Site Address. */ - __( 'Your Site Address is not set up to use HTTPS.' ), - esc_url( admin_url( 'options-general.php' ) . '#home' ) - ) - ); -+ $result['description'] = sprintf( -+ '

    %s

    ', -+ sprintf( -+ /* translators: %s: URL to Settings > General > Site Address. */ + __('Your Site Address is not set up to use HTTPS.'), + esc_url(admin_url('options-general.php') . '#home') + ) @@ -111238,16 +111115,15 @@ - $result['description'] = sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */ ++ $result['description'] = sprintf( ++ '

    %s

    ', ++ sprintf( + /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */ - __( 'You are accessing this website using HTTPS, but your WordPress Address and Site Address are not set up to use HTTPS by default.' ), - esc_url( admin_url( 'options-general.php' ) . '#siteurl' ), - esc_url( admin_url( 'options-general.php' ) . '#home' ) - ) - ); -+ $result['description'] = sprintf( -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */ + __('You are accessing this website using HTTPS, but your WordPress Address and Site Address are not set up to use HTTPS by default.'), + esc_url(admin_url('options-general.php') . '#siteurl'), + esc_url(admin_url('options-general.php') . '#home') @@ -111257,16 +111133,15 @@ - $result['description'] = sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */ ++ $result['description'] = sprintf( ++ '

    %s

    ', ++ sprintf( + /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */ - __( 'Your WordPress Address and Site Address are not set up to use HTTPS.' ), - esc_url( admin_url( 'options-general.php' ) . '#siteurl' ), - esc_url( admin_url( 'options-general.php' ) . '#home' ) - ) - ); -+ $result['description'] = sprintf( -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: URL to Settings > General > WordPress Address, 2: URL to Settings > General > Site Address. */ + __('Your WordPress Address and Site Address are not set up to use HTTPS.'), + esc_url(admin_url('options-general.php') . '#siteurl'), + esc_url(admin_url('options-general.php') . '#home') @@ -111279,15 +111154,21 @@ $result['description'] .= sprintf( - '

    %s

    ', - __( 'HTTPS is already supported for your website.' ) -+ '

    %s

    ', -+ __('HTTPS is already supported for your website.') - ); - +- ); +- - if ( defined( 'WP_HOME' ) || defined( 'WP_SITEURL' ) ) { - $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: wp-config.php, 2: WP_HOME, 3: WP_SITEURL */ ++ '

    %s

    ', ++ __('HTTPS is already supported for your website.') ++ ); ++ ++ if ( defined('WP_HOME') || defined('WP_SITEURL') ) { ++ $result['description'] .= sprintf( ++ '

    %s

    ', ++ sprintf( + /* translators: 1: wp-config.php, 2: WP_HOME, 3: WP_SITEURL */ - __( 'However, your WordPress Address is currently controlled by a PHP constant and therefore cannot be updated. You need to edit your %1$s and remove or update the definitions of %2$s and %3$s.' ), - 'wp-config.php', - 'WP_HOME', @@ -111296,11 +111177,6 @@ - ); - } elseif ( current_user_can( 'update_https' ) ) { - $default_direct_update_url = add_query_arg( 'action', 'update_https', wp_nonce_url( admin_url( 'site-health.php' ), 'wp_update_https' ) ); -+ if ( defined('WP_HOME') || defined('WP_SITEURL') ) { -+ $result['description'] .= sprintf( -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: wp-config.php, 2: WP_HOME, 3: WP_SITEURL */ + __('However, your WordPress Address is currently controlled by a PHP constant and therefore cannot be updated. You need to edit your %1$s and remove or update the definitions of %2$s and %3$s.'), + 'wp-config.php', + 'WP_HOME', @@ -111325,7 +111201,7 @@ + esc_url($direct_update_url), + __('Update your site to use HTTPS'), + /* translators: Hidden accessibility text. */ -+ __('(opens in a new tab)') ++ __('(opens in a new tab)') + ); } else { - $result['actions'] = sprintf( @@ -111356,7 +111232,7 @@ + esc_url($update_url), + __('Talk to your web host about supporting HTTPS for your website.'), + /* translators: Hidden accessibility text. */ -+ __('(opens in a new tab)') ++ __('(opens in a new tab)') + ); } else { - $result['description'] .= sprintf( @@ -111379,11 +111255,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Securely communicating between servers are needed for transactions such as fetching files, conducting sales on store sites, and much more.' ) - ), -+ __('Securely communicating between servers are needed for transactions such as fetching files, conducting sales on store sites, and much more.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Securely communicating between servers are needed for transactions such as fetching files, conducting sales on store sites, and much more.') +), 'actions' => '', 'test' => 'ssl_support', @@ -111404,11 +111281,12 @@ + $result['label'] = __('Your site is unable to communicate securely with other services'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Talk to your web host about OpenSSL support for PHP.' ) - ); -+ __('Talk to your web host about OpenSSL support for PHP.') ++$result['description'] .= sprintf( ++ '

    %s

    ', ++ __('Talk to your web host about OpenSSL support for PHP.') +); } @@ -111426,11 +111304,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Scheduled events are what periodically looks for updates to plugins, themes and WordPress itself. It is also what makes sure scheduled posts are published on time. It may also be used by various plugins to make sure that planned actions are executed.' ) - ), -+ __('Scheduled events are what periodically looks for updates to plugins, themes and WordPress itself. It is also what makes sure scheduled posts are published on time. It may also be used by various plugins to make sure that planned actions are executed.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Scheduled events are what periodically looks for updates to plugins, themes and WordPress itself. It is also what makes sure scheduled posts are published on time. It may also be used by various plugins to make sure that planned actions are executed.') +), 'actions' => '', 'test' => 'scheduled_events', @@ -111446,16 +111325,19 @@ + $result['label'] = __('It was not possible to check your scheduled events'); - $result['description'] = sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] = sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %s: The error message returned while from the cron scheduler. */ - __( 'While trying to test your site’s scheduled events, the following error was returned: %s' ), - $this->has_missed_cron()->get_error_message() +- ) +- ); + __('While trying to test your site’s scheduled events, the following error was returned: %s'), + $this->has_missed_cron()->get_error_message() - ) -- ); ++ ) +); } elseif ( $this->has_missed_cron() ) { $result['status'] = 'recommended'; @@ -111464,16 +111346,19 @@ + $result['label'] = __('A scheduled event has failed'); - $result['description'] = sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] = sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %s: The name of the failed cron event. */ - __( 'The scheduled event, %s, failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.' ), - $this->last_missed_cron +- ) +- ); + __('The scheduled event, %s, failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.'), + $this->last_missed_cron - ) -- ); ++ ) +); } elseif ( $this->has_late_cron() ) { $result['status'] = 'recommended'; @@ -111482,16 +111367,19 @@ + $result['label'] = __('A scheduled event is late'); - $result['description'] = sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] = sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %s: The name of the late cron event. */ - __( 'The scheduled event, %s, is late to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.' ), - $this->last_late_cron +- ) +- ); + __('The scheduled event, %s, is late to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.'), + $this->last_late_cron - ) -- ); ++ ) +); } @@ -111509,11 +111397,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Background updates ensure that WordPress can auto-update if a security update is released for the version you are currently using.' ) - ), -+ __('Background updates ensure that WordPress can auto-update if a security update is released for the version you are currently using.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Background updates ensure that WordPress can auto-update if a security update is released for the version you are currently using.') +), 'actions' => '', 'test' => 'background_updates', @@ -111554,13 +111443,16 @@ } - $output .= sprintf( -+$output .= sprintf( - '
  • %s %s
  • ', +- '
  • %s %s
  • ', - esc_attr( $test->severity ), -+ esc_attr($test->severity), - $severity_string, - $test->description +- $severity_string, +- $test->description - ); ++$output .= sprintf( ++ '
  • %s %s
  • ', ++ esc_attr($test->severity), ++ $severity_string, ++ $test->description +); } @@ -111578,11 +111470,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Plugin and theme auto-updates ensure that the latest versions are always installed.' ) - ), -+ __('Plugin and theme auto-updates ensure that the latest versions are always installed.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Plugin and theme auto-updates ensure that the latest versions are always installed.') +), 'actions' => '', 'test' => 'plugin_theme_auto_updates', @@ -111595,10 +111488,12 @@ + $result['label'] = __('Your site may have problems auto-updating plugins and themes'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    ', - $check_plugin_theme_updates->message +- '

    %s

    ', +- $check_plugin_theme_updates->message - ); ++$result['description'] .= sprintf( ++ '

    %s

    ', ++ $check_plugin_theme_updates->message +); } @@ -111625,8 +111520,8 @@ - '

    ' . __( '%s available disk space was detected, update routines can be performed safely.' ) . '

    ', - size_format( $available_space ) - ), -+ '

    ' . __('%s available disk space was detected, update routines can be performed safely.') . '

    ', -+ size_format($available_space) ++ '

    ' . __('%s available disk space was detected, update routines can be performed safely.') . '

    ', ++ size_format($available_space) +), 'actions' => '', 'test' => 'available_updates_disk_space', @@ -111662,9 +111557,10 @@ +'description' => sprintf( /* translators: %s: wp-content/upgrade-temp-backup */ - '

    ' . __( 'The %s directory used to improve the stability of plugin and theme updates is writable.' ) . '

    ', -+ '

    ' . __('The %s directory used to improve the stability of plugin and theme updates is writable.') . '

    ', - 'wp-content/upgrade-temp-backup' +- 'wp-content/upgrade-temp-backup' - ), ++ '

    ' . __('The %s directory used to improve the stability of plugin and theme updates is writable.') . '

    ', ++ 'wp-content/upgrade-temp-backup' +), 'actions' => '', 'test' => 'update_temp_backup_writable', @@ -111700,9 +111596,10 @@ +$result['description'] = sprintf( /* translators: %s: wp-content */ - '

    ' . __( 'The %s directory cannot be located.' ) . '

    ', -+ '

    ' . __('The %s directory cannot be located.') . '

    ', - 'wp-content' +- 'wp-content' - ); ++ '

    ' . __('The %s directory cannot be located.') . '

    ', ++ 'wp-content' +); return $result; } @@ -111733,10 +111630,12 @@ +$result['description'] = sprintf( /* translators: 1: wp-content/upgrade-temp-backup/plugins, 2: wp-content/upgrade-temp-backup/themes. */ - '

    ' . __( 'The %1$s and %2$s directories exist but are not writable. These directories are used to improve the stability of plugin updates. Please make sure the server has write permissions to these directories.' ) . '

    ', -+ '

    ' . __('The %1$s and %2$s directories exist but are not writable. These directories are used to improve the stability of plugin updates. Please make sure the server has write permissions to these directories.') . '

    ', - 'wp-content/upgrade-temp-backup/plugins', - 'wp-content/upgrade-temp-backup/themes' +- 'wp-content/upgrade-temp-backup/plugins', +- 'wp-content/upgrade-temp-backup/themes' - ); ++ '

    ' . __('The %1$s and %2$s directories exist but are not writable. These directories are used to improve the stability of plugin updates. Please make sure the server has write permissions to these directories.') . '

    ', ++ 'wp-content/upgrade-temp-backup/plugins', ++ 'wp-content/upgrade-temp-backup/themes' +); return $result; } @@ -111749,9 +111648,10 @@ +$result['description'] = sprintf( /* translators: %s: wp-content/upgrade-temp-backup/plugins */ - '

    ' . __( 'The %s directory exists but is not writable. This directory is used to improve the stability of plugin updates. Please make sure the server has write permissions to this directory.' ) . '

    ', -+ '

    ' . __('The %s directory exists but is not writable. This directory is used to improve the stability of plugin updates. Please make sure the server has write permissions to this directory.') . '

    ', - 'wp-content/upgrade-temp-backup/plugins' +- 'wp-content/upgrade-temp-backup/plugins' - ); ++ '

    ' . __('The %s directory exists but is not writable. This directory is used to improve the stability of plugin updates. Please make sure the server has write permissions to this directory.') . '

    ', ++ 'wp-content/upgrade-temp-backup/plugins' +); return $result; } @@ -111764,9 +111664,10 @@ +$result['description'] = sprintf( /* translators: %s: wp-content/upgrade-temp-backup/themes */ - '

    ' . __( 'The %s directory exists but is not writable. This directory is used to improve the stability of theme updates. Please make sure the server has write permissions to this directory.' ) . '

    ', -+ '

    ' . __('The %s directory exists but is not writable. This directory is used to improve the stability of theme updates. Please make sure the server has write permissions to this directory.') . '

    ', - 'wp-content/upgrade-temp-backup/themes' +- 'wp-content/upgrade-temp-backup/themes' - ); ++ '

    ' . __('The %s directory exists but is not writable. This directory is used to improve the stability of theme updates. Please make sure the server has write permissions to this directory.') . '

    ', ++ 'wp-content/upgrade-temp-backup/themes' +); return $result; } @@ -111779,9 +111680,10 @@ +$result['description'] = sprintf( /* translators: %s: wp-content/upgrade-temp-backup */ - '

    ' . __( 'The %s directory exists but is not writable. This directory is used to improve the stability of plugin and theme updates. Please make sure the server has write permissions to this directory.' ) . '

    ', -+ '

    ' . __('The %s directory exists but is not writable. This directory is used to improve the stability of plugin and theme updates. Please make sure the server has write permissions to this directory.') . '

    ', - 'wp-content/upgrade-temp-backup' +- 'wp-content/upgrade-temp-backup' - ); ++ '

    ' . __('The %s directory exists but is not writable. This directory is used to improve the stability of plugin and theme updates. Please make sure the server has write permissions to this directory.') . '

    ', ++ 'wp-content/upgrade-temp-backup' +); return $result; } @@ -111794,9 +111696,10 @@ +$result['description'] = sprintf( /* translators: %s: wp-content/upgrade */ - '

    ' . __( 'The %s directory exists but is not writable. This directory is used for plugin and theme updates. Please make sure the server has write permissions to this directory.' ) . '

    ', -+ '

    ' . __('The %s directory exists but is not writable. This directory is used for plugin and theme updates. Please make sure the server has write permissions to this directory.') . '

    ', - 'wp-content/upgrade' +- 'wp-content/upgrade' - ); ++ '

    ' . __('The %s directory exists but is not writable. This directory is used for plugin and theme updates. Please make sure the server has write permissions to this directory.') . '

    ', ++ 'wp-content/upgrade' +); return $result; } @@ -111810,10 +111713,12 @@ +$result['description'] = sprintf( /* translators: 1: wp-content/upgrade, 2: wp-content. */ - '

    ' . __( 'The %1$s directory does not exist, and the server does not have write permissions in %2$s to create it. This directory is used for plugin and theme updates. Please make sure the server has write permissions in %2$s.' ) . '

    ', -+ '

    ' . __('The %1$s directory does not exist, and the server does not have write permissions in %2$s to create it. This directory is used for plugin and theme updates. Please make sure the server has write permissions in %2$s.') . '

    ', - 'wp-content/upgrade', - 'wp-content' +- 'wp-content/upgrade', +- 'wp-content' - ); ++ '

    ' . __('The %1$s directory does not exist, and the server does not have write permissions in %2$s to create it. This directory is used for plugin and theme updates. Please make sure the server has write permissions in %2$s.') . '

    ', ++ 'wp-content/upgrade', ++ 'wp-content' +); return $result; } @@ -111831,11 +111736,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.' ) - ), -+ __('Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.') +), 'actions' => '', 'test' => 'loopback_requests', @@ -111848,10 +111754,12 @@ + $result['label'] = __('Your site could not complete a loopback request'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    ', - $check_loopback->message +- '

    %s

    ', +- $check_loopback->message - ); ++$result['description'] .= sprintf( ++ '

    %s

    ', ++ $check_loopback->message +); } @@ -111869,11 +111777,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'It is possible for site maintainers to block all, or some, communication to other sites and services. If set up incorrectly, this may prevent plugins and themes from working as intended.' ) - ), -+ __('It is possible for site maintainers to block all, or some, communication to other sites and services. If set up incorrectly, this may prevent plugins and themes from working as intended.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('It is possible for site maintainers to block all, or some, communication to other sites and services. If set up incorrectly, this may prevent plugins and themes from working as intended.') +), 'actions' => '', 'test' => 'http_requests', @@ -111901,16 +111810,19 @@ + $result['label'] = __('HTTP requests are blocked'); - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: %s: Name of the constant used. */ - __( 'HTTP requests have been blocked by the %s constant, with no allowed hosts.' ), - 'WP_HTTP_BLOCK_EXTERNAL' +- ) +- ); + __('HTTP requests have been blocked by the %s constant, with no allowed hosts.'), + 'WP_HTTP_BLOCK_EXTERNAL' - ) -- ); ++ ) +); } @@ -111922,23 +111834,26 @@ + $result['label'] = __('HTTP requests are partially blocked'); - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: Name of the constant used. 2: List of allowed hostnames. */ - __( 'HTTP requests have been blocked by the %1$s constant, with some allowed hosts: %2$s.' ), - 'WP_HTTP_BLOCK_EXTERNAL', - implode( ',', $hosts ) +- ) +- ); + __('HTTP requests have been blocked by the %1$s constant, with some allowed hosts: %2$s.'), + 'WP_HTTP_BLOCK_EXTERNAL', + implode(',', $hosts) - ) -- ); ++ ) +); } return $result; -@@ -2227,101 +2227,101 @@ class WP_Site_Health { +@@ -2227,102 +2227,102 @@ class WP_Site_Health { */ public function get_test_rest_availability() { $result = array( @@ -111951,11 +111866,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.' ) - ), -+ __('The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.') +), 'actions' => '', 'test' => 'rest_availability', @@ -111989,10 +111905,9 @@ +$url = add_query_arg( + array( 'context' => 'edit', -- ), + ), - $url - ); -+ ), + $url +); @@ -112007,28 +111922,33 @@ + $result['label'] = __('The REST API encountered an error'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    %s
    %s

    ', +- '

    %s

    %s
    %s

    ', - __( 'When testing the REST API, an error was encountered:' ), -+ __('When testing the REST API, an error was encountered:'), - sprintf( +- sprintf( ++$result['description'] .= sprintf( ++ '

    %s

    %s
    %s

    ', ++ __('When testing the REST API, an error was encountered:'), ++ sprintf( // translators: %s: The REST API URL. - __( 'REST API Endpoint: %s' ), - $url +- ), +- sprintf( + __('REST API Endpoint: %s'), + $url - ), - sprintf( ++ ), ++ sprintf( // translators: 1: The WordPress error code. 2: The WordPress error message. - __( 'REST API Response: (%1$s) %2$s' ), - $r->get_error_code(), - $r->get_error_message() +- ) +- ); +- } elseif ( 200 !== wp_remote_retrieve_response_code( $r ) ) { + __('REST API Response: (%1$s) %2$s'), + $r->get_error_code(), + $r->get_error_message() - ) -- ); -- } elseif ( 200 !== wp_remote_retrieve_response_code( $r ) ) { ++ ) +); + } elseif ( 200 !== wp_remote_retrieve_response_code($r) ) { $result['status'] = 'recommended'; @@ -112037,27 +111957,32 @@ + $result['label'] = __('The REST API encountered an unexpected result'); - $result['description'] .= sprintf( -+$result['description'] .= sprintf( - '

    %s

    %s
    %s

    ', +- '

    %s

    %s
    %s

    ', - __( 'When testing the REST API, an unexpected result was returned:' ), -+ __('When testing the REST API, an unexpected result was returned:'), - sprintf( +- sprintf( ++$result['description'] .= sprintf( ++ '

    %s

    %s
    %s

    ', ++ __('When testing the REST API, an unexpected result was returned:'), ++ sprintf( // translators: %s: The REST API URL. - __( 'REST API Endpoint: %s' ), - $url +- ), +- sprintf( + __('REST API Endpoint: %s'), + $url - ), - sprintf( ++ ), ++ sprintf( // translators: 1: The WordPress error code. 2: The HTTP status code error message. - __( 'REST API Response: (%1$s) %2$s' ), - wp_remote_retrieve_response_code( $r ), - wp_remote_retrieve_response_message( $r ) +- ) +- ); + __('REST API Response: (%1$s) %2$s'), + wp_remote_retrieve_response_code($r), + wp_remote_retrieve_response_message($r) - ) -- ); ++ ) +); } else { - $json = json_decode( wp_remote_retrieve_body( $r ), true ); @@ -112073,20 +111998,21 @@ $result['description'] .= sprintf( - '

    %s

    ', - sprintf( -- /* translators: %s: The name of the query parameter being tested. */ ++ '

    %s

    ', ++ sprintf( + /* translators: %s: The name of the query parameter being tested. */ - __( 'The REST API did not process the %s query parameter correctly.' ), - 'context' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: %s: The name of the query parameter being tested. */ +- ); + __('The REST API did not process the %s query parameter correctly.'), + 'context' + ) - ); ++ ); } } -@@ -2338,80 +2338,80 @@ class WP_Site_Health { + +@@ -2338,81 +2338,81 @@ class WP_Site_Health { */ public function get_test_file_uploads() { $result = array( @@ -112099,18 +112025,21 @@ 'color' => 'blue', ), - 'description' => sprintf( +- '

    %s

    ', +- sprintf( +'description' => sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: file_uploads, 2: php.ini */ - __( 'The %1$s directive in %2$s determines if uploading files is allowed on your site.' ), - 'file_uploads', - 'php.ini' +- ) +- ), + __('The %1$s directive in %2$s determines if uploading files is allowed on your site.'), + 'file_uploads', + 'php.ini' - ) -- ), ++ ) +), 'actions' => '', 'test' => 'file_uploads', @@ -112123,9 +112052,10 @@ +$result['description'] .= sprintf( /* translators: %s: ini_get() */ - __( 'The %s function has been disabled, some media settings are unavailable because of this.' ), -+ __('The %s function has been disabled, some media settings are unavailable because of this.'), - 'ini_get()' +- 'ini_get()' - ); ++ __('The %s function has been disabled, some media settings are unavailable because of this.'), ++ 'ini_get()' +); return $result; } @@ -112134,18 +112064,21 @@ + if ( empty(ini_get('file_uploads')) ) { $result['status'] = 'critical'; - $result['description'] .= sprintf( +- '

    %s

    ', +- sprintf( +$result['description'] .= sprintf( - '

    %s

    ', - sprintf( ++ '

    %s

    ', ++ sprintf( /* translators: 1: file_uploads, 2: 0 */ - __( '%1$s is set to %2$s. You won\'t be able to upload files on your site.' ), - 'file_uploads', - '0' +- ) +- ); + __('%1$s is set to %2$s. You won\'t be able to upload files on your site.'), + 'file_uploads', + '0' - ) -- ); ++ ) +); return $result; } @@ -112161,10 +112094,12 @@ +$result['label'] = sprintf( /* translators: 1: post_max_size, 2: upload_max_filesize */ - __( 'The "%1$s" value is smaller than "%2$s"' ), -+ __('The "%1$s" value is smaller than "%2$s"'), - 'post_max_size', - 'upload_max_filesize' +- 'post_max_size', +- 'upload_max_filesize' - ); ++ __('The "%1$s" value is smaller than "%2$s"'), ++ 'post_max_size', ++ 'upload_max_filesize' +); $result['status'] = 'recommended'; @@ -112173,38 +112108,39 @@ $result['description'] = sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: post_max_size, 2: upload_max_filesize */ ++ '

    %s

    ', ++ sprintf( + /* translators: 1: post_max_size, 2: upload_max_filesize */ - __( 'The setting for %1$s is currently configured as 0, this could cause some problems when trying to upload files through plugin or theme features that rely on various upload methods. It is recommended to configure this setting to a fixed value, ideally matching the value of %2$s, as some upload methods read the value 0 as either unlimited, or disabled.' ), - 'post_max_size', - 'upload_max_filesize' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: post_max_size, 2: upload_max_filesize */ +- ); + __('The setting for %1$s is currently configured as 0, this could cause some problems when trying to upload files through plugin or theme features that rely on various upload methods. It is recommended to configure this setting to a fixed value, ideally matching the value of %2$s, as some upload methods read the value 0 as either unlimited, or disabled.'), + 'post_max_size', + 'upload_max_filesize' + ) - ); ++ ); } else { $result['description'] = sprintf( - '

    %s

    ', - sprintf( -- /* translators: 1: post_max_size, 2: upload_max_filesize */ ++ '

    %s

    ', ++ sprintf( + /* translators: 1: post_max_size, 2: upload_max_filesize */ - __( 'The setting for %1$s is smaller than %2$s, this could cause some problems when trying to upload files.' ), - 'post_max_size', - 'upload_max_filesize' - ) -+ '

    %s

    ', -+ sprintf( -+ /* translators: 1: post_max_size, 2: upload_max_filesize */ +- ); + __('The setting for %1$s is smaller than %2$s, this could cause some problems when trying to upload files.'), + 'post_max_size', + 'upload_max_filesize' + ) - ); ++ ); } + return $result; @@ -2430,52 +2430,52 @@ class WP_Site_Health { */ public function get_test_authorization_header() { @@ -112218,11 +112154,12 @@ 'color' => 'blue', ), - 'description' => sprintf( -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'The Authorization header is used by third-party applications you have approved for this site. Without this header, those apps cannot connect to your site.' ) - ), -+ __('The Authorization header is used by third-party applications you have approved for this site. Without this header, those apps cannot connect to your site.') ++'description' => sprintf( ++ '

    %s

    ', ++ __('The Authorization header is used by third-party applications you have approved for this site. Without this header, those apps cannot connect to your site.') +), 'actions' => '', 'test' => 'authorization_header', @@ -112256,25 +112193,28 @@ if ( got_mod_rewrite() ) { - $result['actions'] .= sprintf( -+$result['actions'] .= sprintf( - '

    %s

    ', +- '

    %s

    ', - esc_url( admin_url( 'options-permalink.php' ) ), - __( 'Flush permalinks' ) - ); -+ esc_url(admin_url('options-permalink.php')), -+ __('Flush permalinks') ++$result['actions'] .= sprintf( ++ '

    %s

    ', ++ esc_url(admin_url('options-permalink.php')), ++ __('Flush permalinks') +); } else { - $result['actions'] .= sprintf( -+$result['actions'] .= sprintf( - '

    %s %s

    ', +- '

    %s %s

    ', - __( 'https://developer.wordpress.org/rest-api/frequently-asked-questions/#why-is-authentication-not-working' ), - __( 'Learn how to configure the Authorization header.' ), -+ __('https://developer.wordpress.org/rest-api/frequently-asked-questions/#why-is-authentication-not-working'), -+ __('Learn how to configure the Authorization header.'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ); ++$result['actions'] .= sprintf( ++ '

    %s %s

    ', ++ __('https://developer.wordpress.org/rest-api/frequently-asked-questions/#why-is-authentication-not-working'), ++ __('Learn how to configure the Authorization header.'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +); } @@ -112303,15 +112243,17 @@ 'status' => 'good', 'label' => '', - 'actions' => sprintf( -+'actions' => sprintf( - '

    %2$s %3$s

    ', +- '

    %2$s %3$s

    ', - __( 'https://wordpress.org/documentation/article/optimization/#Caching' ), - __( 'Learn more about page cache' ), -+ __('https://wordpress.org/documentation/article/optimization/#Caching'), -+ __('Learn more about page cache'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ), ++'actions' => sprintf( ++ '

    %2$s %3$s

    ', ++ __('https://wordpress.org/documentation/article/optimization/#Caching'), ++ __('Learn more about page cache'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +), ); @@ -112327,11 +112269,13 @@ +$error_info = sprintf( /* translators: 1: Error message, 2: Error code. */ - __( 'Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: %1$s (Code: %2$s)' ), -+ __('Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: %1$s (Code: %2$s)'), - $page_cache_detail->get_error_message(), - $page_cache_detail->get_error_code() +- $page_cache_detail->get_error_message(), +- $page_cache_detail->get_error_code() - ); - $result['description'] = wp_kses_post( "

    $error_info

    " ) . $result['description']; ++ __('Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: %1$s (Code: %2$s)'), ++ $page_cache_detail->get_error_message(), ++ $page_cache_detail->get_error_code() +); + $result['description'] = wp_kses_post("

    $error_info

    ") . $result['description']; return $result; @@ -112374,20 +112318,22 @@ - __( 'Median server response time was %1$s milliseconds. This is less than the recommended %2$s milliseconds threshold.' ), - number_format_i18n( $page_cache_detail['response_time'] ), - number_format_i18n( $threshold ) +- ); + __('Median server response time was %1$s milliseconds. This is less than the recommended %2$s milliseconds threshold.'), + number_format_i18n($page_cache_detail['response_time']), + number_format_i18n($threshold) - ); ++ ); } else { $page_cache_test_summary[] = ' ' . sprintf( /* translators: 1: The response time in milliseconds, 2: The recommended threshold in milliseconds. */ - __( 'Median server response time was %1$s milliseconds. It should be less than the recommended %2$s milliseconds threshold.' ), - number_format_i18n( $page_cache_detail['response_time'] ), - number_format_i18n( $threshold ) +- ); + __('Median server response time was %1$s milliseconds. It should be less than the recommended %2$s milliseconds threshold.'), + number_format_i18n($page_cache_detail['response_time']), + number_format_i18n($threshold) - ); ++ ); } - if ( empty( $page_cache_detail['headers'] ) ) { @@ -112404,14 +112350,15 @@ - count( $page_cache_detail['headers'] ) - ), - count( $page_cache_detail['headers'] ) +- ); +- $headers_summary .= ' ' . implode( ', ', $page_cache_detail['headers'] ) . '.'; + _n( + 'There was %d client caching response header detected:', + 'There were %d client caching response headers detected:', + count($page_cache_detail['headers']) + ), + count($page_cache_detail['headers']) - ); -- $headers_summary .= ' ' . implode( ', ', $page_cache_detail['headers'] ) . '.'; ++ ); + $headers_summary .= ' ' . implode(', ', $page_cache_detail['headers']) . '.'; $page_cache_test_summary[] = $headers_summary; } @@ -112444,7 +112391,7 @@ +$action_url = apply_filters( + 'site_status_persistent_object_cache_url', + /* translators: Localized Support reference. */ -+ __('https://wordpress.org/documentation/article/optimization/#persistent-object-cache') ++ __('https://wordpress.org/documentation/article/optimization/#persistent-object-cache') +); $result = array( @@ -112457,23 +112404,26 @@ ), - 'label' => __( 'A persistent object cache is being used' ), - 'description' => sprintf( -+ 'label' => __('A persistent object cache is being used'), -+'description' => sprintf( - '

    %s

    ', +- '

    %s

    ', - __( 'A persistent object cache makes your site’s database more efficient, resulting in faster load times because WordPress can retrieve your site’s content and settings much more quickly.' ) - ), - 'actions' => sprintf( -+ __('A persistent object cache makes your site’s database more efficient, resulting in faster load times because WordPress can retrieve your site’s content and settings much more quickly.') -+), -+'actions' => sprintf( - '

    %s %s

    ', +- '

    %s %s

    ', - esc_url( $action_url ), - __( 'Learn more about persistent object caching.' ), -+ esc_url($action_url), -+ __('Learn more about persistent object caching.'), - /* translators: Hidden accessibility text. */ +- /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) - ), ++ 'label' => __('A persistent object cache is being used'), ++'description' => sprintf( ++ '

    %s

    ', ++ __('A persistent object cache makes your site’s database more efficient, resulting in faster load times because WordPress can retrieve your site’s content and settings much more quickly.') ++), ++'actions' => sprintf( ++ '

    %s %s

    ', ++ esc_url($action_url), ++ __('Learn more about persistent object caching.'), ++ /* translators: Hidden accessibility text. */ + __('(opens in a new tab)') +), ); @@ -112502,8 +112452,8 @@ - __( 'Your host appears to support the following object caching services: %s.' ), - implode( ', ', $available_services ) - ); -+ __('Your host appears to support the following object caching services: %s.'), -+ implode(', ', $available_services) ++ __('Your host appears to support the following object caching services: %s.'), ++ implode(', ', $available_services) +); } @@ -112522,24 +112472,19 @@ - wp_kses( - $notes, - array( -- 'a' => array( 'href' => true ), -- 'code' => true, -- 'em' => true, -- 'strong' => true, -- ) -- ) -- ); + $result['label'] = __('You should use a persistent object cache'); +$result['description'] .= sprintf( + '

    %s

    ', + wp_kses( + $notes, + array( -+ 'a' => array( 'href' => true ), -+ 'code' => true, -+ 'em' => true, -+ 'strong' => true, -+ ) + 'a' => array( 'href' => true ), + 'code' => true, + 'em' => true, + 'strong' => true, + ) +- ) +- ); + ) +); @@ -112719,10 +112664,9 @@ + array( 'direct' => array(), 'async' => array(), -- ), + ), - $tests - ); -+ ), + $tests +); @@ -112863,20 +112807,20 @@ - '%s
    %s', - __( 'The loopback request to your site failed, this means features relying on them are not currently working as expected.' ), - sprintf( -- /* translators: 1: The WordPress error message. 2: The WordPress error code. */ ++ '%s
    %s', ++ __('The loopback request to your site failed, this means features relying on them are not currently working as expected.'), ++ sprintf( + /* translators: 1: The WordPress error message. 2: The WordPress error code. */ - __( 'Error: %1$s (%2$s)' ), - $r->get_error_message(), - $r->get_error_code() - ) -+ '%s
    %s', -+ __('The loopback request to your site failed, this means features relying on them are not currently working as expected.'), -+ sprintf( -+ /* translators: 1: The WordPress error message. 2: The WordPress error code. */ +- ), + __('Error: %1$s (%2$s)'), + $r->get_error_message(), + $r->get_error_code() + ) - ), ++ ), ); } @@ -112888,9 +112832,10 @@ /* translators: %d: The HTTP response code returned. */ - __( 'The loopback request returned an unexpected http status code, %d, it was not possible to determine if this will prevent features from working as expected.' ), - wp_remote_retrieve_response_code( $r ) +- ), + __('The loopback request returned an unexpected http status code, %d, it was not possible to determine if this will prevent features from working as expected.'), + wp_remote_retrieve_response_code($r) - ), ++ ), ); } @@ -112940,9 +112885,10 @@ $test_function = sprintf( - 'get_test_%s', - $test['test'] +- ); + 'get_test_%s', + $test['test'] - ); ++ ); - if ( method_exists( $this, $test_function ) && is_callable( array( $this, $test_function ) ) ) { - $results[] = $this->perform_test( array( $this, $test_function ) ); @@ -112981,37 +112927,31 @@ - $result_fetch = wp_remote_get( - $test['test'], - array( -- 'body' => array( -- '_wpnonce' => wp_create_nonce( 'wp_rest' ), -- ), -- ) -- ); + if ( isset($test['has_rest']) && $test['has_rest'] ) { + $result_fetch = wp_remote_get( + $test['test'], + array( -+ 'body' => array( + 'body' => array( +- '_wpnonce' => wp_create_nonce( 'wp_rest' ), + '_wpnonce' => wp_create_nonce('wp_rest'), -+ ), -+ ) + ), + ) +- ); + ); } else { - $result_fetch = wp_remote_post( - admin_url( 'admin-ajax.php' ), - array( -- 'body' => array( + $result_fetch = wp_remote_post( + admin_url('admin-ajax.php'), + array( -+ 'body' => array( + 'body' => array( 'action' => $test['test'], - '_wpnonce' => wp_create_nonce( 'health-check-site-status' ), -- ), -- ) -- ); + '_wpnonce' => wp_create_nonce('health-check-site-status'), -+ ), -+ ) + ), + ) +- ); + ); } @@ -113134,9 +113074,10 @@ return new WP_Error( - 'http_' . wp_remote_retrieve_response_code( $http_response ), - wp_remote_retrieve_response_message( $http_response ) +- ); + 'http_' . wp_remote_retrieve_response_code($http_response), + wp_remote_retrieve_response_message($http_response) - ); ++ ); } $response_headers = array(); @@ -113234,13 +113175,11 @@ 'alloptions_count' => 500, 'alloptions_bytes' => 100000, 'comments_count' => 1000, -@@ -3554,30 +3554,30 @@ class WP_Site_Health { - 'posts_count' => 1000, +@@ -3555,29 +3555,29 @@ class WP_Site_Health { 'terms_count' => 1000, 'users_count' => 1000, -- ) + ) - ); -+ ) +); $alloptions = wp_load_alloptions(); @@ -113292,9 +113231,8 @@ 'Relay' => 'relay', 'Memcache' => 'memcache', 'Memcached' => 'memcached', -- ) + ) - ); -+ ) +); - $services = array_keys( array_filter( $extensions ) ); @@ -113425,7 +113363,7 @@ } diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php -index b3d9ec59e7..0f3ae9ca49 100644 +index b3d9ec59e7..15dbdb1e50 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -37,30 +37,30 @@ class WP_Terms_List_Table extends WP_List_Table { @@ -113439,10 +113377,9 @@ 'plural' => 'tags', 'singular' => 'tag', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); $action = $this->screen->action; @@ -113555,18 +113492,15 @@ + array( 'total_items' => wp_count_terms( - array( -- 'taxonomy' => $taxonomy, -- 'search' => $search, -- ) + array( -+ 'taxonomy' => $taxonomy, -+ 'search' => $search, -+ ) - ), + 'taxonomy' => $taxonomy, + 'search' => $search, + ) +- ), ++ ), 'per_page' => $tags_per_page, -- ) + ) - ); -+ ) +); } @@ -113773,14 +113707,17 @@ - if ( current_user_can( 'delete_term', $tag->term_id ) ) { - return sprintf( +- '' . + if ( current_user_can('delete_term', $tag->term_id) ) { +return sprintf( - '' . ++ '' . '', - $tag->term_id, - /* translators: Hidden accessibility text. %s: Taxonomy term name. */ +- $tag->term_id, +- /* translators: Hidden accessibility text. %s: Taxonomy term name. */ - sprintf( __( 'Select %s' ), $tag->name ) - ); ++ $tag->term_id, ++ /* translators: Hidden accessibility text. %s: Taxonomy term name. */ + sprintf(__('Select %s'), $tag->name) +); } @@ -113812,23 +113749,28 @@ if ( $edit_link ) { - $edit_link = add_query_arg( -+$edit_link = add_query_arg( - 'wp_http_referer', +- 'wp_http_referer', - urlencode( wp_unslash( $uri ) ), -+ urlencode(wp_unslash($uri)), - $edit_link +- $edit_link - ); - $name = sprintf( -+); -+$name = sprintf( - '%s', +- '%s', - esc_url( $edit_link ), -+ esc_url($edit_link), - /* translators: %s: Taxonomy term name. */ +- /* translators: %s: Taxonomy term name. */ - esc_attr( sprintf( __( '“%s” (Edit)' ), $tag->name ) ), -+ esc_attr(sprintf(__('“%s” (Edit)'), $tag->name)), - $name +- $name - ); ++$edit_link = add_query_arg( ++ 'wp_http_referer', ++ urlencode(wp_unslash($uri)), ++ $edit_link ++); ++$name = sprintf( ++ '%s', ++ esc_url($edit_link), ++ /* translators: %s: Taxonomy term name. */ ++ esc_attr(sprintf(__('“%s” (Edit)'), $tag->name)), ++ $name +); } @@ -113861,27 +113803,31 @@ - if ( current_user_can( 'edit_term', $tag->term_id ) ) { - $actions['edit'] = sprintf( -+ if ( current_user_can('edit_term', $tag->term_id) ) { -+$actions['edit'] = sprintf( - '%s', - esc_url( +- '%s', +- esc_url( - add_query_arg( - 'wp_http_referer', - urlencode( wp_unslash( $uri ) ), - get_edit_term_link( $tag, $taxonomy, $this->screen->post_type ) - ) +- ), +- /* translators: %s: Taxonomy term name. */ +- esc_attr( sprintf( __( 'Edit “%s”' ), $tag->name ) ), +- __( 'Edit' ) +- ); ++ if ( current_user_can('edit_term', $tag->term_id) ) { ++$actions['edit'] = sprintf( ++ '%s', ++ esc_url( + add_query_arg( + 'wp_http_referer', + urlencode(wp_unslash($uri)), + get_edit_term_link($tag, $taxonomy, $this->screen->post_type) + ) - ), - /* translators: %s: Taxonomy term name. */ -- esc_attr( sprintf( __( 'Edit “%s”' ), $tag->name ) ), -- __( 'Edit' ) -- ); ++ ), ++ /* translators: %s: Taxonomy term name. */ + esc_attr(sprintf(__('Edit “%s”'), $tag->name)), -+ __('Edit') ++ __('Edit') +); /** @@ -113899,43 +113845,48 @@ - /* translators: %s: Taxonomy term name. */ - esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $tag->name ) ), - __( 'Quick Edit' ) +- ); + '', + /* translators: %s: Taxonomy term name. */ -+ esc_attr(sprintf(__('Quick edit “%s” inline'), $tag->name)), ++ esc_attr(sprintf(__('Quick edit “%s” inline'), $tag->name)), + __('Quick Edit') - ); ++ ); } } - if ( current_user_can( 'delete_term', $tag->term_id ) ) { - $actions['delete'] = sprintf( -+ if ( current_user_can('delete_term', $tag->term_id) ) { -+$actions['delete'] = sprintf( - '%s', +- '%s', - wp_nonce_url( "edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ), -+ wp_nonce_url("edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id), - /* translators: %s: Taxonomy term name. */ +- /* translators: %s: Taxonomy term name. */ - esc_attr( sprintf( __( 'Delete “%s”' ), $tag->name ) ), - __( 'Delete' ) - ); ++ if ( current_user_can('delete_term', $tag->term_id) ) { ++$actions['delete'] = sprintf( ++ '%s', ++ wp_nonce_url("edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id), ++ /* translators: %s: Taxonomy term name. */ + esc_attr(sprintf(__('Delete “%s”'), $tag->name)), -+ __('Delete') ++ __('Delete') +); } - if ( is_term_publicly_viewable( $tag ) ) { - $actions['view'] = sprintf( -+ if ( is_term_publicly_viewable($tag) ) { -+$actions['view'] = sprintf( - '%s', +- '%s', - get_term_link( $tag ), -+ get_term_link($tag), - /* translators: %s: Taxonomy term name. */ +- /* translators: %s: Taxonomy term name. */ - esc_attr( sprintf( __( 'View “%s” archive' ), $tag->name ) ), - __( 'View' ) - ); ++ if ( is_term_publicly_viewable($tag) ) { ++$actions['view'] = sprintf( ++ '%s', ++ get_term_link($tag), ++ /* translators: %s: Taxonomy term name. */ + esc_attr(sprintf(__('View “%s” archive'), $tag->name)), -+ __('View') ++ __('View') +); } @@ -114056,7 +114007,7 @@ -@@ -715,32 +715,32 @@ class WP_Terms_List_Table extends WP_List_Table { +@@ -715,33 +715,33 @@ class WP_Terms_List_Table extends WP_List_Table { list( $columns ) = $this->get_column_info(); foreach ( $columns as $column_name => $column_display_name ) { @@ -114088,21 +114039,19 @@ wp_admin_notice( - '

    ', - array( -- 'type' => 'error', -- 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -- 'paragraph_wrap' => false, -- ) + '

    ', + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -+ 'paragraph_wrap' => false, -+ ) - ); + 'type' => 'error', + 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), + 'paragraph_wrap' => false, + ) +- ); ++ ); ?> + diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php -index 318d8d872a..43c8caa21e 100644 +index 318d8d872a..1da4b81866 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/wp-admin/includes/class-wp-theme-install-list-table.php @@ -22,7 +22,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { @@ -114238,9 +114187,8 @@ 'total_items' => $api->info['results'], 'per_page' => $args['per_page'], 'infinite_scroll' => true, -- ) + ) - ); -+ ) +); } @@ -114331,10 +114279,9 @@ + array( 'tab' => 'theme-information', 'theme' => $theme->slug, -- ), + ), - self_admin_url( 'theme-install.php' ) - ); -+ ), + self_admin_url('theme-install.php') +); @@ -114346,10 +114293,9 @@ + array( 'action' => 'install-theme', 'theme' => $theme->slug, -- ), + ), - self_admin_url( 'update.php' ) - ); -+ ), + self_admin_url('update.php') +); @@ -114359,10 +114305,9 @@ + array( 'action' => 'upgrade-theme', 'theme' => $theme->slug, -- ), + ), - self_admin_url( 'update.php' ) - ); -+ ), + self_admin_url('update.php') +); @@ -114377,12 +114322,13 @@ - /* translators: %s: Theme version. */ - esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ), - __( 'Update' ) +- ); + '%s', + esc_url(wp_nonce_url($update_url, 'upgrade-theme_' . $theme->slug)), + /* translators: %s: Theme version. */ -+ esc_attr(sprintf(__('Update to version %s'), $theme->version)), ++ esc_attr(sprintf(__('Update to version %s'), $theme->version)), + __('Update') - ); ++ ); break; case 'newer_installed': case 'latest_installed': @@ -114390,10 +114336,11 @@ - '%s', - esc_attr__( 'This theme is already installed and is up to date' ), - _x( 'Installed', 'theme' ) +- ); + '%s', + esc_attr__('This theme is already installed and is up to date'), + _x('Installed', 'theme') - ); ++ ); break; case 'install': default: @@ -114403,12 +114350,13 @@ - /* translators: %s: Theme name. */ - esc_attr( sprintf( _x( 'Install %s', 'theme' ), $name ) ), - __( 'Install Now' ) +- ); + '%s', + esc_url(wp_nonce_url($install_url, 'install-theme_' . $theme->slug)), + /* translators: %s: Theme name. */ -+ esc_attr(sprintf(_x('Install %s', 'theme'), $name)), ++ esc_attr(sprintf(_x('Install %s', 'theme'), $name)), + __('Install Now') - ); ++ ); break; } @@ -114423,7 +114371,7 @@ + '%s', + esc_url($preview_url), + /* translators: %s: Theme name. */ -+ esc_attr(sprintf(__('Preview %s'), $name)), ++ esc_attr(sprintf(__('Preview %s'), $name)), + __('Preview') +); @@ -114520,10 +114468,9 @@ + array( 'action' => 'install-theme', 'theme' => $theme->slug, -- ), + ), - self_admin_url( 'update.php' ) - ); -+ ), + self_admin_url('update.php') +); @@ -114533,10 +114480,9 @@ + array( 'action' => 'upgrade-theme', 'theme' => $theme->slug, -- ), + ), - self_admin_url( 'update.php' ) - ); -+ ), + self_admin_url('update.php') +); @@ -114545,7 +114491,7 @@ ?>
    -@@ -470,27 +470,27 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { +@@ -470,28 +470,28 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { switch ( $status ) { case 'update_available': printf( @@ -114554,12 +114500,13 @@ - /* translators: %s: Theme version. */ - esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ), - __( 'Update' ) +- ); + '%s', + esc_url(wp_nonce_url($update_url, 'upgrade-theme_' . $theme->slug)), + /* translators: %s: Theme version. */ -+ esc_attr(sprintf(__('Update to version %s'), $theme->version)), ++ esc_attr(sprintf(__('Update to version %s'), $theme->version)), + __('Update') - ); ++ ); break; case 'newer_installed': case 'latest_installed': @@ -114567,10 +114514,11 @@ - '%s', - esc_attr__( 'This theme is already installed and is up to date' ), - _x( 'Installed', 'theme' ) +- ); + '%s', + esc_attr__('This theme is already installed and is up to date'), + _x('Installed', 'theme') - ); ++ ); break; case 'install': default: @@ -114578,12 +114526,14 @@ - '%s', - esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ), - __( 'Install' ) +- ); + '%s', + esc_url(wp_nonce_url($install_url, 'install-theme_' . $theme->slug)), + __('Install') - ); ++ ); break; } + ?> @@ -499,31 +499,31 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { $theme->rating, -- 'type' => 'percent', -- 'number' => $theme->num_ratings, -- ) + array( -+ 'rating' => $theme->rating, -+ 'type' => 'percent', -+ 'number' => $theme->num_ratings, -+ ) - ); + 'rating' => $theme->rating, + 'type' => 'percent', + 'number' => $theme->num_ratings, + ) +- ); ++ ); ?>
    - @@ -114653,7 +114600,7 @@ } else { $status = 'update_available'; diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php -index 8d385f9a78..c013fe4a62 100644 +index 8d385f9a78..0ef1d2d95a 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -29,12 +29,12 @@ class WP_Themes_List_Table extends WP_List_Table { @@ -114666,10 +114613,9 @@ + array( 'ajax' => true, - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); } @@ -114730,9 +114676,8 @@ + 'total_items' => count($themes), 'per_page' => $per_page, 'infinite_scroll' => true, -- ) + ) - ); -+ ) +); } @@ -114754,10 +114699,11 @@ - __( 'You only have one theme enabled for this site right now. Visit the Network Admin to enable or install more themes.' ), - network_admin_url( 'site-themes.php?id=' . $blog_id ), - network_admin_url( 'theme-install.php' ) +- ); + __('You only have one theme enabled for this site right now. Visit the Network Admin to enable or install more themes.'), + network_admin_url('site-themes.php?id=' . $blog_id), + network_admin_url('theme-install.php') - ); ++ ); return; - } elseif ( current_user_can( 'manage_network_themes' ) ) { @@ -114766,9 +114712,10 @@ /* translators: %s: URL to Themes tab on Edit Site screen. */ - __( 'You only have one theme enabled for this site right now. Visit the Network Admin to enable more themes.' ), - network_admin_url( 'site-themes.php?id=' . $blog_id ) +- ); + __('You only have one theme enabled for this site right now. Visit the Network Admin to enable more themes.'), + network_admin_url('site-themes.php?id=' . $blog_id) - ); ++ ); return; } @@ -114780,9 +114727,10 @@ /* translators: %s: URL to Add Themes screen. */ - __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the Install Themes tab above.' ), - admin_url( 'theme-install.php' ) +- ); + __('You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the Install Themes tab above.'), + admin_url('theme-install.php') - ); ++ ); return; } @@ -114849,27 +114797,32 @@ $actions = array(); - $actions['activate'] = sprintf( -+$actions['activate'] = sprintf( - '%s', - $activate_link, - /* translators: %s: Theme name. */ +- '%s', +- $activate_link, +- /* translators: %s: Theme name. */ - esc_attr( sprintf( _x( 'Activate “%s”', 'theme' ), $title ) ), - __( 'Activate' ) - ); +- +- if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ++$actions['activate'] = sprintf( ++ '%s', ++ $activate_link, ++ /* translators: %s: Theme name. */ + esc_attr(sprintf(_x('Activate “%s”', 'theme'), $title)), -+ __('Activate') ++ __('Activate') +); - -- if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ++ + if ( current_user_can('edit_theme_options') && current_user_can('customize') ) { $actions['preview'] .= sprintf( - '%s', - wp_customize_url( $stylesheet ), - __( 'Live Preview' ) +- ); + '%s', + wp_customize_url($stylesheet), + __('Live Preview') - ); ++ ); } - if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) { @@ -114880,12 +114833,13 @@ - /* translators: %s: Theme name. */ - esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $title ) ), - __( 'Delete' ) +- ); + '%s', + wp_nonce_url('themes.php?action=delete&stylesheet=' . urlencode($stylesheet), 'delete-theme_' . $stylesheet), + /* translators: %s: Theme name. */ -+ esc_js(sprintf(__("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $title)), ++ esc_js(sprintf(__("You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete."), $title)), + __('Delete') - ); ++ ); } /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */ @@ -115138,7 +115092,7 @@ /** WP_Upgrader_Skin class */ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php'; diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php -index 1fbfa99e4c..795a410bd4 100644 +index 1fbfa99e4c..3d479cccc8 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -160,7 +160,7 @@ class WP_Upgrader { @@ -115689,7 +115643,7 @@ $this->skin->after(); if ( ! $options['is_multi'] ) { $this->skin->footer(); -@@ -824,34 +824,34 @@ class WP_Upgrader { +@@ -824,18 +824,18 @@ class WP_Upgrader { * Download the package. Note: If the package is the full path * to an existing local file, it will be returned untouched. */ @@ -115711,15 +115665,12 @@ // Report this failure back to WordPress.org for debugging purposes. wp_version_check( -- array( -- 'signature_failure_code' => $download->get_error_code(), -- 'signature_failure_data' => $download->get_error_data(), -- ) -+ array( -+ 'signature_failure_code' => $download->get_error_code(), -+ 'signature_failure_data' => $download->get_error_data(), -+ ) - ); +@@ -843,15 +843,15 @@ class WP_Upgrader { + 'signature_failure_code' => $download->get_error_code(), + 'signature_failure_data' => $download->get_error_data(), + ) +- ); ++ ); } // Pretend this error didn't happen. @@ -115747,7 +115698,7 @@ $this->skin->after(); if ( ! $options['is_multi'] ) { $this->skin->footer(); -@@ -873,16 +873,16 @@ class WP_Upgrader { +@@ -873,8 +873,8 @@ class WP_Upgrader { } // With the given options, this installs it to the destination directory. @@ -115758,12 +115709,11 @@ 'source' => $working_dir, 'destination' => $options['destination'], 'clear_destination' => $options['clear_destination'], - 'abort_if_destination_exists' => $options['abort_if_destination_exists'], +@@ -882,7 +882,7 @@ class WP_Upgrader { 'clear_working' => $options['clear_working'], 'hook_extra' => $options['hook_extra'], -- ) + ) - ); -+ ) +); /** @@ -116000,7 +115950,7 @@ continue; } } -@@ -1193,21 +1193,21 @@ class WP_Upgrader { +@@ -1193,22 +1193,22 @@ class WP_Upgrader { $errors = new WP_Error(); foreach ( $this->temp_backups as $args ) { @@ -116022,13 +115972,15 @@ $errors->add( - 'temp_backup_delete_failed', - sprintf( $this->strings['temp_backup_delete_failed'], $args['slug'] ) +- ); + 'temp_backup_delete_failed', + sprintf($this->strings['temp_backup_delete_failed'], $args['slug']) - ); ++ ); continue; } + } diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php -index 8dfe3ce1a3..f20b5f0da3 100644 +index 8dfe3ce1a3..2e5d9b357c 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -42,18 +42,18 @@ class WP_Users_List_Table extends WP_List_Table { @@ -116042,10 +115994,9 @@ 'singular' => 'user', 'plural' => 'users', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, -- ) -- ); + 'screen' => isset($args['screen']) ? $args['screen'] : null, -+ ) + ) +- ); +); $this->is_site_users = 'site-users-network' === $this->screen->id; @@ -116126,9 +116077,8 @@ + array( 'total_items' => $wp_user_search->get_total(), 'per_page' => $users_per_page, -- ) + ) - ); -+ ) +); } @@ -116168,19 +116118,21 @@ - $all_text = sprintf( +$all_text = sprintf( /* translators: %s: Number of users. */ - _nx( +- _nx( - 'All (%s)', - 'All (%s)', - $total_users, - 'users' +- ), +- number_format_i18n( $total_users ) +- ); ++ _nx( + 'All (%s)', + 'All (%s)', + $total_users, + 'users' - ), -- number_format_i18n( $total_users ) -- ); -+ number_format_i18n($total_users) ++ ), ++ number_format_i18n($total_users) +); } @@ -116205,10 +116157,11 @@ - __( '%1$s (%2$s)' ), - $name, - number_format_i18n( $avail_roles[ $this_role ] ) +- ); + __('%1$s (%2$s)'), + $name, + number_format_i18n($avail_roles[ $this_role ]) - ); ++ ); } $role_links[ $this_role ] = array( @@ -116228,11 +116181,12 @@ +$name = sprintf( /* translators: 1: User role name, 2: Number of users. */ - __( '%1$s (%2$s)' ), -+ __('%1$s (%2$s)'), - $name, +- $name, - number_format_i18n( $avail_roles['none'] ) - ); -+ number_format_i18n($avail_roles['none']) ++ __('%1$s (%2$s)'), ++ $name, ++ number_format_i18n($avail_roles['none']) +); $role_links['none'] = array( @@ -116408,19 +116362,22 @@ + if ( current_user_can('list_users') ) { // Set up the user editing link. - $edit_link = esc_url( -+$edit_link = esc_url( - add_query_arg( +- add_query_arg( - 'wp_http_referer', - urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), - get_edit_user_link( $user_object->ID ) +- ) +- ); +- +- if ( current_user_can( 'edit_user', $user_object->ID ) ) { ++$edit_link = esc_url( ++ add_query_arg( + 'wp_http_referer', + urlencode(wp_unslash($_SERVER['REQUEST_URI'])), + get_edit_user_link($user_object->ID) - ) -- ); ++ ) +); - -- if ( current_user_can( 'edit_user', $user_object->ID ) ) { ++ + if ( current_user_can('edit_user', $user_object->ID) ) { $edit = "{$user_object->user_login}{$super_admin}
    "; - $actions['edit'] = '' . __( 'Edit' ) . ''; @@ -116456,12 +116413,13 @@ - /* translators: %s: Author's display name. */ - esc_attr( sprintf( __( 'View posts by %s' ), $user_object->display_name ) ), - __( 'View' ) +- ); + '%s', + esc_url($author_posts_url), + /* translators: %s: Author's display name. */ -+ esc_attr(sprintf(__('View posts by %s'), $user_object->display_name)), ++ esc_attr(sprintf(__('View posts by %s'), $user_object->display_name)), + __('View') - ); ++ ); } // Add a link to send the user a reset password link by email. @@ -116489,14 +116447,18 @@ // Set up the checkbox (because the user is editable, otherwise it's empty). - $checkbox = sprintf( +- '' . +$checkbox = sprintf( - '' . ++ '' . '', - $user_object->ID, - $role_classes, - /* translators: Hidden accessibility text. %s: User login. */ +- $user_object->ID, +- $role_classes, +- /* translators: Hidden accessibility text. %s: User login. */ - sprintf( __( 'Select %s' ), $user_object->user_login ) - ); ++ $user_object->ID, ++ $role_classes, ++ /* translators: Hidden accessibility text. %s: User login. */ + sprintf(__('Select %s'), $user_object->user_login) +); @@ -116535,10 +116497,12 @@ + $row .= sprintf( /* translators: 1: User's first name, 2: Last name. */ - _x( '%1$s %2$s', 'Display name based on first name and last name' ), -+ _x('%1$s %2$s', 'Display name based on first name and last name'), - $user_object->first_name, - $user_object->last_name +- $user_object->first_name, +- $user_object->last_name - ); ++ _x('%1$s %2$s', 'Display name based on first name and last name'), ++ $user_object->first_name, ++ $user_object->last_name + ); } elseif ( $user_object->first_name ) { $row .= $user_object->first_name; @@ -116546,11 +116510,13 @@ $row .= $user_object->last_name; } else { - $row .= sprintf( -+ $row .= sprintf( - '%s', - /* translators: Hidden accessibility text. */ +- '%s', +- /* translators: Hidden accessibility text. */ - _x( 'Unknown', 'name' ) - ); ++ $row .= sprintf( ++ '%s', ++ /* translators: Hidden accessibility text. */ + _x('Unknown', 'name') + ); } @@ -116566,18 +116532,23 @@ case 'posts': if ( $numposts > 0 ) { - $row .= sprintf( +- '%s', +- "edit.php?author={$user_object->ID}", +- $numposts, +- sprintf( + $row .= sprintf( - '%s', - "edit.php?author={$user_object->ID}", - $numposts, - sprintf( ++ '%s', ++ "edit.php?author={$user_object->ID}", ++ $numposts, ++ sprintf( /* translators: Hidden accessibility text. %s: Number of posts. */ - _n( '%s post by this author', '%s posts by this author', $numposts ), - number_format_i18n( $numposts ) +- ) +- ); + _n('%s post by this author', '%s posts by this author', $numposts), + number_format_i18n($numposts) - ) -- ); ++ ) + ); } else { $row .= 0; @@ -118031,7 +118002,7 @@ echo "\n"; } diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php -index ea870a1f5b..addf4d7117 100644 +index ea870a1f5b..54a8f874f1 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -29,67 +29,67 @@ function wp_dashboard_setup() { @@ -118579,9 +118550,11 @@ array( 'error' ), ) - ); @@ -118680,7 +118653,7 @@ + '
    %s
    ', + esc_url($url), + /* translators: %s: Post title. */ -+ esc_attr(sprintf(__('Edit “%s”'), $title)), ++ esc_attr(sprintf(__('Edit “%s”'), $title)), + esc_html($title), + get_the_time('c', $draft), + get_the_time(__('F j, Y'), $draft) @@ -118808,32 +118781,38 @@ + "delete:the-comment-list:comment-{$comment->comment_ID}::spam=1", + esc_attr__('Mark this comment as spam'), + /* translators: "Mark as spam" link. */ -+ _x('Spam', 'verb') ++ _x('Spam', 'verb') +); if ( ! EMPTY_TRASH_DAYS ) { - $actions['delete'] = sprintf( -+$actions['delete'] = sprintf( - '%s', - $delete_url, - "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", +- '%s', +- $delete_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", - esc_attr__( 'Delete this comment permanently' ), - __( 'Delete Permanently' ) - ); -+ esc_attr__('Delete this comment permanently'), -+ __('Delete Permanently') ++$actions['delete'] = sprintf( ++ '%s', ++ $delete_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", ++ esc_attr__('Delete this comment permanently'), ++ __('Delete Permanently') +); } else { - $actions['trash'] = sprintf( -+$actions['trash'] = sprintf( - '%s', - $trash_url, - "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", +- '%s', +- $trash_url, +- "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", - esc_attr__( 'Move this comment to the Trash' ), - _x( 'Trash', 'verb' ) - ); -+ esc_attr__('Move this comment to the Trash'), -+ _x('Trash', 'verb') ++$actions['trash'] = sprintf( ++ '%s', ++ $trash_url, ++ "delete:the-comment-list:comment-{$comment->comment_ID}::trash=1", ++ esc_attr__('Move this comment to the Trash'), ++ _x('Trash', 'verb') +); } @@ -118976,39 +118955,29 @@ - $future_posts = wp_dashboard_recent_posts( - array( -- 'max' => 5, -- 'status' => 'future', -- 'order' => 'ASC', ++$future_posts = wp_dashboard_recent_posts( ++ array( + 'max' => 5, + 'status' => 'future', + 'order' => 'ASC', - 'title' => __( 'Publishing Soon' ), -- 'id' => 'future-posts', -- ) ++ 'title' => __('Publishing Soon'), + 'id' => 'future-posts', + ) - ); - $recent_posts = wp_dashboard_recent_posts( - array( -- 'max' => 5, -- 'status' => 'publish', -- 'order' => 'DESC', -- 'title' => __( 'Recently Published' ), -- 'id' => 'published-posts', -- ) -- ); -+$future_posts = wp_dashboard_recent_posts( -+ array( -+ 'max' => 5, -+ 'status' => 'future', -+ 'order' => 'ASC', -+ 'title' => __('Publishing Soon'), -+ 'id' => 'future-posts', -+ ) +); +$recent_posts = wp_dashboard_recent_posts( + array( -+ 'max' => 5, -+ 'status' => 'publish', -+ 'order' => 'DESC', -+ 'title' => __('Recently Published'), -+ 'id' => 'published-posts', -+ ) + 'max' => 5, + 'status' => 'publish', + 'order' => 'DESC', +- 'title' => __( 'Recently Published' ), ++ 'title' => __('Recently Published'), + 'id' => 'published-posts', + ) +- ); +); $recent_comments = wp_dashboard_recent_comments(); @@ -119074,17 +119043,22 @@ $draft_or_post_title = _draft_or_post_title(); - printf( -+printf( - '
  • %1$s %4$s
  • ', - /* translators: 1: Relative date, 2: Time. */ +- '
  • %1$s %4$s
  • ', +- /* translators: 1: Relative date, 2: Time. */ - sprintf( _x( '%1$s, %2$s', 'dashboard' ), $relative, get_the_time() ), -+ sprintf(_x('%1$s, %2$s', 'dashboard'), $relative, get_the_time()), - $recent_post_link, - /* translators: %s: Post title. */ +- $recent_post_link, +- /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Edit “%s”' ), $draft_or_post_title ) ), -+ esc_attr(sprintf(__('Edit “%s”'), $draft_or_post_title)), - $draft_or_post_title +- $draft_or_post_title - ); ++printf( ++ '
  • %1$s %4$s
  • ', ++ /* translators: 1: Relative date, 2: Time. */ ++ sprintf(_x('%1$s, %2$s', 'dashboard'), $relative, get_the_time()), ++ $recent_post_link, ++ /* translators: %s: Post title. */ ++ esc_attr(sprintf(__('Edit “%s”'), $draft_or_post_title)), ++ $draft_or_post_title +); } @@ -119174,27 +119148,22 @@ - $loading .= wp_get_admin_notice( - __( 'This widget requires JavaScript.' ), - array( -- 'type' => 'error', -- 'additional_classes' => array( 'inline', 'hide-if-js' ), -- ) -- ); -- -- if ( empty( $check_urls ) ) { -- $widgets = get_option( 'dashboard_widget_options' ); -- -- if ( empty( $widgets[ $widget_id ]['url'] ) && ! $doing_ajax ) { + $loading = '

    ' . __('Loading…') . '

    '; +$loading .= wp_get_admin_notice( + __('This widget requires JavaScript.'), + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'inline', 'hide-if-js' ), -+ ) + 'type' => 'error', + 'additional_classes' => array( 'inline', 'hide-if-js' ), + ) +- ); +); -+ + +- if ( empty( $check_urls ) ) { +- $widgets = get_option( 'dashboard_widget_options' ); + if ( empty($check_urls) ) { + $widgets = get_option('dashboard_widget_options'); -+ + +- if ( empty( $widgets[ $widget_id ]['url'] ) && ! $doing_ajax ) { + if ( empty($widgets[ $widget_id ]['url']) && ! $doing_ajax ) { echo $loading; return false; @@ -119248,9 +119217,8 @@ + array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[ $widget_control_id ], -- ) + ) - ); -+ ) +); } } @@ -119321,14 +119289,17 @@ @@ -120069,7 +120057,7 @@
    diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php -index f7805b4cc7..2db40a82f3 100644 +index f7805b4cc7..db886e15c0 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -18,7 +18,7 @@ @@ -120345,7 +120333,7 @@ } /** -@@ -601,21 +601,23 @@ class WP_User_Search { +@@ -601,22 +601,24 @@ class WP_User_Search { if ( ! empty($this->role) ) $args['role'] = urlencode($this->role); @@ -120368,14 +120356,16 @@ - number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ), - number_format_i18n( $this->total_users_for_query ), - $this->paging_text +- ); + '' . __('Displaying %1$s–%2$s of %3$s') . '%s', + number_format_i18n(( $this->page - 1 ) * $this->users_per_page + 1), + number_format_i18n(min($this->page * $this->users_per_page, $this->total_users_for_query)), + number_format_i18n($this->total_users_for_query), + $this->paging_text - ); ++ ); } } + } @@ -692,11 +694,11 @@ endif; * @return array List of posts from others. */ @@ -120981,7 +120971,7 @@ } } diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php -index 9610ac8c9f..501c541d82 100644 +index 9610ac8c9f..5ad580a27b 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -13,7 +13,7 @@ @@ -121122,9 +121112,8 @@ + array( 'taxonomy' => $custom_taxonomies, 'get' => 'all', -- ) + ) - ); -+ ) +); // Put categories in order with no child going before its parent. @@ -121627,7 +121616,7 @@ diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php -index c3863ba2ea..bee98217b8 100644 +index c3863ba2ea..9cb71d3379 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -13,56 +13,56 @@ @@ -122025,11 +122014,12 @@ if ( $theme->errors() && 'theme_no_stylesheet' === $theme->errors()->get_error_code() ) { - return new WP_Error( -+return new WP_Error( - 'theme_no_stylesheet', +- 'theme_no_stylesheet', - __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() - ); -+ __('The requested theme does not exist.') . ' ' . $theme->errors()->get_error_message() ++return new WP_Error( ++ 'theme_no_stylesheet', ++ __('The requested theme does not exist.') . ' ' . $theme->errors()->get_error_message() +); } @@ -122167,16 +122157,17 @@ - $url = add_query_arg( compact( 'plugin', 'file' ), admin_url( 'plugin-editor.php' ) ); - } elseif ( isset( $stylesheet ) ) { - $url = add_query_arg( +- array( + $url = add_query_arg(compact('plugin', 'file'), admin_url('plugin-editor.php')); + } elseif ( isset($stylesheet) ) { +$url = add_query_arg( - array( ++ array( 'theme' => $stylesheet, 'file' => $file, ), - admin_url( 'theme-editor.php' ) - ); -+ admin_url('theme-editor.php') ++ admin_url('theme-editor.php') +); } else { $url = admin_url(); @@ -122430,20 +122421,23 @@ +sprintf( /* translators: 1: upload_max_filesize, 2: php.ini */ - __( 'The uploaded file exceeds the %1$s directive in %2$s.' ), -+ __('The uploaded file exceeds the %1$s directive in %2$s.'), - 'upload_max_filesize', - 'php.ini' +- 'upload_max_filesize', +- 'php.ini' - ), - sprintf( ++ __('The uploaded file exceeds the %1$s directive in %2$s.'), ++ 'upload_max_filesize', ++ 'php.ini' +), +sprintf( /* translators: %s: MAX_FILE_SIZE */ - __( 'The uploaded file exceeds the %s directive that was specified in the HTML form.' ), -+ __('The uploaded file exceeds the %s directive that was specified in the HTML form.'), - 'MAX_FILE_SIZE' +- 'MAX_FILE_SIZE' - ), - __( 'The uploaded file was only partially uploaded.' ), - __( 'No file was uploaded.' ), ++ __('The uploaded file exceeds the %s directive that was specified in the HTML form.'), ++ 'MAX_FILE_SIZE' +), + __('The uploaded file was only partially uploaded.'), + __('No file was uploaded.'), @@ -122503,11 +122497,14 @@ +$error_msg = sprintf( /* translators: 1: php.ini, 2: post_max_size, 3: upload_max_filesize */ - __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.' ), -+ __('File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.'), - 'php.ini', - 'post_max_size', - 'upload_max_filesize' -- ); +- 'php.ini', +- 'post_max_size', +- 'upload_max_filesize' +- ); ++ __('File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.'), ++ 'php.ini', ++ 'post_max_size', ++ 'upload_max_filesize' +); } @@ -122585,16 +122582,19 @@ } - return $upload_error_handler( +- $file, +- sprintf( +return $upload_error_handler( - $file, - sprintf( ++ $file, ++ sprintf( /* translators: %s: Destination file path. */ - __( 'The uploaded file could not be moved to %s.' ), - $error_path +- ) +- ); + __('The uploaded file could not be moved to %s.'), + $error_path - ) -- ); ++ ) +); } } @@ -122622,19 +122622,15 @@ - return apply_filters( - 'wp_handle_upload', - array( -- 'file' => $new_file, -- 'url' => $url, -- 'type' => $type, -- ), -- 'wp_handle_sideload' === $action ? 'sideload' : 'upload' -- ); +return apply_filters( + 'wp_handle_upload', + array( -+ 'file' => $new_file, -+ 'url' => $url, -+ 'type' => $type, -+ ), + 'file' => $new_file, + 'url' => $url, + 'type' => $type, + ), +- 'wp_handle_sideload' === $action ? 'sideload' : 'upload' +- ); + 'wp_handle_sideload' === $action ? 'sideload' : 'upload' +); } @@ -122695,18 +122691,14 @@ - $response = wp_safe_remote_get( - $url, - array( -- 'timeout' => $timeout, -- 'stream' => true, -- 'filename' => $tmpfname, -- ) -- ); +$response = wp_safe_remote_get( + $url, + array( -+ 'timeout' => $timeout, -+ 'stream' => true, -+ 'filename' => $tmpfname, -+ ) + 'timeout' => $timeout, + 'stream' => true, + 'filename' => $tmpfname, + ) +- ); +); - if ( is_wp_error( $response ) ) { @@ -122841,13 +122833,12 @@ $signature_request = wp_safe_remote_get( - $signature_url, - array( -- 'limit_response_size' => 10 * KB_IN_BYTES, // 10KB should be large enough for quite a few signatures. -- ) + $signature_url, + array( -+ 'limit_response_size' => 10 * KB_IN_BYTES, // 10KB should be large enough for quite a few signatures. -+ ) - ); + 'limit_response_size' => 10 * KB_IN_BYTES, // 10KB should be large enough for quite a few signatures. + ) +- ); ++ ); - if ( ! is_wp_error( $signature_request ) && 200 === wp_remote_retrieve_response_code( $signature_request ) ) { - $signature = explode( "\n", wp_remote_retrieve_body( $signature_request ) ); @@ -122909,16 +122900,15 @@ - return new WP_Error( - 'md5_mismatch', - sprintf( -- /* translators: 1: File checksum, 2: Expected checksum value. */ ++return new WP_Error( ++ 'md5_mismatch', ++ sprintf( + /* translators: 1: File checksum, 2: Expected checksum value. */ - __( 'The checksum of the file (%1$s) does not match the expected checksum value (%2$s).' ), - bin2hex( $file_md5 ), - bin2hex( $expected_raw_md5 ) - ) - ); -+return new WP_Error( -+ 'md5_mismatch', -+ sprintf( -+ /* translators: 1: File checksum, 2: Expected checksum value. */ + __('The checksum of the file (%1$s) does not match the expected checksum value (%2$s).'), + bin2hex($file_md5), + bin2hex($expected_raw_md5) @@ -122987,10 +122977,9 @@ + array( 'php' => PHP_VERSION, - 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), -- ) -- ); + 'sodium' => defined('SODIUM_LIBRARY_VERSION') ? SODIUM_LIBRARY_VERSION : ( defined('ParagonIE_Sodium_Compat::VERSION_STRING') ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), -+ ) + ) +- ); +); } @@ -123019,16 +123008,20 @@ */ if ( ! $sodium_compat_is_fast ) { - return new WP_Error( +- 'signature_verification_unsupported', +- sprintf( +return new WP_Error( - 'signature_verification_unsupported', - sprintf( ++ 'signature_verification_unsupported', ++ sprintf( /* translators: %s: The filename of the package. */ - __( 'The authenticity of %s could not be verified as signature verification is unavailable on this system.' ), - '' . esc_html( $filename_for_errors ) . '' +- ), +- array( + __('The authenticity of %s could not be verified as signature verification is unavailable on this system.'), + '' . esc_html($filename_for_errors) . '' - ), - array( ++ ), ++ array( 'php' => PHP_VERSION, - 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), + 'sodium' => defined('SODIUM_LIBRARY_VERSION') ? SODIUM_LIBRARY_VERSION : ( defined('ParagonIE_Sodium_Compat::VERSION_STRING') ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), @@ -123058,9 +123051,8 @@ + ), + array( 'filename' => $filename_for_errors, -- ) + ) - ); -+ ) +); } @@ -123107,40 +123099,31 @@ - return new WP_Error( - 'signature_verification_failed', - sprintf( -- /* translators: %s: The filename of the package. */ ++return new WP_Error( ++ 'signature_verification_failed', ++ sprintf( + /* translators: %s: The filename of the package. */ - __( 'The authenticity of %s could not be verified.' ), - '' . esc_html( $filename_for_errors ) . '' - ), - // Error data helpful for debugging: -- array( -- 'filename' => $filename_for_errors, -- 'keys' => $trusted_keys, -- 'signatures' => $signatures, -- 'hash' => bin2hex( $file_hash ), -- 'skipped_key' => $skipped_key, -- 'skipped_sig' => $skipped_signature, -- 'php' => PHP_VERSION, -- 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), -- ) -- ); -+return new WP_Error( -+ 'signature_verification_failed', -+ sprintf( -+ /* translators: %s: The filename of the package. */ + __('The authenticity of %s could not be verified.'), + '' . esc_html($filename_for_errors) . '' + ), + // Error data helpful for debugging: -+ array( -+ 'filename' => $filename_for_errors, -+ 'keys' => $trusted_keys, -+ 'signatures' => $signatures, -+ 'hash' => bin2hex($file_hash), -+ 'skipped_key' => $skipped_key, -+ 'skipped_sig' => $skipped_signature, -+ 'php' => PHP_VERSION, -+ 'sodium' => defined('SODIUM_LIBRARY_VERSION') ? SODIUM_LIBRARY_VERSION : ( defined('ParagonIE_Sodium_Compat::VERSION_STRING') ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), -+ ) + array( + 'filename' => $filename_for_errors, + 'keys' => $trusted_keys, + 'signatures' => $signatures, +- 'hash' => bin2hex( $file_hash ), ++ 'hash' => bin2hex($file_hash), + 'skipped_key' => $skipped_key, + 'skipped_sig' => $skipped_signature, + 'php' => PHP_VERSION, +- 'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), ++ 'sodium' => defined('SODIUM_LIBRARY_VERSION') ? SODIUM_LIBRARY_VERSION : ( defined('ParagonIE_Sodium_Compat::VERSION_STRING') ? ParagonIE_Sodium_Compat::VERSION_STRING : false ), + ) +- ); +); } @@ -123281,13 +123264,14 @@ if ( $available_space && ( $required_space > $available_space ) ) { $z->close(); - return new WP_Error( -+return new WP_Error( - 'disk_full_unzip_file', +- 'disk_full_unzip_file', - __( 'Could not copy files. You may have run out of disk space.' ), - compact( 'uncompressed_size', 'available_space' ) - ); -+ __('Could not copy files. You may have run out of disk space.'), -+ compact('uncompressed_size', 'available_space') ++return new WP_Error( ++ 'disk_full_unzip_file', ++ __('Could not copy files. You may have run out of disk space.'), ++ compact('uncompressed_size', 'available_space') +); } } @@ -123454,13 +123438,14 @@ if ( $available_space && ( $required_space > $available_space ) ) { - return new WP_Error( -+return new WP_Error( - 'disk_full_unzip_file', +- 'disk_full_unzip_file', - __( 'Could not copy files. You may have run out of disk space.' ), - compact( 'uncompressed_size', 'available_space' ) - ); -+ __('Could not copy files. You may have run out of disk space.'), -+ compact('uncompressed_size', 'available_space') ++return new WP_Error( ++ 'disk_full_unzip_file', ++ __('Could not copy files. You may have run out of disk space.'), ++ compact('uncompressed_size', 'available_space') +); } } @@ -123862,16 +123847,13 @@ - $credentials = get_option( - 'ftp_credentials', - array( -- 'hostname' => '', -- 'username' => '', -- ) -- ); +$credentials = get_option( + 'ftp_credentials', + array( -+ 'hostname' => '', -+ 'username' => '', -+ ) + 'hostname' => '', + 'username' => '', + ) +- ); +); - $submitted_form = wp_unslash( $_POST ); @@ -124012,9 +123994,8 @@ + array( 'id' => 'message', 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) +); } @@ -124265,10 +124246,11 @@ +$error_message = sprintf( /* translators: %s: The function name. */ - __( '%s expects a non-empty string.' ), -+ __('%s expects a non-empty string.'), - 'wp_opcache_invalidate_directory()' +- 'wp_opcache_invalidate_directory()' - ); - trigger_error( $error_message ); ++ __('%s expects a non-empty string.'), ++ 'wp_opcache_invalidate_directory()' +); + trigger_error($error_message); } @@ -124306,7 +124288,7 @@ + $invalidate_directory($dirlist, $dir); } diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php -index 739b09f9a1..50baeba268 100644 +index 739b09f9a1..80dccea58d 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -16,31 +16,31 @@ @@ -124377,9 +124359,10 @@ get_post_mime_type( $post_id ), ++if ( wp_image_editor_supports( ++ array( + 'mime_type' => get_post_mime_type($post_id), 'methods' => array( 'rotate' ), ) @@ -124466,9 +124449,10 @@ + printf( /* translators: %s: Image width and height in pixels. */ - __( 'Original dimensions %s' ), -+ __('Original dimensions %s'), - '' . $meta['width'] . ' × ' . $meta['height'] . '' +- '' . $meta['width'] . ' × ' . $meta['height'] . '' - ); ++ __('Original dimensions %s'), ++ '' . $meta['width'] . ' × ' . $meta['height'] . '' + ); ?>

    @@ -125435,7 +125419,7 @@ return $return; } diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php -index d60ec8508b..b8fecbfc15 100644 +index d60ec8508b..decc7cc1f8 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -24,48 +24,48 @@ @@ -125920,14 +125904,12 @@ 'fields' => 'ids', 'post_type' => 'attachment', 'post_mime_type' => $metadata['image']['mime'], -@@ -531,12 +531,12 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) { - 'posts_per_page' => 1, +@@ -532,11 +532,11 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) { 'meta_key' => '_cover_hash', 'meta_value' => $hash, -- ) + ) - ); - $exists = reset( $posts ); -+ ) +); + $exists = reset($posts); @@ -126573,7 +126555,7 @@ } } else { diff --git a/wp-admin/includes/import.php b/wp-admin/includes/import.php -index 87ee00e5f7..c3ab26e39e 100644 +index 87ee00e5f7..b221f81e13 100644 --- a/wp-admin/includes/import.php +++ b/wp-admin/includes/import.php @@ -16,8 +16,8 @@ @@ -126625,11 +126607,14 @@ +'error' => sprintf( /* translators: 1: php.ini, 2: post_max_size, 3: upload_max_filesize */ - __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.' ), -+ __('File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.'), - 'php.ini', - 'post_max_size', - 'upload_max_filesize' -- ), +- 'php.ini', +- 'post_max_size', +- 'upload_max_filesize' +- ), ++ __('File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your %1$s file or by %2$s being defined as smaller than %3$s in %1$s.'), ++ 'php.ini', ++ 'post_max_size', ++ 'upload_max_filesize' +), ); } @@ -126685,11 +126670,10 @@ + array( 'locale' => $locale, 'version' => $wp_version, -- ), + ), - 'http://api.wordpress.org/core/importers/1.1/' - ); - $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ) ); -+ ), + 'http://api.wordpress.org/core/importers/1.1/' +); + $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url('/') ); @@ -126850,7 +126834,7 @@ + $wp_list_table->print_column_headers($with_id); } diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php -index 57df2bcbff..5bd218e3f2 100644 +index 57df2bcbff..1677d08fb8 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -15,10 +15,10 @@ @@ -126929,16 +126913,17 @@ } foreach ( $tabs as $callback => $text ) { -@@ -97,7 +97,7 @@ function the_media_upload_tabs() { +@@ -97,17 +97,17 @@ function the_media_upload_tabs() { $class = " class='current'"; } - $href = add_query_arg( +- array( +$href = add_query_arg( - array( ++ array( 'tab' => $callback, 's' => false, -@@ -105,9 +105,9 @@ function the_media_upload_tabs() { + 'paged' => false, 'post_mime_type' => false, 'm' => false, ) @@ -127054,7 +127039,7 @@ false ) ) { @@ -127215,24 +127200,17 @@ // Construct the attachment array. - $attachment = array_merge( - array( -- 'post_mime_type' => $type, -- 'guid' => $url, -- 'post_parent' => $post_id, -- 'post_title' => $title, -- 'post_content' => $content, -- 'post_excerpt' => $excerpt, -- ), -- $post_data -- ); +$attachment = array_merge( + array( -+ 'post_mime_type' => $type, -+ 'guid' => $url, -+ 'post_parent' => $post_id, -+ 'post_title' => $title, -+ 'post_content' => $content, -+ 'post_excerpt' => $excerpt, -+ ), + 'post_mime_type' => $type, + 'guid' => $url, + 'post_parent' => $post_id, +@@ -412,29 +412,29 @@ function media_handle_upload( $file_id, $post_id, $post_data = array(), $overrid + 'post_content' => $content, + 'post_excerpt' => $excerpt, + ), +- $post_data +- ); + $post_data +); @@ -127323,22 +127301,16 @@ // Construct the attachment array. - $attachment = array_merge( - array( -- 'post_mime_type' => $type, -- 'guid' => $url, -- 'post_parent' => $post_id, -- 'post_title' => $title, -- 'post_content' => $content, -- ), -- $post_data -- ); +$attachment = array_merge( + array( -+ 'post_mime_type' => $type, -+ 'guid' => $url, -+ 'post_parent' => $post_id, -+ 'post_title' => $title, -+ 'post_content' => $content, -+ ), + 'post_mime_type' => $type, + 'guid' => $url, + 'post_parent' => $post_id, + 'post_title' => $title, + 'post_content' => $content, + ), +- $post_data +- ); + $post_data +); @@ -128002,16 +127974,15 @@ - 'medium' => __( 'Medium' ), - 'large' => __( 'Large' ), - 'full' => __( 'Full Size' ), -- ) -- ); +$size_names = apply_filters( + 'image_size_names_choose', + array( -+ 'thumbnail' => __('Thumbnail'), -+ 'medium' => __('Medium'), -+ 'large' => __('Large'), -+ 'full' => __('Full Size'), -+ ) ++ 'thumbnail' => __('Thumbnail'), ++ 'medium' => __('Medium'), ++ 'large' => __('Large'), ++ 'full' => __('Full Size'), + ) +- ); +); - if ( empty( $check ) ) { @@ -128300,8 +128271,9 @@ $attachments = array( $post->ID => $post ); } else { - $attachments = get_children( +- array( +$attachments = get_children( - array( ++ array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'orderby' => 'menu_order ASC, ID', @@ -129250,9 +129222,8 @@ + array( 'id' => 'save-all', 'style' => 'display: none;', -- ) + ) - ); -+ ) +); ?> @@ -129431,19 +129402,15 @@ - $type_links[] = '
  • ' . __( 'All Types' ) . ''; +$type_links[] = '
  • ' . __( 'All Types' ) . ''; + ) +) . '"' . $class . '>' . __('All Types') . ''; foreach ( $post_mime_types as $mime_type => $label ) { @@ -129460,18 +129427,17 @@ } - $type_links[] = '
  • $mime_type, -- 'paged' => false, -- ) ++$type_links[] = '
  • ' . sprintf( translate_nooped_plural( $label[2], $num_posts[ $mime_type ] ), '' . number_format_i18n( $num_posts[ $mime_type ] ) . '' ) . ''; ++ ) +) . '"' . $class . '>' . sprintf(translate_nooped_plural($label[2], $num_posts[ $mime_type ]), '' . number_format_i18n($num_posts[ $mime_type ]) . '') . ''; } /** @@ -129504,9 +129470,8 @@ + 'next_text' => __('»'), + 'total' => ceil($wp_query->found_posts / 10), 'current' => $q['paged'], -- ) + ) - ); -+ ) +); if ( $page_links ) { @@ -129937,7 +129902,7 @@ + sprintf( + ' %s', + /* translators: Hidden accessibility text. */ -+ __('(opens in a new tab)') ++ __('(opens in a new tab)') + ) +); @@ -130965,7 +130930,7 @@ -$menu = add_menu_classes( $menu ); +$menu = add_menu_classes($menu); diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php -index 387910e918..4f4c97fd5f 100644 +index 387910e918..77612dcb07 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -32,8 +32,8 @@ function post_submit_meta_box( $post, $args = array() ) { @@ -130979,7 +130944,7 @@ ?>
    -@@ -41,43 +41,43 @@ function post_submit_meta_box( $post, $args = array() ) { +@@ -41,44 +41,44 @@ function post_submit_meta_box( $post, $args = array() ) {
    @@ -131028,13 +130993,15 @@ - $preview_button_text, - /* translators: Hidden accessibility text. */ - __( '(opens in a new tab)' ) +- ); + '%1$s %2$s', + $preview_button_text, + /* translators: Hidden accessibility text. */ -+ __('(opens in a new tab)') - ); ++ __('(opens in a new tab)') ++ ); ?> + @@ -94,32 +94,32 @@ function post_submit_meta_box( $post, $args = array() ) { * * @param WP_Post $post WP_Post object for the current post. @@ -131241,25 +131208,27 @@ + $stamp = __('Publish on: %s'); } - $date = sprintf( -+$date = sprintf( - $date_string, +- $date_string, - date_i18n( $date_format, strtotime( $post->post_date ) ), - date_i18n( $time_format, strtotime( $post->post_date ) ) - ); -+ date_i18n($date_format, strtotime($post->post_date)), -+ date_i18n($time_format, strtotime($post->post_date)) ++$date = sprintf( ++ $date_string, ++ date_i18n($date_format, strtotime($post->post_date)), ++ date_i18n($time_format, strtotime($post->post_date)) +); } else { // Draft (no saves, and thus no date specified). - $stamp = __( 'Publish immediately' ); - $date = sprintf( -+ $stamp = __('Publish immediately'); -+$date = sprintf( - $date_string, +- $date_string, - date_i18n( $date_format, strtotime( current_time( 'mysql' ) ) ), - date_i18n( $time_format, strtotime( current_time( 'mysql' ) ) ) - ); -+ date_i18n($date_format, strtotime(current_time('mysql'))), -+ date_i18n($time_format, strtotime(current_time('mysql'))) ++ $stamp = __('Publish immediately'); ++$date = sprintf( ++ $date_string, ++ date_i18n($date_format, strtotime(current_time('mysql'))), ++ date_i18n($time_format, strtotime(current_time('mysql'))) +); } @@ -131320,25 +131289,29 @@ +$message = sprintf( /* translators: %s: URL to the Customizer. */ - __( 'This draft comes from your unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ), -+ __('This draft comes from your unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.'), - esc_url( +- esc_url( - add_query_arg( - 'changeset_uuid', - rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ), - admin_url( 'customize.php' ) - ) +- ) +- ); +- wp_admin_notice( +- $message, +- array( ++ __('This draft comes from your unpublished customization changes. You can edit, but there is no need to publish now. It will be published automatically with those changes.'), ++ esc_url( + add_query_arg( + 'changeset_uuid', + rawurlencode(get_post_meta($post_id, '_customize_changeset_uuid', true)), + admin_url('customize.php') + ) - ) -- ); -- wp_admin_notice( ++ ) +); +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'info', 'additional_classes' => array( 'notice-alt', 'inline' ), ) @@ -131437,13 +131410,15 @@ +$uploaded_on = sprintf( /* translators: Publish box date string. 1: Date, 2: Time. */ - __( '%1$s at %2$s' ), -+ __('%1$s at %2$s'), - /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ +- /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ - date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $post->post_date ) ), -+ date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)), - /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ +- /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ - date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $post->post_date ) ) - ); ++ __('%1$s at %2$s'), ++ /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ ++ date_i18n(_x('M j, Y', 'publish box date format'), strtotime($post->post_date)), ++ /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ + date_i18n(_x('H:i', 'publish box time format'), strtotime($post->post_date)) +); /* translators: Attachment information. %s: Date the attachment was uploaded. */ @@ -131469,26 +131444,29 @@ + if ( current_user_can('delete_post', $post->ID) ) { if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { - printf( -+printf( - '%2$s', +- '%2$s', - get_delete_post_link( $post->ID ), - __( 'Move to Trash' ) - ); -+ get_delete_post_link($post->ID), -+ __('Move to Trash') ++printf( ++ '%2$s', ++ get_delete_post_link($post->ID), ++ __('Move to Trash') +); } else { $show_confirmation = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; - printf( -+printf( - '%3$s', - $show_confirmation, +- '%3$s', +- $show_confirmation, - get_delete_post_link( $post->ID, '', true ), - __( 'Delete permanently' ) - ); -+ get_delete_post_link($post->ID, '', true), -+ __('Delete permanently') ++printf( ++ '%3$s', ++ $show_confirmation, ++ get_delete_post_link($post->ID, '', true), ++ __('Delete permanently') +); } } @@ -131626,15 +131604,13 @@ wp_terms_checklist( - $post->ID, - array( -- 'taxonomy' => $tax_name, -- 'popular_cats' => $popular_ids, -- ) + $post->ID, + array( -+ 'taxonomy' => $tax_name, -+ 'popular_cats' => $popular_ids, -+ ) - ); + 'taxonomy' => $tax_name, + 'popular_cats' => $popular_ids, + ) +- ); ++ ); ?>
    @@ -131825,19 +131801,15 @@ - $total = get_comments( - array( -- 'post_id' => $post->ID, -- 'count' => true, -- 'orderby' => 'none', -- ) ++$total = get_comments( ++ array( + 'post_id' => $post->ID, + 'count' => true, + 'orderby' => 'none', + ) - ); - $wp_list_table = _get_list_table( 'WP_Post_Comments_List_Table' ); - $wp_list_table->display( true ); -+$total = get_comments( -+ array( -+ 'post_id' => $post->ID, -+ 'count' => true, -+ 'orderby' => 'none', -+ ) +); + $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); + $wp_list_table->display(true); @@ -131896,21 +131868,16 @@ array( $post_type_object->cap->edit_posts ), -- 'name' => 'post_author_override', -- 'selected' => empty( $post->ID ) ? $user_ID : $post->post_author, -- 'include_selected' => true, -- 'show' => 'display_name_with_login', -- ) -- ); +wp_dropdown_users( + array( -+ 'capability' => array( $post_type_object->cap->edit_posts ), -+ 'name' => 'post_author_override', -+ 'selected' => empty($post->ID) ? $user_ID : $post->post_author, -+ 'include_selected' => true, -+ 'show' => 'display_name_with_login', -+ ) + 'capability' => array( $post_type_object->cap->edit_posts ), + 'name' => 'post_author_override', +- 'selected' => empty( $post->ID ) ? $user_ID : $post->post_author, ++ 'selected' => empty($post->ID) ? $user_ID : $post->post_author, + 'include_selected' => true, + 'show' => 'display_name_with_login', + ) +- ); +); } @@ -132060,7 +132027,7 @@ + '%s', + wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id), + /* translators: %s: Link name. */ -+ esc_js(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name)), ++ esc_js(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name)), + __('Delete') +); } @@ -132588,9 +132555,8 @@ + array( 'taxonomy' => $tax_name, '__back_compat_meta_box' => true, -- ) + ) - ); -+ ) +); } @@ -132639,9 +132605,8 @@ + array( + '__back_compat_meta_box' => ! (bool) get_user_meta(get_current_user_id(), 'enable_custom_fields', true), '__block_editor_compatible_meta_box' => true, -- ) + ) - ); -+ ) +); } @@ -132729,7 +132694,7 @@ + do_action('do_meta_boxes', $post_type, 'side', $post); } diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php -index 3f48065cdf..8592a72499 100644 +index 3f48065cdf..85a6c41048 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -14,7 +14,7 @@ @@ -133081,14 +133046,13 @@ - array( - 'file' => rawurlencode( $tree ), - 'theme' => rawurlencode( $stylesheet ), -- ), -- self_admin_url( 'theme-editor.php' ) -- ); +$url = add_query_arg( + array( + 'file' => rawurlencode($tree), + 'theme' => rawurlencode($stylesheet), -+ ), + ), +- self_admin_url( 'theme-editor.php' ) +- ); + self_admin_url('theme-editor.php') +); ?> @@ -133169,14 +133133,13 @@ - array( - 'file' => rawurlencode( $tree ), - 'plugin' => rawurlencode( $plugin ), -- ), -- self_admin_url( 'plugin-editor.php' ) -- ); +$url = add_query_arg( + array( + 'file' => rawurlencode($tree), + 'plugin' => rawurlencode($plugin), -+ ), + ), +- self_admin_url( 'plugin-editor.php' ) +- ); + self_admin_url('plugin-editor.php') +); ?> @@ -133594,20 +133557,16 @@ - $_wp_admin_css_colors = array_filter( - array_merge( - array( -- 'fresh' => '', -- 'light' => '', -- 'modern' => '', -- ), -- $_wp_admin_css_colors -- ) -- ); +$_wp_admin_css_colors = array_filter( + array_merge( + array( -+ 'fresh' => '', -+ 'light' => '', -+ 'modern' => '', -+ ), + 'fresh' => '', + 'light' => '', + 'modern' => '', + ), +- $_wp_admin_css_colors +- ) +- ); + $_wp_admin_css_colors + ) +); @@ -134171,7 +134130,7 @@ +add_action('add_site_option_new_admin_email', 'update_network_option_new_admin_email', 10, 2); +add_action('update_site_option_new_admin_email', 'update_network_option_new_admin_email', 10, 2); diff --git a/wp-admin/includes/ms-deprecated.php b/wp-admin/includes/ms-deprecated.php -index 519159b61b..1e6fcd62ce 100644 +index 519159b61b..e8a9e3696d 100644 --- a/wp-admin/includes/ms-deprecated.php +++ b/wp-admin/includes/ms-deprecated.php @@ -16,7 +16,7 @@ @@ -134192,13 +134151,12 @@ if ( ! is_upload_space_available() ) { - wp_die( sprintf( -- /* translators: %s: Allowed space allocation. */ ++wp_die( ++ sprintf( + /* translators: %s: Allowed space allocation. */ - __( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ), - size_format( get_space_allowed() * MB_IN_BYTES ) - ) ); -+wp_die( -+ sprintf( -+ /* translators: %s: Allowed space allocation. */ + __('Sorry, you have used your space allocation of %s. Please delete some files to upload more files.'), + size_format(get_space_allowed() * MB_IN_BYTES) + ) @@ -134294,7 +134252,7 @@ return $term; } diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php -index 02ddf945aa..ac3661bdaa 100644 +index 02ddf945aa..5e7da94e8a 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -16,7 +16,7 @@ @@ -134392,9 +134350,8 @@ + array( 'blog_id' => $blog_id, 'fields' => 'ids', -- ) + ) - ); -+ ) +); // Remove users from this blog. @@ -134522,8 +134479,8 @@ - __( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ), - size_format( $space_allowed * MB_IN_BYTES ) - ); -+ __('Sorry, you have used your space allocation of %s. Please delete some files to upload more files.'), -+ size_format($space_allowed * MB_IN_BYTES) ++ __('Sorry, you have used your space allocation of %s. Please delete some files to upload more files.'), ++ size_format($space_allowed * MB_IN_BYTES) +); } return true; @@ -134785,9 +134742,8 @@ 'type' => 'warning', 'additional_classes' => array( 'update-nag', 'inline' ), 'paragraph_wrap' => false, -- ) + ) - ); -+ ) +); } } @@ -134928,32 +134884,32 @@ + if ( ! current_user_can('delete_user', $delete_user->ID) ) { wp_die( - sprintf( -- /* translators: %s: User login. */ ++ sprintf( + /* translators: %s: User login. */ - __( 'Warning! User %s cannot be deleted.' ), - $delete_user->user_login - ) -+ sprintf( -+ /* translators: %s: User login. */ +- ); + __('Warning! User %s cannot be deleted.'), + $delete_user->user_login + ) - ); ++ ); } - if ( in_array( $delete_user->user_login, $site_admins, true ) ) { + if ( in_array($delete_user->user_login, $site_admins, true) ) { wp_die( - sprintf( -- /* translators: %s: User login. */ ++ sprintf( + /* translators: %s: User login. */ - __( 'Warning! User cannot be deleted. The user %s is a network administrator.' ), - '' . $delete_user->user_login . '' - ) -+ sprintf( -+ /* translators: %s: User login. */ +- ); + __('Warning! User cannot be deleted. The user %s is a network administrator.'), + '' . $delete_user->user_login . '' + ) - ); ++ ); } ?>
  • ' . -- '

    ', ++printf( ++ '

    ' . + '

    ', - $active_class, - esc_attr( $plugin_slug . '-update' ), - esc_attr( $plugin_slug ), @@ -151746,10 +151641,6 @@ - - if ( ! current_user_can( 'update_plugins' ) ) { - printf( -+printf( -+ '

    ' . -+ '

    ', + $active_class, + esc_attr($plugin_slug . '-update'), + esc_attr($plugin_slug), @@ -151762,43 +151653,49 @@ +printf( /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */ - __( 'There is a new version of %1$s available. View version %4$s details.' ), -+ __('There is a new version of %1$s available. View version %4$s details.'), - $plugin_name, +- $plugin_name, - esc_url( $details_url ), -+ esc_url($details_url), - sprintf( +- sprintf( - 'class="thickbox open-plugin-details-modal" aria-label="%s"', - /* translators: 1: Plugin name, 2: Version number. */ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) -+ 'class="thickbox open-plugin-details-modal" aria-label="%s"', -+ /* translators: 1: Plugin name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) - ), +- ), - esc_attr( $response->new_version ) - ); - } elseif ( empty( $response->package ) ) { - printf( -+ esc_attr($response->new_version) ++ __('There is a new version of %1$s available. View version %4$s details.'), ++ $plugin_name, ++ esc_url($details_url), ++ sprintf( ++ 'class="thickbox open-plugin-details-modal" aria-label="%s"', ++ /* translators: 1: Plugin name, 2: Version number. */ ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) ++ ), ++ esc_attr($response->new_version) +); + } elseif ( empty($response->package) ) { +printf( /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */ - __( 'There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this plugin.' ), -+ __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this plugin.'), - $plugin_name, +- $plugin_name, - esc_url( $details_url ), -+ esc_url($details_url), - sprintf( +- sprintf( - 'class="thickbox open-plugin-details-modal" aria-label="%s"', - /* translators: 1: Plugin name, 2: Version number. */ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) ) -+ 'class="thickbox open-plugin-details-modal" aria-label="%s"', -+ /* translators: 1: Plugin name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) - ), +- ), - esc_attr( $response->new_version ) - ); -+ esc_attr($response->new_version) ++ __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this plugin.'), ++ $plugin_name, ++ esc_url($details_url), ++ sprintf( ++ 'class="thickbox open-plugin-details-modal" aria-label="%s"', ++ /* translators: 1: Plugin name, 2: Version number. */ ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) ++ ), ++ esc_attr($response->new_version) +); } else { if ( $compatible_php ) { @@ -151819,22 +151716,23 @@ - /* translators: %s: Plugin name. */ - esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $plugin_name ) ) - ) +- ); + __('There is a new version of %1$s available. View version %4$s details or update now.'), + $plugin_name, + esc_url($details_url), + sprintf( + 'class="thickbox open-plugin-details-modal" aria-label="%s"', + /* translators: 1: Plugin name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) + ), + esc_attr($response->new_version), + wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file), + sprintf( + 'class="update-link" aria-label="%s"', + /* translators: %s: Plugin name. */ -+ esc_attr(sprintf(_x('Update %s now', 'plugin'), $plugin_name)) ++ esc_attr(sprintf(_x('Update %s now', 'plugin'), $plugin_name)) + ) - ); ++ ); } else { printf( /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */ @@ -151848,18 +151746,19 @@ - ), - esc_attr( $response->new_version ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '
    ', '' ); + __('There is a new version of %1$s available, but it does not work with your version of PHP. View version %4$s details or learn more about updating PHP.'), + $plugin_name, + esc_url($details_url), + sprintf( + 'class="thickbox open-plugin-details-modal" aria-label="%s"', + /* translators: 1: Plugin name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version)) + ), + esc_attr($response->new_version), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '
    ', '' ); ++ ); + wp_update_php_annotation('
    ', ''); } } @@ -151932,18 +151831,14 @@ - $details_url = add_query_arg( - array( -- 'TB_iframe' => 'true', -- 'width' => 1024, -- 'height' => 800, -- ), -- $current->response[ $theme_key ]['url'] -- ); +$details_url = add_query_arg( + array( -+ 'TB_iframe' => 'true', -+ 'width' => 1024, -+ 'height' => 800, -+ ), + 'TB_iframe' => 'true', + 'width' => 1024, + 'height' => 800, + ), +- $current->response[ $theme_key ]['url'] +- ); + $current->response[ $theme_key ]['url'] +); @@ -151966,17 +151861,15 @@ - printf( - '

    ' . -- '

    ', ++printf( ++ '

    ' . + '

    ', - $active, - esc_attr( $theme->get_stylesheet() . '-update' ), - esc_attr( $theme->get_stylesheet() ), - $wp_list_table->get_column_count() - ); -+printf( -+ '

    ' . -+ '

    ', + $active, + esc_attr($theme->get_stylesheet() . '-update'), + esc_attr($theme->get_stylesheet()), @@ -151990,71 +151883,85 @@ +printf( /* translators: 1: Theme name, 2: Details URL, 3: Additional link attributes, 4: Version number. */ - __( 'There is a new version of %1$s available. View version %4$s details.' ), -+ __('There is a new version of %1$s available. View version %4$s details.'), - $theme['Name'], +- $theme['Name'], - esc_url( $details_url ), -+ esc_url($details_url), - sprintf( +- sprintf( - 'class="thickbox open-plugin-details-modal" aria-label="%s"', - /* translators: 1: Theme name, 2: Version number. */ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) ) -+ 'class="thickbox open-plugin-details-modal" aria-label="%s"', -+ /* translators: 1: Theme name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version'])) - ), - $response['new_version'] +- ), +- $response['new_version'] - ); - } elseif ( empty( $response['package'] ) ) { - printf( ++ __('There is a new version of %1$s available. View version %4$s details.'), ++ $theme['Name'], ++ esc_url($details_url), ++ sprintf( ++ 'class="thickbox open-plugin-details-modal" aria-label="%s"', ++ /* translators: 1: Theme name, 2: Version number. */ ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version'])) ++ ), ++ $response['new_version'] +); + } elseif ( empty($response['package']) ) { +printf( /* translators: 1: Theme name, 2: Details URL, 3: Additional link attributes, 4: Version number. */ - __( 'There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.' ), -+ __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.'), - $theme['Name'], +- $theme['Name'], - esc_url( $details_url ), -+ esc_url($details_url), - sprintf( +- sprintf( - 'class="thickbox open-plugin-details-modal" aria-label="%s"', - /* translators: 1: Theme name, 2: Version number. */ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) ) +- ), +- $response['new_version'] +- ); ++ __('There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.'), ++ $theme['Name'], ++ esc_url($details_url), ++ sprintf( + 'class="thickbox open-plugin-details-modal" aria-label="%s"', + /* translators: 1: Theme name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version'])) - ), - $response['new_version'] -- ); ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version'])) ++ ), ++ $response['new_version'] +); } else { - printf( +printf( /* translators: 1: Theme name, 2: Details URL, 3: Additional link attributes, 4: Version number, 5: Update URL, 6: Additional link attributes. */ - __( 'There is a new version of %1$s available. View version %4$s details or update now.' ), -+ __('There is a new version of %1$s available. View version %4$s details or update now.'), - $theme['Name'], +- $theme['Name'], - esc_url( $details_url ), -+ esc_url($details_url), - sprintf( +- sprintf( - 'class="thickbox open-plugin-details-modal" aria-label="%s"', - /* translators: 1: Theme name, 2: Version number. */ - esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $theme['Name'], $response['new_version'] ) ) -+ 'class="thickbox open-plugin-details-modal" aria-label="%s"', -+ /* translators: 1: Theme name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version'])) - ), - $response['new_version'], +- ), +- $response['new_version'], - wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ), -+ wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key), - sprintf( +- sprintf( - 'class="update-link" aria-label="%s"', - /* translators: %s: Theme name. */ - esc_attr( sprintf( _x( 'Update %s now', 'theme' ), $theme['Name'] ) ) +- ) +- ); ++ __('There is a new version of %1$s available. View version %4$s details or update now.'), ++ $theme['Name'], ++ esc_url($details_url), ++ sprintf( ++ 'class="thickbox open-plugin-details-modal" aria-label="%s"', ++ /* translators: 1: Theme name, 2: Version number. */ ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version'])) ++ ), ++ $response['new_version'], ++ wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key), ++ sprintf( + 'class="update-link" aria-label="%s"', + /* translators: %s: Theme name. */ -+ esc_attr(sprintf(_x('Update %s now', 'theme'), $theme['Name'])) - ) -- ); ++ esc_attr(sprintf(_x('Update %s now', 'theme'), $theme['Name'])) ++ ) +); } } else { @@ -152063,10 +151970,11 @@ +printf( /* translators: %s: Theme name. */ - __( 'There is a new version of %s available, but it does not work with your versions of WordPress and PHP.' ), -+ __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'), - $theme['Name'] +- $theme['Name'] - ); - if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { ++ __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'), ++ $theme['Name'] +); + if ( current_user_can('update_core') && current_user_can('update_php') ) { printf( @@ -152074,31 +151982,34 @@ - ' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ), - self_admin_url( 'update-core.php' ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '

    ', '' ); +- } elseif ( current_user_can( 'update_core' ) ) { + ' ' . __('Please update WordPress, and then learn more about updating PHP.'), + self_admin_url('update-core.php'), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '

    ', '' ); -- } elseif ( current_user_can( 'update_core' ) ) { ++ ); + wp_update_php_annotation('

    ', ''); + } elseif ( current_user_can('update_core') ) { printf( /* translators: %s: URL to WordPress Updates screen. */ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) +- ); +- } elseif ( current_user_can( 'update_php' ) ) { + ' ' . __('Please update WordPress.'), + self_admin_url('update-core.php') - ); -- } elseif ( current_user_can( 'update_php' ) ) { ++ ); + } elseif ( current_user_can('update_php') ) { printf( /* translators: %s: URL to Update PHP page. */ - ' ' . __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '

    ', '' ); + ' ' . __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '

    ', '' ); ++ ); + wp_update_php_annotation('

    ', ''); } } elseif ( ! $compatible_wp ) { @@ -152106,39 +152017,43 @@ +printf( /* translators: %s: Theme name. */ - __( 'There is a new version of %s available, but it does not work with your version of WordPress.' ), -+ __('There is a new version of %s available, but it does not work with your version of WordPress.'), - $theme['Name'] +- $theme['Name'] - ); - if ( current_user_can( 'update_core' ) ) { ++ __('There is a new version of %s available, but it does not work with your version of WordPress.'), ++ $theme['Name'] +); + if ( current_user_can('update_core') ) { printf( /* translators: %s: URL to WordPress Updates screen. */ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) +- ); + ' ' . __('Please update WordPress.'), + self_admin_url('update-core.php') - ); ++ ); } } elseif ( ! $compatible_php ) { - printf( +printf( /* translators: %s: Theme name. */ - __( 'There is a new version of %s available, but it does not work with your version of PHP.' ), -+ __('There is a new version of %s available, but it does not work with your version of PHP.'), - $theme['Name'] +- $theme['Name'] - ); - if ( current_user_can( 'update_php' ) ) { ++ __('There is a new version of %s available, but it does not work with your version of PHP.'), ++ $theme['Name'] +); + if ( current_user_can('update_php') ) { printf( /* translators: %s: URL to Update PHP page. */ - ' ' . __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '

    ', '' ); + ' ' . __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '

    ', '' ); ++ ); + wp_update_php_annotation('

    ', ''); } } @@ -152199,18 +152114,14 @@ - wp_admin_notice( - $msg, - array( -- 'type' => 'warning', -- 'additional_classes' => array( 'update-nag', 'inline' ), -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $msg, + array( -+ 'type' => 'warning', -+ 'additional_classes' => array( 'update-nag', 'inline' ), -+ 'paragraph_wrap' => false, -+ ) + 'type' => 'warning', + 'additional_classes' => array( 'update-nag', 'inline' ), + 'paragraph_wrap' => false, + ) +- ); +); } @@ -152376,24 +152287,26 @@ +$message = sprintf( /* translators: %s: Duration that WP-Cron has been overdue. */ - __( 'Automatic update overdue by %s. There may be a problem with WP-Cron.' ), -+ __('Automatic update overdue by %s. There may be a problem with WP-Cron.'), - $time_to_next_update +- $time_to_next_update - ); ++ __('Automatic update overdue by %s. There may be a problem with WP-Cron.'), ++ $time_to_next_update +); } else { - $message = sprintf( +$message = sprintf( /* translators: %s: Time until the next update. */ - __( 'Automatic update scheduled in %s.' ), -+ __('Automatic update scheduled in %s.'), - $time_to_next_update +- $time_to_next_update - ); ++ __('Automatic update scheduled in %s.'), ++ $time_to_next_update +); } } diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php -index cb3939108b..562e240c12 100644 +index cb3939108b..d06f51e59e 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -9,7 +9,7 @@ @@ -152554,12 +152467,11 @@ 'name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0, -- ) + ) - ); - $wpdb->insert( - $wpdb->term_taxonomy, - array( -+ ) +); +$wpdb->insert( + $wpdb->term_taxonomy, @@ -152569,9 +152481,8 @@ 'description' => '', 'parent' => 0, 'count' => 1, -- ) + ) - ); -+ ) +); $cat_tt_id = $wpdb->insert_id; @@ -152596,11 +152507,12 @@ } - $first_post = sprintf( -+$first_post = sprintf( - $first_post, +- $first_post, - sprintf( '%s', esc_url( network_home_url() ), get_network()->site_name ) - ); -+ sprintf('%s', esc_url(network_home_url()), get_network()->site_name) ++$first_post = sprintf( ++ $first_post, ++ sprintf('%s', esc_url(network_home_url()), get_network()->site_name) +); // Back-compat for pre-4.4. @@ -152635,13 +152547,11 @@ 'post_modified' => $now, 'post_modified_gmt' => $now_gmt, 'guid' => $first_post_guid, -@@ -230,44 +230,44 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : - 'to_ping' => '', +@@ -231,43 +231,43 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : 'pinged' => '', 'post_content_filtered' => '', -- ) + ) - ); -+ ) +); if ( is_multisite() ) { @@ -152656,9 +152566,8 @@ + array( 'term_taxonomy_id' => $cat_tt_id, 'object_id' => 1, -- ) + ) - ); -+ ) +); // Default comment. @@ -152703,13 +152612,11 @@ 'comment_post_ID' => 1, 'comment_author' => $first_comment_author, 'comment_author_email' => $first_comment_email, -@@ -276,57 +276,57 @@ Commenter avatars come from Gravatar.' - 'comment_date_gmt' => $now_gmt, +@@ -277,56 +277,56 @@ Commenter avatars come from Gravatar.' 'comment_content' => $first_comment, 'comment_type' => 'comment', -- ) + ) - ); -+ ) +); // First page. @@ -152749,9 +152656,10 @@ +$first_page .= sprintf( /* translators: First page content. %s: Site admin URL. */ - __( 'As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!' ), -+ __('As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!'), - admin_url() +- admin_url() - ); ++ __('As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!'), ++ admin_url() +); $first_page .= "

    \n"; } @@ -152778,16 +152686,14 @@ 'post_modified' => $now, 'post_modified_gmt' => $now_gmt, 'guid' => $first_post_guid, -@@ -334,33 +334,33 @@ Commenter avatars come from Gravatar.' - 'to_ping' => '', +@@ -335,43 +335,43 @@ Commenter avatars come from Gravatar.' 'pinged' => '', 'post_content_filtered' => '', -- ) + ) - ); - $wpdb->insert( - $wpdb->postmeta, - array( -+ ) +); +$wpdb->insert( + $wpdb->postmeta, @@ -152795,9 +152701,8 @@ 'post_id' => 2, 'meta_key' => '_wp_page_template', 'meta_value' => 'default', -- ) + ) - ); -+ ) +); // Privacy Policy page. @@ -152820,11 +152725,14 @@ + $privacy_policy_guid = get_option('home') . '/?page_id=3'; - $wpdb->insert( +- $wpdb->posts, +- array( +$wpdb->insert( - $wpdb->posts, - array( ++ $wpdb->posts, ++ array( 'post_author' => $user_id, -@@ -369,9 +369,9 @@ Commenter avatars come from Gravatar.' + 'post_date' => $now, + 'post_date_gmt' => $now_gmt, 'post_content' => $privacy_policy_content, 'post_excerpt' => '', 'comment_status' => 'closed', @@ -152842,10 +152750,12 @@ ) - ); - $wpdb->insert( +- $wpdb->postmeta, +- array( +); +$wpdb->insert( - $wpdb->postmeta, - array( ++ $wpdb->postmeta, ++ array( 'post_id' => 3, 'meta_key' => '_wp_page_template', 'meta_value' => 'default', @@ -152873,12 +152783,11 @@ + 5 => array( 'content' => '

    ' . __('Archives') . '

    ' ), + 6 => array( 'content' => '

    ' . __('Categories') . '

    ' ), '_multiwidget' => 1, -- ) + ) - ); - update_option( - 'sidebars_widgets', - array( -+ ) +); +update_option( + 'sidebars_widgets', @@ -152886,13 +152795,11 @@ 'wp_inactive_widgets' => array(), 'sidebar-1' => array( 0 => 'block-2', -@@ -419,13 +419,13 @@ Commenter avatars come from Gravatar.' - 1 => 'block-6', +@@ -420,12 +420,12 @@ Commenter avatars come from Gravatar.' ), 'array_version' => 3, -- ) + ) - ); -+ ) +); if ( ! is_multisite() ) { @@ -152905,7 +152812,7 @@ } if ( is_multisite() ) { -@@ -433,24 +433,24 @@ Commenter avatars come from Gravatar.' +@@ -433,25 +433,25 @@ Commenter avatars come from Gravatar.' $wp_rewrite->init(); $wp_rewrite->flush_rules(); @@ -152929,17 +152836,16 @@ $wpdb->delete( - $wpdb->usermeta, - array( -- 'user_id' => $user_id, -- 'meta_key' => $wpdb->base_prefix . '1_capabilities', -- ) + $wpdb->usermeta, + array( -+ 'user_id' => $user_id, -+ 'meta_key' => $wpdb->base_prefix . '1_capabilities', -+ ) - ); + 'user_id' => $user_id, + 'meta_key' => $wpdb->base_prefix . '1_capabilities', + ) +- ); ++ ); } } + } @@ -472,7 +472,7 @@ function wp_install_maybe_enable_pretty_permalinks() { global $wp_rewrite; @@ -153172,7 +153078,7 @@ } } -@@ -889,31 +889,31 @@ function upgrade_100() { +@@ -889,32 +889,32 @@ function upgrade_100() { SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/') WHERE option_name LIKE %s AND option_value LIKE %s"; @@ -153203,17 +153109,16 @@ $wpdb->insert( - $wpdb->post2cat, - array( -- 'post_id' => $post->ID, -- 'category_id' => $post->post_category, -- ) + $wpdb->post2cat, + array( -+ 'post_id' => $post->ID, -+ 'category_id' => $post->post_category, -+ ) - ); + 'post_id' => $post->ID, + 'category_id' => $post->post_category, + ) +- ); ++ ); } } + endif; @@ -932,13 +932,13 @@ function upgrade_101() { global $wpdb; @@ -153506,7 +153411,7 @@ } } -@@ -1192,9 +1192,9 @@ function upgrade_160() { +@@ -1192,21 +1192,21 @@ function upgrade_160() { * and put the mime type in post_type instead of post_mime_type. */ if ( $wp_current_db_version > 2541 && $wp_current_db_version <= 3091 ) { @@ -153514,15 +153419,18 @@ + $objects = $wpdb->get_results("SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'"); foreach ( $objects as $object ) { - $wpdb->update( +- $wpdb->posts, +- array( +$wpdb->update( - $wpdb->posts, - array( ++ $wpdb->posts, ++ array( 'post_status' => 'attachment', -@@ -1202,11 +1202,11 @@ function upgrade_160() { + 'post_mime_type' => $object->post_type, 'post_type' => '', ), - array( 'ID' => $object->ID ) +- array( 'ID' => $object->ID ) - ); ++ array( 'ID' => $object->ID ) +); - $meta = get_post_meta( $object->ID, 'imagedata', true ); @@ -153697,14 +153605,13 @@ + array( 'object_id' => $post_id, 'term_taxonomy_id' => $tt_id, -- ) + ) - ); -+ ) +); } // < 3570 we used linkcategories. >= 3570 we used categories and link2cat. -@@ -1390,30 +1390,30 @@ function upgrade_230() { +@@ -1390,104 +1390,104 @@ function upgrade_230() { $link_cat_id_map = array(); $default_link_cat = 0; $tt_ids = array(); @@ -153738,11 +153645,14 @@ $default_link_cat = $term_id; - $wpdb->insert( +- $wpdb->term_taxonomy, +- array( +$wpdb->insert( - $wpdb->term_taxonomy, - array( ++ $wpdb->term_taxonomy, ++ array( 'term_id' => $term_id, -@@ -1422,72 +1422,72 @@ function upgrade_230() { + 'taxonomy' => 'link_category', + 'description' => '', 'parent' => 0, 'count' => 0, ) @@ -153774,15 +153684,13 @@ $wpdb->insert( - $wpdb->term_relationships, - array( -- 'object_id' => $link->link_id, -- 'term_taxonomy_id' => $tt_id, -- ) + $wpdb->term_relationships, + array( -+ 'object_id' => $link->link_id, -+ 'term_taxonomy_id' => $tt_id, -+ ) - ); + 'object_id' => $link->link_id, + 'term_taxonomy_id' => $tt_id, + ) +- ); ++ ); } } @@ -153802,9 +153710,11 @@ continue; } - $wpdb->insert( +- $wpdb->term_relationships, +- array( +$wpdb->insert( - $wpdb->term_relationships, - array( ++ $wpdb->term_relationships, ++ array( 'object_id' => $link_id, 'term_taxonomy_id' => $tt_id, ) @@ -155074,7 +154984,7 @@ break; } -@@ -3035,10 +3035,10 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N +@@ -3035,59 +3035,59 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N // For every field in the table. foreach ( $tablefields as $tablefield ) { @@ -155084,15 +154994,18 @@ + $tablefield_type_lowercased = strtolower($tablefield->Type); - $tablefield_type_without_parentheses = preg_replace( +- '/' +$tablefield_type_without_parentheses = preg_replace( - '/' ++ '/' . '(.+)' // Field type, e.g. `int`. . '\(\d*\)' // Display width. -@@ -3046,48 +3046,48 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N + . '(.*)' // Optional attributes, e.g. `unsigned`. . '/', - '$1$2', - $tablefield_type_lowercased +- '$1$2', +- $tablefield_type_lowercased - ); ++ '$1$2', ++ $tablefield_type_lowercased +); // Get the type without attributes, e.g. `int`. @@ -155112,20 +155025,17 @@ $fieldtype_without_parentheses = preg_replace( - '/' -- . '(.+)' // Field type, e.g. `int`. -- . '\(\d*\)' // Display width. -- . '(.*)' // Optional attributes, e.g. `unsigned`. -- . '/', ++ '/' + . '(.+)' // Field type, e.g. `int`. + . '\(\d*\)' // Display width. + . '(.*)' // Optional attributes, e.g. `unsigned`. + . '/', - '$1$2', - $fieldtype_lowercased -+ '/' -+ . '(.+)' // Field type, e.g. `int`. -+ . '\(\d*\)' // Display width. -+ . '(.*)' // Optional attributes, e.g. `unsigned`. -+ . '/', +- ); + '$1$2', + $fieldtype_lowercased - ); ++ ); // Get the type without attributes, e.g. `int`. - $fieldtype_base = strtok( $fieldtype_without_parentheses, ' ' ); @@ -155318,20 +155228,22 @@ - "/wp-layout.css", - "", - $line +- ); + "/wp-layout.css", + "", + $line - ); ++ ); // Update comments template inclusion. $line = str_replace( - "", - '', - $line +- ); + "", + '', + $line - ); ++ ); - fwrite( $f, "{$line}\n" ); + fwrite($f, "{$line}\n"); @@ -155635,7 +155547,7 @@ + return apply_filters('wp_should_upgrade_global_tables', $should_upgrade); } diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php -index abed2d2015..4b409a575e 100644 +index abed2d2015..da67efa2a8 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -34,93 +34,93 @@ function edit_user( $user_id = 0 ) { @@ -156148,10 +156060,6 @@ - wp_admin_notice( - $default_password_nag_message, - array( -- 'additional_classes' => array( 'error', 'default-password-nag' ), -- 'paragraph_wrap' => false, -- ) -- ); +$default_password_nag_message = sprintf( + '

    %1$s %2$s

    ', + __('Notice:'), @@ -156171,9 +156079,10 @@ +wp_admin_notice( + $default_password_nag_message, + array( -+ 'additional_classes' => array( 'error', 'default-password-nag' ), -+ 'paragraph_wrap' => false, -+ ) + 'additional_classes' => array( 'error', 'default-password-nag' ), + 'paragraph_wrap' => false, + ) +- ); +); } @@ -156237,13 +156146,15 @@ - $validated_success_url = wp_is_authorize_application_redirect_url_valid( $request['success_url'] ); - if ( is_wp_error( $validated_success_url ) ) { - $error->add( +- $validated_success_url->get_error_code(), +- $validated_success_url->get_error_message() +- ); + if ( isset($request['success_url']) ) { + $validated_success_url = wp_is_authorize_application_redirect_url_valid($request['success_url']); + if ( is_wp_error($validated_success_url) ) { +$error->add( - $validated_success_url->get_error_code(), - $validated_success_url->get_error_message() -- ); ++ $validated_success_url->get_error_code(), ++ $validated_success_url->get_error_message() +); } } @@ -156252,13 +156163,15 @@ - $validated_reject_url = wp_is_authorize_application_redirect_url_valid( $request['reject_url'] ); - if ( is_wp_error( $validated_reject_url ) ) { - $error->add( +- $validated_reject_url->get_error_code(), +- $validated_reject_url->get_error_message() +- ); + if ( isset($request['reject_url']) ) { + $validated_reject_url = wp_is_authorize_application_redirect_url_valid($request['reject_url']); + if ( is_wp_error($validated_reject_url) ) { +$error->add( - $validated_reject_url->get_error_code(), - $validated_reject_url->get_error_message() -- ); ++ $validated_reject_url->get_error_code(), ++ $validated_reject_url->get_error_message() +); } } @@ -156637,10 +156550,10 @@ ?>
    diff --git a/wp-admin/index.php b/wp-admin/index.php -index de5cc21b8f..80da659cb1 100644 +index de5cc21b8f..e75e929c5d 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php -@@ -14,137 +14,137 @@ require_once ABSPATH . 'wp-admin/includes/dashboard.php'; +@@ -14,123 +14,123 @@ require_once ABSPATH . 'wp-admin/includes/dashboard.php'; wp_dashboard_setup(); @@ -156679,16 +156592,12 @@ $screen = get_current_screen(); $screen->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $help, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $help, -+ ) ++ 'title' => __('Overview'), + 'content' => $help, + ) ); // Help tabs. @@ -156699,16 +156608,12 @@ +$help .= '

    ' . __('Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '

    '; $screen->add_help_tab( -- array( -- 'id' => 'help-navigation', + array( + 'id' => 'help-navigation', - 'title' => __( 'Navigation' ), -- 'content' => $help, -- ) -+ array( -+ 'id' => 'help-navigation', -+ 'title' => __('Navigation'), -+ 'content' => $help, -+ ) ++ 'title' => __('Navigation'), + 'content' => $help, + ) ); -$help = '

    ' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '

    '; @@ -156721,16 +156626,12 @@ +$help .= '

    ' . __('Box Controls — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '

    '; $screen->add_help_tab( -- array( -- 'id' => 'help-layout', + array( + 'id' => 'help-layout', - 'title' => __( 'Layout' ), -- 'content' => $help, -- ) -+ array( -+ 'id' => 'help-layout', -+ 'title' => __('Layout'), -+ 'content' => $help, -+ ) ++ 'title' => __('Layout'), + 'content' => $help, + ) ); -$help = '

    ' . __( 'The boxes on your Dashboard screen are:' ) . '

    '; @@ -156767,21 +156668,17 @@ /* translators: %s: WordPress Planet URL. */ - __( 'WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.' ), - __( 'https://planet.wordpress.org/' ) -+ __('WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.'), -+ __('https://planet.wordpress.org/') ++ __('WordPress Events and News — Upcoming events near you as well as the latest news from the official WordPress project and the WordPress Planet.'), ++ __('https://planet.wordpress.org/') ) . '

    '; $screen->add_help_tab( -- array( -- 'id' => 'help-content', + array( + 'id' => 'help-content', - 'title' => __( 'Content' ), -- 'content' => $help, -- ) -+ array( -+ 'id' => 'help-content', -+ 'title' => __('Content'), -+ 'content' => $help, -+ ) ++ 'title' => __('Content'), + 'content' => $help, + ) ); -unset( $help ); @@ -156823,14 +156720,13 @@ - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Dashboard' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' . -- '

    ' . $wp_version_text . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Dashboard') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' . -+ '

    ' . $wp_version_text . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Dashboard') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' . + '

    ' . $wp_version_text . '

    ' ); - require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -138,13 +138,13 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?>
    @@ -156859,12 +156755,14 @@ - human_time_diff( time() + $remind_interval ) - ); - wp_admin_notice( -+ __('The admin email verification page will reappear after %s.'), -+ human_time_diff(time() + $remind_interval) +- $message, +- array( ++ __('The admin email verification page will reappear after %s.'), ++ human_time_diff(time() + $remind_interval) +); +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'success', 'dismissible' => true, ) @@ -157007,7 +156905,7 @@ foreach ( $results as $row ) { diff --git a/wp-admin/install.php b/wp-admin/install.php -index 34d5d4c7f7..0d8f5fabb2 100644 +index 34d5d4c7f7..9278d48c95 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -30,10 +30,10 @@ if ( false ) { @@ -157238,13 +157136,12 @@ - '

    ' . __( 'Already Installed' ) . '

    ' . - '

    ' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '

    ' . - '

    ' . __( 'Log In' ) . '

    ' . -- '' -- ); +die( + '

    ' . __('Already Installed') . '

    ' . -+ '

    ' . __('You appear to have already installed WordPress. To reinstall please clear your old database tables first.') . '

    ' . -+ '

    ' . __('Log In') . '

    ' . -+ '' ++ '

    ' . __('You appear to have already installed WordPress. To reinstall please clear your old database tables first.') . '

    ' . ++ '

    ' . __('Log In') . '

    ' . + '' +- ); +); } @@ -157262,16 +157159,16 @@ /* translators: %s: WordPress version. */ - esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), - sanitize_title( $wp_version ) -+ esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')), -+ sanitize_title($wp_version) ++ esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')), ++ sanitize_title($wp_version) ); $php_update_message = '

    ' . sprintf( /* translators: %s: URL to Update PHP page. */ - __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) -+ __('Learn more about updating PHP.'), -+ esc_url(wp_get_update_php_url()) ++ __('Learn more about updating PHP.'), ++ esc_url(wp_get_update_php_url()) ); $annotation = wp_get_update_php_annotation(); @@ -157344,15 +157241,14 @@ - die( - '

    ' . __( 'Configuration Error' ) . '

    ' . - '

    ' . sprintf( -- /* translators: %s: wp-config.php */ ++die( ++ '

    ' . __('Configuration Error') . '

    ' . ++ '

    ' . sprintf( + /* translators: %s: wp-config.php */ - __( 'Your %s file has an empty database table prefix, which is not supported.' ), - 'wp-config.php' - ) . '

    ' - ); -+die( -+ '

    ' . __('Configuration Error') . '

    ' . -+ '

    ' . sprintf( -+ /* translators: %s: wp-config.php */ + __('Your %s file has an empty database table prefix, which is not supported.'), + 'wp-config.php' + ) . '

    ' @@ -157366,15 +157262,14 @@ - die( - '

    ' . __( 'Configuration Error' ) . '

    ' . - '

    ' . sprintf( -- /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ ++die( ++ '

    ' . __('Configuration Error') . '

    ' . ++ '

    ' . sprintf( + /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ - __( 'The constant %s cannot be defined when installing WordPress.' ), - 'DO_NOT_UPGRADE_GLOBAL_TABLES' - ) . '

    ' - ); -+die( -+ '

    ' . __('Configuration Error') . '

    ' . -+ '

    ' . sprintf( -+ /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ + __('The constant %s cannot be defined when installing WordPress.'), + 'DO_NOT_UPGRADE_GLOBAL_TABLES' + ) . '

    ' @@ -157588,7 +157483,7 @@ $link = get_default_link_to_edit(); diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php -index 4ae6c4bcc9..282f4da332 100644 +index 4ae6c4bcc9..d12f79547f 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -8,88 +8,88 @@ @@ -157652,15 +157547,12 @@ $parent_file = $this_file; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . sprintf( -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . sprintf( /* translators: %s: URL to Widgets screen. */ - __( 'You can add links here to be displayed on your site, usually using Widgets. By default, links to several sites in the WordPress community are included as examples.' ), @@ -157668,45 +157560,38 @@ - ) . '

    ' . - '

    ' . __( 'Links may be separated into Link Categories; these are different than the categories used on your posts.' ) . '

    ' . - '

    ' . __( 'You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.' ) . '

    ', -- ) + __('You can add links here to be displayed on your site, usually using Widgets. By default, links to several sites in the WordPress community are included as examples.'), + 'widgets.php' + ) . '

    ' . -+ '

    ' . __('Links may be separated into Link Categories; these are different than the categories used on your posts.') . '

    ' . -+ '

    ' . __('You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.') . '

    ', -+ ) ++ '

    ' . __('Links may be separated into Link Categories; these are different than the categories used on your posts.') . '

    ' . ++ '

    ' . __('You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.') . '

    ', + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'deleting-links', + array( + 'id' => 'deleting-links', - 'title' => __( 'Deleting Links' ), -- 'content' => ++ 'title' => __('Deleting Links'), + 'content' => - '

    ' . __( 'If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.' ) . '

    ', -- ) -+ array( -+ 'id' => 'deleting-links', -+ 'title' => __('Deleting Links'), -+ 'content' => -+ '

    ' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '

    ', -+ ) ++ '

    ' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Managing Links' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Managing Links') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Managing Links') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_list' => __( 'Links list' ), -- ) -+ array( -+ 'heading_list' => __('Links list'), -+ ) ++ 'heading_list' => __('Links list'), + ) ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -157758,20 +157643,16 @@ - wp_admin_notice( - $deleted_message, - array( -- 'id' => 'message', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); -- $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'deleted' ), $_SERVER['REQUEST_URI'] ); + $deleted_message = sprintf(_n('%s link deleted.', '%s links deleted.', $deleted), $deleted); +wp_admin_notice( + $deleted_message, + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +- $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'deleted' ), $_SERVER['REQUEST_URI'] ); +); + $_SERVER['REQUEST_URI'] = remove_query_arg(array( 'deleted' ), $_SERVER['REQUEST_URI']); } @@ -158227,7 +158108,7 @@ echo $out; exit; diff --git a/wp-admin/maint/repair.php b/wp-admin/maint/repair.php -index 1c0f6ffa98..10370edc96 100644 +index 1c0f6ffa98..55a8136ee4 100644 --- a/wp-admin/maint/repair.php +++ b/wp-admin/maint/repair.php @@ -5,11 +5,11 @@ @@ -158283,21 +158164,18 @@ - $default_keys = array_unique( - array( -- 'put your unique phrase here', -- /* +$default_keys = array_unique( + array( -+ 'put your unique phrase here', -+ /* + 'put your unique phrase here', + /* * translators: This string should only be translated if wp-config-sample.php is localized. * You can check the localized release package or * https://i18n.svn.wordpress.org//branches//dist/wp-config-sample.php */ - __( 'put your unique phrase here' ), -- ) ++ __('put your unique phrase here'), + ) - ); -+ __('put your unique phrase here'), -+ ) +); $missing_key = false; $duplicated_keys = array(); @@ -158461,7 +158339,7 @@ } ?> diff --git a/wp-admin/media-new.php b/wp-admin/media-new.php -index fa50644d2d..4ea0743ece 100644 +index fa50644d2d..caccb92825 100644 --- a/wp-admin/media-new.php +++ b/wp-admin/media-new.php @@ -12,76 +12,76 @@ @@ -158513,15 +158391,12 @@ $parent_file = 'upload.php'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:' ) . '

    ' . -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:') . '

    ' . '
      ' . - '
    • ' . __( 'Drag and drop your files into the area below. Multiple files are allowed.' ) . '
    • ' . @@ -158531,16 +158406,15 @@ + '
    • ' . __('Clicking Select Files opens a navigation window showing you files in your operating system. Selecting Open after clicking on the file you want activates a progress bar on the uploader screen.') . '
    • ' . + '
    • ' . __('Revert to the Browser Uploader by clicking the link below the drag and drop box.') . '
    • ' . '
    ', -- ) -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Uploading Media Files' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Uploading Media Files') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Uploading Media Files') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -158573,7 +158447,7 @@
    diff --git a/wp-admin/media-upload.php b/wp-admin/media-upload.php -index 015bc9d63d..707a4083f2 100644 +index 015bc9d63d..59bf5127a2 100644 --- a/wp-admin/media-upload.php +++ b/wp-admin/media-upload.php @@ -9,48 +9,48 @@ @@ -158625,7 +158499,7 @@ +if ( isset($action) && 'edit' === $action && ! $ID ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName +wp_die( + '

    ' . __('Something went wrong.') . '

    ' . -+ '

    ' . __('Invalid item ID.') . '

    ', ++ '

    ' . __('Invalid item ID.') . '

    ', + 403 +); } @@ -158639,7 +158513,7 @@ +if ( ! empty($_REQUEST['post_id']) && ! current_user_can('edit_post', $_REQUEST['post_id']) ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to edit this item.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to edit this item.') . '

    ', + 403 +); } @@ -159035,7 +158909,7 @@ ?> diff --git a/wp-admin/menu.php b/wp-admin/menu.php -index 71fd94b2e3..c4ca0f1df5 100644 +index 71fd94b2e3..7c9b9293d0 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -21,79 +21,79 @@ @@ -159148,7 +159022,7 @@ 'edit_posts', 'edit-comments.php', '', -@@ -101,42 +101,42 @@ if ( current_user_can( 'edit_posts' ) ) { +@@ -101,10 +101,10 @@ if ( current_user_can( 'edit_posts' ) ) { 'menu-comments', 'dashicons-admin-comments', ); @@ -159161,17 +159035,8 @@ $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group. - $types = (array) get_post_types( -- array( -- 'show_ui' => true, -- '_builtin' => false, -- 'show_in_menu' => true, -- ) -+ array( -+ 'show_ui' => true, -+ '_builtin' => false, -+ 'show_in_menu' => true, -+ ) +@@ -116,27 +116,27 @@ $types = (array) get_post_types( + ) ); $builtin = array( 'post', 'page' ); -foreach ( array_merge( $builtin, $types ) as $ptype ) { @@ -159566,7 +159431,7 @@ +wp_redirect(network_admin_url()); exit; diff --git a/wp-admin/ms-delete-site.php b/wp-admin/ms-delete-site.php -index be66975f56..e453fd9090 100644 +index be66975f56..0cf3193772 100644 --- a/wp-admin/ms-delete-site.php +++ b/wp-admin/ms-delete-site.php @@ -10,25 +10,25 @@ @@ -159660,32 +159525,29 @@ * @param string $content The email text. */ - $content = apply_filters( 'delete_site_email_content', $content ); -- ++ $content = apply_filters('delete_site_email_content', $content); + - $content = str_replace( '###USERNAME###', $user->user_login, $content ); - $content = str_replace( '###URL_DELETE###', $url_delete, $content ); - $content = str_replace( '###SITENAME###', get_network()->site_name, $content ); - $content = str_replace( '###SITEURL###', network_home_url(), $content ); -- ++ $content = str_replace('###USERNAME###', $user->user_login, $content); ++ $content = str_replace('###URL_DELETE###', $url_delete, $content); ++ $content = str_replace('###SITENAME###', get_network()->site_name, $content); ++ $content = str_replace('###SITEURL###', network_home_url(), $content); + - wp_mail( - get_option( 'admin_email' ), - sprintf( -- /* translators: %s: Site title. */ ++wp_mail( ++ get_option('admin_email'), ++ sprintf( + /* translators: %s: Site title. */ - __( '[%s] Delete My Site' ), - wp_specialchars_decode( get_option( 'blogname' ) ) - ), - $content - ); -+ $content = apply_filters('delete_site_email_content', $content); -+ -+ $content = str_replace('###USERNAME###', $user->user_login, $content); -+ $content = str_replace('###URL_DELETE###', $url_delete, $content); -+ $content = str_replace('###SITENAME###', get_network()->site_name, $content); -+ $content = str_replace('###SITEURL###', network_home_url(), $content); -+ -+wp_mail( -+ get_option('admin_email'), -+ sprintf( -+ /* translators: %s: Site title. */ + __('[%s] Delete My Site'), + wp_specialchars_decode(get_option('blogname')) + ), @@ -159729,9 +159591,10 @@ +printf( /* translators: %s: Site address. */ - __( "I'm sure I want to permanently delete my site, and I am aware I can never get it back or use %s again." ), -+ __("I'm sure I want to permanently delete my site, and I am aware I can never get it back or use %s again."), - $blog->domain . $blog->path +- $blog->domain . $blog->path - ); ++ __("I'm sure I want to permanently delete my site, and I am aware I can never get it back or use %s again."), ++ $blog->domain . $blog->path +); ?>

    @@ -159806,7 +159669,7 @@ +wp_redirect(network_admin_url('users.php')); exit; diff --git a/wp-admin/my-sites.php b/wp-admin/my-sites.php -index be7f63bb76..a9020c42b9 100644 +index be7f63bb76..134a9997c7 100644 --- a/wp-admin/my-sites.php +++ b/wp-admin/my-sites.php @@ -10,85 +10,85 @@ @@ -159854,27 +159717,23 @@ $parent_file = 'index.php'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '

    ', -+ ) ++ '

    ' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on My Sites' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on My Sites') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on My Sites') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -159883,18 +159742,14 @@ - wp_admin_notice( - '' . __( 'Settings saved.' ) . '', - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); +wp_admin_notice( + '' . __('Settings saved.') . '', + array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); } ?> @@ -159921,17 +159776,14 @@ - wp_admin_notice( - '' . __( 'You must be a member of at least one site to use this page.' ) . '', - array( -- 'type' => 'error', -- 'dismissible' => true, -- ) -- ); +if ( empty($blogs) ) : +wp_admin_notice( + '' . __('You must be a member of at least one site to use this page.') . '', + array( -+ 'type' => 'error', -+ 'dismissible' => true, -+ ) + 'type' => 'error', + 'dismissible' => true, + ) +- ); +); ?> diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php -index 93b3c5e635..640745a030 100644 +index 93b3c5e635..e8307b3cfe 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -15,26 +15,26 @@ require_once __DIR__ . '/admin.php'; @@ -160031,7 +159883,7 @@ +if ( ! current_user_can('edit_theme_options') ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to edit theme options on this site.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to edit theme options on this site.') . '

    ', + 403 +); } @@ -160345,10 +160197,11 @@ - if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) ) { - $messages[] = wp_get_admin_notice( - __( 'The menu item has been successfully deleted.' ), +- array( + if ( is_nav_menu_item($menu_item_id) && wp_delete_post($menu_item_id, true) ) { +$messages[] = wp_get_admin_notice( -+ __('The menu item has been successfully deleted.'), - array( ++ __('The menu item has been successfully deleted.'), ++ array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, @@ -160381,10 +160234,12 @@ - if ( is_wp_error( $deletion ) ) { - $messages[] = wp_get_admin_notice( +- $deletion->get_error_message(), +- array( + if ( is_wp_error($deletion) ) { +$messages[] = wp_get_admin_notice( - $deletion->get_error_message(), - array( ++ $deletion->get_error_message(), ++ array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, @@ -160394,9 +160249,10 @@ } else { - $messages[] = wp_get_admin_notice( - __( 'The menu has been successfully deleted.' ), +- array( +$messages[] = wp_get_admin_notice( -+ __('The menu has been successfully deleted.'), - array( ++ __('The menu has been successfully deleted.'), ++ array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, @@ -160425,17 +160281,14 @@ $messages[] = wp_get_admin_notice( - $deletion->get_error_message(), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'error' ), -- 'dismissible' => true, -- ) + $deletion->get_error_message(), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'error' ), -+ 'dismissible' => true, -+ ) - ); + 'id' => 'message', + 'additional_classes' => array( 'error' ), + 'dismissible' => true, + ) +- ); ++ ); $deletion_error = true; } } @@ -160443,10 +160296,11 @@ - if ( empty( $deletion_error ) ) { - $messages[] = wp_get_admin_notice( - __( 'Selected menus have been successfully deleted.' ), +- array( + if ( empty($deletion_error) ) { +$messages[] = wp_get_admin_notice( -+ __('Selected menus have been successfully deleted.'), - array( ++ __('Selected menus have been successfully deleted.'), ++ array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, @@ -160478,26 +160332,21 @@ if ( $new_menu_title ) { - $_nav_menu_selected_id = wp_update_nav_menu_object( 0, array( 'menu-name' => $new_menu_title ) ); -- ++ $_nav_menu_selected_id = wp_update_nav_menu_object(0, array( 'menu-name' => $new_menu_title )); + - if ( is_wp_error( $_nav_menu_selected_id ) ) { - $messages[] = wp_get_admin_notice( - $_nav_menu_selected_id->get_error_message(), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'error' ), -- 'dismissible' => true, -- ) -- ); -+ $_nav_menu_selected_id = wp_update_nav_menu_object(0, array( 'menu-name' => $new_menu_title )); -+ + if ( is_wp_error($_nav_menu_selected_id) ) { + $messages[] = wp_get_admin_notice( + $_nav_menu_selected_id->get_error_message(), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'error' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'error' ), + 'dismissible' => true, + ) +- ); + ); } else { - $_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id ); @@ -160523,7 +160372,7 @@ // Auto-save nav_menu_locations. $locations = get_nav_menu_locations(); -@@ -415,40 +415,40 @@ switch ( $action ) { +@@ -415,99 +415,99 @@ switch ( $action ) { break; // There should only be 1. } @@ -160565,20 +160414,17 @@ $messages[] = wp_get_admin_notice( - __( 'Please enter a valid menu name.' ), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'error' ), -- 'dismissible' => true, -- ) + __('Please enter a valid menu name.'), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'error' ), -+ 'dismissible' => true, -+ ) - ); + 'id' => 'message', + 'additional_classes' => array( 'error' ), + 'dismissible' => true, + ) +- ); ++ ); } -@@ -456,58 +456,58 @@ switch ( $action ) { + // Update existing menu. } else { // Remove menu locations that have been unchecked. foreach ( $locations as $location => $description ) { @@ -160606,17 +160452,14 @@ $messages[] = wp_get_admin_notice( - __( 'Please enter a valid menu name.' ), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'error' ), -- 'dismissible' => true, -- ) + __('Please enter a valid menu name.'), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'error' ), -+ 'dismissible' => true, -+ ) - ); + 'id' => 'message', + 'additional_classes' => array( 'error' ), + 'dismissible' => true, + ) +- ); ++ ); $menu_title = $_menu_object->name; } @@ -160631,18 +160474,14 @@ - $messages[] = wp_get_admin_notice( - $_nav_menu_selected_id->get_error_message(), - array( -- 'id' => 'message', -- 'additional_classes' => array( 'error' ), -- 'dismissible' => true, -- ) -- ); + $messages[] = wp_get_admin_notice( + $_nav_menu_selected_id->get_error_message(), + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'error' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'error' ), + 'dismissible' => true, + ) +- ); + ); } else { - $_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id ); @@ -160691,9 +160530,10 @@ - $messages[] = wp_get_admin_notice( - __( 'Menu locations updated.' ), +- array( +$messages[] = wp_get_admin_notice( -+ __('Menu locations updated.'), - array( ++ __('Menu locations updated.'), ++ array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, @@ -160883,21 +160723,17 @@ - $messages[] = wp_get_admin_notice( - $message_no_theme_support, - array( -- 'id' => 'message', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); + __('Your theme does not natively support menus, but you can use them in sidebars by adding a “Navigation Menu” widget on the Widgets screen.'), + admin_url('widgets.php') +); +$messages[] = wp_get_admin_notice( + $message_no_theme_support, + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +); } @@ -160918,39 +160754,6 @@ - - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', -- 'title' => __( 'Overview' ), -- 'content' => $overview, -- ) -- ); -- -- $menu_management = '

    ' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '

    '; -- $menu_management .= '
    • ' . __( 'To edit an existing menu, choose a menu from the dropdown and click Select' ) . '
    • '; -- $menu_management .= '
    • ' . __( 'If you have not yet created any menus, click the ’create a new menu’ link to get started' ) . '
    '; -- $menu_management .= '

    ' . __( 'You can assign theme locations to individual menus by selecting the desired settings at the bottom of the menu editor. To assign menus to all theme locations at once, visit the Manage Locations tab at the top of the screen.' ) . '

    '; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'menu-management', -- 'title' => __( 'Menu Management' ), -- 'content' => $menu_management, -- ) -- ); -- -- $editing_menus = '

    ' . __( 'Each navigation menu may contain a mix of links to pages, categories, custom URLs or other content types. Menu links are added by selecting items from the expanding boxes in the left-hand column below.' ) . '

    '; -- $editing_menus .= '

    ' . __( 'Clicking the arrow to the right of any menu item in the editor will reveal a standard group of settings. Additional settings such as link target, CSS classes, link relationships, and link descriptions can be enabled and disabled via the Screen Options tab.' ) . '

    '; -- $editing_menus .= '
    • ' . __( 'Add one or several items at once by selecting the checkbox next to each item and clicking Add to Menu' ) . '
    • '; -- $editing_menus .= '
    • ' . __( 'To add a custom link, expand the Custom Links section, enter a URL and link text, and click Add to Menu' ) . '
    • '; -- $editing_menus .= '
    • ' . __( 'To reorganize menu items, drag and drop items with your mouse or use your keyboard. Drag or move a menu item a little to the right to make it a submenu' ) . '
    • '; -- $editing_menus .= '
    • ' . __( 'Delete a menu item by expanding it and clicking the Remove link' ) . '
    '; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'editing-menus', -- 'title' => __( 'Editing Menus' ), -- 'content' => $editing_menus, -- ) -- ); + __('Menus can be displayed in locations defined by your theme, even used in sidebars by adding a “Navigation Menu” widget on the Widgets screen. If your theme does not support the navigation menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the documentation link to the side.'), + admin_url('widgets.php'), + 'Twenty Twenty', @@ -160962,63 +160765,79 @@ + +get_current_screen()->add_help_tab( + array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $overview, -+ ) + 'id' => 'overview', +- 'title' => __( 'Overview' ), ++ 'title' => __('Overview'), + 'content' => $overview, + ) +- ); +); -+ + +- $menu_management = '

    ' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '

    '; +- $menu_management .= '
    • ' . __( 'To edit an existing menu, choose a menu from the dropdown and click Select' ) . '
    • '; +- $menu_management .= '
    • ' . __( 'If you have not yet created any menus, click the ’create a new menu’ link to get started' ) . '
    '; +- $menu_management .= '

    ' . __( 'You can assign theme locations to individual menus by selecting the desired settings at the bottom of the menu editor. To assign menus to all theme locations at once, visit the Manage Locations tab at the top of the screen.' ) . '

    '; + $menu_management = '

    ' . __('The menu management box at the top of the screen is used to control which menu is opened in the editor below.') . '

    '; + $menu_management .= '
    • ' . __('To edit an existing menu, choose a menu from the dropdown and click Select') . '
    • '; + $menu_management .= '
    • ' . __('If you have not yet created any menus, click the ’create a new menu’ link to get started') . '
    '; + $menu_management .= '

    ' . __('You can assign theme locations to individual menus by selecting the desired settings at the bottom of the menu editor. To assign menus to all theme locations at once, visit the Manage Locations tab at the top of the screen.') . '

    '; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'menu-management', -+ 'title' => __('Menu Management'), -+ 'content' => $menu_management, -+ ) + 'id' => 'menu-management', +- 'title' => __( 'Menu Management' ), ++ 'title' => __('Menu Management'), + 'content' => $menu_management, + ) +- ); +); -+ + +- $editing_menus = '

    ' . __( 'Each navigation menu may contain a mix of links to pages, categories, custom URLs or other content types. Menu links are added by selecting items from the expanding boxes in the left-hand column below.' ) . '

    '; +- $editing_menus .= '

    ' . __( 'Clicking the arrow to the right of any menu item in the editor will reveal a standard group of settings. Additional settings such as link target, CSS classes, link relationships, and link descriptions can be enabled and disabled via the Screen Options tab.' ) . '

    '; +- $editing_menus .= '
    • ' . __( 'Add one or several items at once by selecting the checkbox next to each item and clicking Add to Menu' ) . '
    • '; +- $editing_menus .= '
    • ' . __( 'To add a custom link, expand the Custom Links section, enter a URL and link text, and click Add to Menu' ) . '
    • '; +- $editing_menus .= '
    • ' . __( 'To reorganize menu items, drag and drop items with your mouse or use your keyboard. Drag or move a menu item a little to the right to make it a submenu' ) . '
    • '; +- $editing_menus .= '
    • ' . __( 'Delete a menu item by expanding it and clicking the Remove link' ) . '
    '; + $editing_menus = '

    ' . __('Each navigation menu may contain a mix of links to pages, categories, custom URLs or other content types. Menu links are added by selecting items from the expanding boxes in the left-hand column below.') . '

    '; + $editing_menus .= '

    ' . __('Clicking the arrow to the right of any menu item in the editor will reveal a standard group of settings. Additional settings such as link target, CSS classes, link relationships, and link descriptions can be enabled and disabled via the Screen Options tab.') . '

    '; + $editing_menus .= '
    • ' . __('Add one or several items at once by selecting the checkbox next to each item and clicking Add to Menu') . '
    • '; + $editing_menus .= '
    • ' . __('To add a custom link, expand the Custom Links section, enter a URL and link text, and click Add to Menu') . '
    • '; + $editing_menus .= '
    • ' . __('To reorganize menu items, drag and drop items with your mouse or use your keyboard. Drag or move a menu item a little to the right to make it a submenu') . '
    • '; + $editing_menus .= '
    • ' . __('Delete a menu item by expanding it and clicking the Remove link') . '
    '; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'editing-menus', -+ 'title' => __('Editing Menus'), -+ 'content' => $editing_menus, -+ ) + 'id' => 'editing-menus', +- 'title' => __( 'Editing Menus' ), ++ 'title' => __('Editing Menus'), + 'content' => $editing_menus, + ) +- ); +); else : // Locations tab. - $locations_overview = '

    ' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '

    '; - $locations_overview .= '
    • ' . __( 'To assign menus to one or more theme locations, select a menu from each location’s dropdown. When you are finished, click Save Changes' ) . '
    • '; - $locations_overview .= '
    • ' . __( 'To edit a menu currently assigned to a theme location, click the adjacent ’Edit’ link' ) . '
    • '; - $locations_overview .= '
    • ' . __( 'To add a new menu instead of assigning an existing one, click the ’Use new menu’ link. Your new menu will be automatically assigned to that theme location' ) . '
    '; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'locations-overview', -- 'title' => __( 'Overview' ), -- 'content' => $locations_overview, -- ) -- ); + $locations_overview = '

    ' . __('This screen is used for globally assigning menus to locations defined by your theme.') . '

    '; + $locations_overview .= '
    • ' . __('To assign menus to one or more theme locations, select a menu from each location’s dropdown. When you are finished, click Save Changes') . '
    • '; + $locations_overview .= '
    • ' . __('To edit a menu currently assigned to a theme location, click the adjacent ’Edit’ link') . '
    • '; + $locations_overview .= '
    • ' . __('To add a new menu instead of assigning an existing one, click the ’Use new menu’ link. Your new menu will be automatically assigned to that theme location') . '
    '; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'locations-overview', -+ 'title' => __('Overview'), -+ 'content' => $locations_overview, -+ ) + 'id' => 'locations-overview', +- 'title' => __( 'Overview' ), ++ 'title' => __('Overview'), + 'content' => $locations_overview, + ) +- ); +); endif; @@ -161026,9 +160845,9 @@ - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Menus' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Menus') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Menus') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); // Get the admin header. @@ -161046,22 +160865,20 @@ - esc_url( - add_query_arg( - array( -- array( 'autofocus' => $focus ), ++printf( ++ ' %2$s', ++ esc_url( ++ add_query_arg( ++ array( + array( 'autofocus' => $focus ), - 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), -- ), ++ 'return' => urlencode(remove_query_arg(wp_removable_query_args(), wp_unslash($_SERVER['REQUEST_URI']))), + ), - admin_url( 'customize.php' ) - ) - ), - __( 'Manage with Live Preview' ) - ); -+printf( -+ ' %2$s', -+ esc_url( -+ add_query_arg( -+ array( -+ array( 'autofocus' => $focus ), -+ 'return' => urlencode(remove_query_arg(wp_removable_query_args(), wp_unslash($_SERVER['REQUEST_URI']))), -+ ), + admin_url('customize.php') + ) + ), @@ -161107,17 +160924,19 @@ - echo '

    ' . sprintf( +echo '

    ' . sprintf( /* translators: %s: Number of menus. */ - _n( +- _n( - 'Your theme supports %s menu. Select which menu appears in each location.', - 'Your theme supports %s menus. Select which menu appears in each location.', - $num_locations +- ), +- number_format_i18n( $num_locations ) +- ) . '

    '; ++ _n( + 'Your theme supports %s menu. Select which menu appears in each location.', + 'Your theme supports %s menus. Select which menu appears in each location.', + $num_locations - ), -- number_format_i18n( $num_locations ) -- ) . '

    '; -+ number_format_i18n($num_locations) ++ ), ++ number_format_i18n($num_locations) +) . '

    '; } ?> @@ -161166,18 +160985,15 @@ - echo esc_url( - add_query_arg( - array( -- 'action' => 'edit', -- 'menu' => $menu_locations[ $_location ], -- ), -- admin_url( 'nav-menus.php' ) -- ) -- ); + echo esc_url( + add_query_arg( + array( -+ 'action' => 'edit', -+ 'menu' => $menu_locations[ $_location ], -+ ), + 'action' => 'edit', + 'menu' => $menu_locations[ $_location ], + ), +- admin_url( 'nav-menus.php' ) +- ) +- ); + admin_url('nav-menus.php') + ) + ); @@ -161199,20 +161015,16 @@ - echo esc_url( - add_query_arg( - array( -- 'action' => 'edit', -- 'menu' => 0, -- 'use-location' => $_location, -- ), -- admin_url( 'nav-menus.php' ) -- ) -- ); + echo esc_url( + add_query_arg( + array( -+ 'action' => 'edit', -+ 'menu' => 0, -+ 'use-location' => $_location, -+ ), + 'action' => 'edit', + 'menu' => 0, + 'use-location' => $_location, + ), +- admin_url( 'nav-menus.php' ) +- ) +- ); + admin_url('nav-menus.php') + ) + ); @@ -161264,24 +161076,23 @@ +printf( /* translators: %s: URL to create a new menu. */ - __( 'Edit your menu below, or create a new menu. Do not forget to save your changes!' ), -+ __('Edit your menu below, or create a new menu. Do not forget to save your changes!'), - esc_url( +- esc_url( - add_query_arg( - array( -- 'action' => 'edit', -- 'menu' => 0, -- ), -- admin_url( 'nav-menus.php' ) -- ) ++ __('Edit your menu below, or create a new menu. Do not forget to save your changes!'), ++ esc_url( + add_query_arg( + array( -+ 'action' => 'edit', -+ 'menu' => 0, -+ ), + 'action' => 'edit', + 'menu' => 0, + ), +- admin_url( 'nav-menus.php' ) +- ) +- ) +- ); + admin_url('nav-menus.php') + ) - ) -- ); ++ ) +); ?> @@ -161321,7 +161132,7 @@ $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ]; } } -@@ -997,16 +997,16 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -997,44 +997,44 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; * * @param int $locations Number of menu locations to list. Default 3. */ @@ -161338,13 +161149,14 @@ - ' (%1$s%2$s)', - implode( ', ', $assigned_locations ), - count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' …' : '' +- ); + ' (%1$s%2$s)', + implode(', ', $assigned_locations), + count($locations_assigned_to_this_menu) > count($assigned_locations) ? ' …' : '' - ); ++ ); } } -@@ -1014,27 +1014,27 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; + ?> @@ -161358,23 +161170,21 @@ - esc_url( - add_query_arg( - array( -- 'action' => 'edit', -- 'menu' => 0, -- ), -- admin_url( 'nav-menus.php' ) -- ) -- ) + __('or create a new menu. Do not forget to save your changes!'), + esc_url( + add_query_arg( + array( -+ 'action' => 'edit', -+ 'menu' => 0, -+ ), + 'action' => 'edit', + 'menu' => 0, + ), +- admin_url( 'nav-menus.php' ) +- ) +- ) +- ); + admin_url('nav-menus.php') + ) + ) - ); ++ ); ?> 'delete', -- 'menu' => $nav_menu_selected_id, -- ), ++ echo esc_url( ++ wp_nonce_url( ++ add_query_arg( ++ array( + 'action' => 'delete', + 'menu' => $nav_menu_selected_id, + ), - admin_url( 'nav-menus.php' ) - ), - 'delete-nav_menu-' . $nav_menu_selected_id - ) - ); -+ echo esc_url( -+ wp_nonce_url( -+ add_query_arg( -+ array( -+ 'action' => 'delete', -+ 'menu' => $nav_menu_selected_id, -+ ), + admin_url('nav-menus.php') + ), + 'delete-nav_menu-' . $nav_menu_selected_id @@ -161632,7 +161439,7 @@ diff --git a/wp-admin/network.php b/wp-admin/network.php -index 40c5ffc5bf..39f1aeba6f 100644 +index 40c5ffc5bf..bb15e545e0 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -10,101 +10,101 @@ @@ -161676,16 +161483,15 @@ -if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) { - wp_die( - printf( -- /* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */ ++if ( ! network_domain_check() && ( ! defined('WP_ALLOW_MULTISITE') || ! WP_ALLOW_MULTISITE ) ) { ++wp_die( ++ printf( + /* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */ - __( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ), - 'WP_ALLOW_MULTISITE', - 'wp-config.php' - ) - ); -+if ( ! network_domain_check() && ( ! defined('WP_ALLOW_MULTISITE') || ! WP_ALLOW_MULTISITE ) ) { -+wp_die( -+ printf( -+ /* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */ + __('You must define the %1$s constant as true in your %2$s file to allow creation of a Network.'), + 'WP_ALLOW_MULTISITE', + 'wp-config.php' @@ -161725,16 +161531,12 @@ + '

    ' . __('Documentation on the Network Screen') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'network', + array( + 'id' => 'network', - 'title' => __( 'Network' ), -- 'content' => $network_help, -- ) -+ array( -+ 'id' => 'network', -+ 'title' => __('Network'), -+ 'content' => $network_help, -+ ) ++ 'title' => __('Network'), + 'content' => $network_help, + ) ); get_current_screen()->set_help_sidebar( @@ -161742,10 +161544,10 @@ - '

    ' . __( 'Documentation on Creating a Network' ) . '

    ' . - '

    ' . __( 'Documentation on the Network Screen' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Creating a Network') . '

    ' . -+ '

    ' . __('Documentation on the Network Screen') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Creating a Network') . '

    ' . ++ '

    ' . __('Documentation on the Network Screen') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -161861,7 +161663,7 @@ +wp_redirect(network_admin_url()); exit; diff --git a/wp-admin/network/index.php b/wp-admin/network/index.php -index b51fc4e560..980a241c87 100644 +index b51fc4e560..4ed00226fa 100644 --- a/wp-admin/network/index.php +++ b/wp-admin/network/index.php @@ -13,54 +13,54 @@ require_once __DIR__ . '/admin.php'; @@ -161893,16 +161695,12 @@ +$overview .= '
  • ' . __('Modify global network settings') . '
  • '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $overview, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $overview, -+ ) ++ 'title' => __('Overview'), + 'content' => $overview, + ) ); -$quick_tasks = '

    ' . __( 'The Right Now widget on this screen provides current user and site counts on your network.' ) . '

    '; @@ -161919,25 +161717,21 @@ +$quick_tasks .= '
  • ' . __('To search for a site, enter the path or domain.') . '
  • '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'quick-tasks', + array( + 'id' => 'quick-tasks', - 'title' => __( 'Quick Tasks' ), -- 'content' => $quick_tasks, -- ) -+ array( -+ 'id' => 'quick-tasks', -+ 'title' => __('Quick Tasks'), -+ 'content' => $quick_tasks, -+ ) ++ 'title' => __('Quick Tasks'), + 'content' => $quick_tasks, + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on the Network Admin' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on the Network Admin') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on the Network Admin') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); wp_dashboard_setup(); @@ -162139,7 +161933,7 @@ /** Load WordPress Administration Bootstrap */ diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php -index 7dff74d4ad..5e15fe3b74 100644 +index 7dff74d4ad..e935845797 100644 --- a/wp-admin/network/settings.php +++ b/wp-admin/network/settings.php @@ -13,63 +13,63 @@ require_once __DIR__ . '/admin.php'; @@ -162193,10 +161987,11 @@ +add_action('admin_head', 'network_settings_add_js'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site’s options.' ) . '

    ' . - '

    ' . __( 'Operational settings has fields for the network’s name and admin email.' ) . '

    ' . - '

    ' . __( 'Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.' ) . '

    ' . @@ -162205,29 +162000,24 @@ - '

    ' . __( 'You can set the language, and WordPress will automatically download and install the translation files (available if your filesystem is writable).' ) . '

    ' . - '

    ' . __( 'Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.' ) . '

    ' . - '

    ' . __( 'Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site’s options.') . '

    ' . -+ '

    ' . __('Operational settings has fields for the network’s name and admin email.') . '

    ' . -+ '

    ' . __('Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.') . '

    ' . -+ '

    ' . __('New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what᾿s put in the first post, page, comment, comment author, and comment URL.') . '

    ' . -+ '

    ' . __('Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).') . '

    ' . -+ '

    ' . __('You can set the language, and WordPress will automatically download and install the translation files (available if your filesystem is writable).') . '

    ' . -+ '

    ' . __('Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.') . '

    ' . -+ '

    ' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '

    ', -+ ) ++ '

    ' . __('This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site’s options.') . '

    ' . ++ '

    ' . __('Operational settings has fields for the network’s name and admin email.') . '

    ' . ++ '

    ' . __('Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.') . '

    ' . ++ '

    ' . __('New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what᾿s put in the first post, page, comment, comment author, and comment URL.') . '

    ' . ++ '

    ' . __('Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).') . '

    ' . ++ '

    ' . __('You can set the language, and WordPress will automatically download and install the translation files (available if your filesystem is writable).') . '

    ' . ++ '

    ' . __('Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.') . '

    ' . ++ '

    ' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Network Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Network Settings' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Network Settings') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Network Settings') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); if ( $_POST ) { @@ -162292,19 +162082,15 @@ - wp_admin_notice( - __( 'Settings saved.' ), - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); +if ( isset($_GET['updated']) ) { +wp_admin_notice( + __('Settings saved.'), + array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); } ?> @@ -162374,9 +162160,8 @@ 'type' => 'warning', 'dismissible' => true, 'additional_classes' => array( 'inline' ), -- ) + ) - ); -+ ) + ); endif; ?> @@ -162752,10 +162537,9 @@ 'languages' => $languages, 'translations' => $translations, - 'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(), -- ) -- ); + 'show_available_translations' => current_user_can('install_languages') && wp_can_install_language_pack(), -+ ) + ) +- ); + ); ?>
    diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php -index 79fe4d5f05..f36c98ce1f 100644 +index 79fe4d5f05..1951e5bd4a 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -10,62 +10,62 @@ @@ -163714,16 +163468,14 @@ +get_current_screen()->set_help_sidebar(get_site_screen_help_sidebar_content()); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter site themes list' ), - 'heading_pagination' => __( 'Site themes list navigation' ), - 'heading_list' => __( 'Site themes list' ), -- ) -+ array( -+ 'heading_views' => __('Filter site themes list'), -+ 'heading_pagination' => __('Site themes list navigation'), -+ 'heading_list' => __('Site themes list'), -+ ) ++ 'heading_views' => __('Filter site themes list'), ++ 'heading_pagination' => __('Site themes list navigation'), ++ 'heading_list' => __('Site themes list'), + ) ); -$wp_list_table = _get_list_table( 'WP_MS_Themes_List_Table' ); @@ -163865,18 +163617,15 @@ - wp_safe_redirect( - add_query_arg( - array( -- 'id' => $id, -- $action => $n, -- ), -- $referer -- ) -- ); +wp_safe_redirect( + add_query_arg( + array( -+ 'id' => $id, -+ $action => $n, -+ ), + 'id' => $id, + $action => $n, + ), +- $referer +- ) +- ); + $referer + ) +); @@ -163901,7 +163650,7 @@ $parent_file = 'sites.php'; $submenu_file = 'sites.php'; -@@ -178,73 +178,73 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -178,7 +178,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

    @@ -163910,14 +163659,8 @@ $id, -- 'selected' => 'site-themes', -- ) -+ array( -+ 'blog_id' => $id, -+ 'selected' => 'site-themes', -+ ) +@@ -188,63 +188,63 @@ network_edit_site_nav( + ) ); -if ( isset( $_GET['enabled'] ) ) { @@ -163936,20 +163679,16 @@ - wp_admin_notice( - sprintf( $message, number_format_i18n( $enabled ) ), - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); --} elseif ( isset( $_GET['disabled'] ) ) { -- $disabled = absint( $_GET['disabled'] ); +wp_admin_notice( + sprintf($message, number_format_i18n($enabled)), + array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + ) +- ); +-} elseif ( isset( $_GET['disabled'] ) ) { +- $disabled = absint( $_GET['disabled'] ); +); +} elseif ( isset($_GET['disabled']) ) { + $disabled = absint($_GET['disabled']); @@ -163965,36 +163704,28 @@ - wp_admin_notice( - sprintf( $message, number_format_i18n( $disabled ) ), - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- ) ++wp_admin_notice( ++ sprintf($message, number_format_i18n($disabled)), ++ array( + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + ) - ); -} elseif ( isset( $_GET['error'] ) && 'none' === $_GET['error'] ) { - wp_admin_notice( - __( 'No theme selected.' ), - array( -- 'type' => 'error', -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); -+wp_admin_notice( -+ sprintf($message, number_format_i18n($disabled)), -+ array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) +); +} elseif ( isset($_GET['error']) && 'none' === $_GET['error'] ) { +wp_admin_notice( + __('No theme selected.'), + array( -+ 'type' => 'error', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => 'error', + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); } ?> @@ -164018,7 +163749,7 @@ display(); ?> diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php -index 78af65b9ed..b861bf706c 100644 +index 78af65b9ed..2c3bac53de 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -10,49 +10,49 @@ @@ -164041,16 +163772,14 @@ +get_current_screen()->set_help_sidebar(get_site_screen_help_sidebar_content()); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter site users list' ), - 'heading_pagination' => __( 'Site users list navigation' ), - 'heading_list' => __( 'Site users list' ), -- ) -+ array( -+ 'heading_views' => __('Filter site users list'), -+ 'heading_pagination' => __('Site users list navigation'), -+ 'heading_list' => __('Site users list'), -+ ) ++ 'heading_views' => __('Filter site users list'), ++ 'heading_pagination' => __('Site users list navigation'), ++ 'heading_list' => __('Site users list'), + ) ); -$_SERVER['REQUEST_URI'] = remove_query_arg( 'update', $_SERVER['REQUEST_URI'] ); @@ -164212,7 +163941,7 @@ + if ( ! is_user_member_of_blog($user_id) ) { + wp_die( + '

    ' . __('Something went wrong.') . '

    ' . -+ '

    ' . __('One of the selected users is not a member of this site.') . '

    ', ++ '

    ' . __('One of the selected users is not a member of this site.') . '

    ', + 403 + ); } @@ -164267,7 +163996,7 @@ $parent_file = 'sites.php'; $submenu_file = 'sites.php'; -@@ -209,94 +209,94 @@ $submenu_file = 'sites.php'; +@@ -209,21 +209,21 @@ $submenu_file = 'sites.php'; * * @param bool $bool Whether to show the Add Existing User form. Default true. */ @@ -164293,14 +164022,8 @@ $id, -- 'selected' => 'site-users', -- ) -+ array( -+ 'blog_id' => $id, -+ 'selected' => 'site-users', -+ ) +@@ -233,70 +233,70 @@ network_edit_site_nav( + ) ); -if ( isset( $_GET['update'] ) ) : @@ -164362,18 +164085,14 @@ - wp_admin_notice( - $message, - array( -- 'type' => $type, -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => $type, -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => $type, + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); endif; ?> @@ -164486,7 +164205,7 @@
    diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php -index 402c047312..845c6ab5c1 100644 +index 402c047312..24147954b1 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -10,126 +10,126 @@ @@ -164512,10 +164231,11 @@ +add_screen_option('per_page'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.' ) . '

    ' . - '

    ' . __( 'This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.' ) . '

    ' . - '

    ' . __( 'Hovering over each site reveals seven options (three for the primary site):' ) . '

    ' . @@ -164526,42 +164246,35 @@ - '
  • ' . __( 'Visit to go to the front-end site live.' ) . '
  • ' . - '

    ' . __( 'The site ID is used internally, and is not shown on the front end of the site or to users/viewers.' ) . '

    ' . - '

    ' . __( 'Clicking on bold headings can re-sort this table.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '

    ' . -+ '

    ' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '

    ' . -+ '

    ' . __('Hovering over each site reveals seven options (three for the primary site):') . '

    ' . -+ '
    • ' . __('An Edit link to a separate Edit Site screen.') . '
    • ' . -+ '
    • ' . __('Dashboard leads to the Dashboard for that site.') . '
    • ' . -+ '
    • ' . __('Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.') . '
    • ' . -+ '
    • ' . __('Delete which is a permanent action after the confirmation screens.') . '
    • ' . -+ '
    • ' . __('Visit to go to the front-end site live.') . '
    ' . -+ '

    ' . __('The site ID is used internally, and is not shown on the front end of the site or to users/viewers.') . '

    ' . -+ '

    ' . __('Clicking on bold headings can re-sort this table.') . '

    ', -+ ) ++ '

    ' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '

    ' . ++ '

    ' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '

    ' . ++ '

    ' . __('Hovering over each site reveals seven options (three for the primary site):') . '

    ' . ++ '
    • ' . __('An Edit link to a separate Edit Site screen.') . '
    • ' . ++ '
    • ' . __('Dashboard leads to the Dashboard for that site.') . '
    • ' . ++ '
    • ' . __('Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.') . '
    • ' . ++ '
    • ' . __('Delete which is a permanent action after the confirmation screens.') . '
    • ' . ++ '
    • ' . __('Visit to go to the front-end site live.') . '
    ' . ++ '

    ' . __('The site ID is used internally, and is not shown on the front end of the site or to users/viewers.') . '

    ' . ++ '

    ' . __('Clicking on bold headings can re-sort this table.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Site Management' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Site Management') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Site Management') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_pagination' => __( 'Sites list navigation' ), - 'heading_list' => __( 'Sites list' ), -- ) -+ array( -+ 'heading_pagination' => __('Sites list navigation'), -+ 'heading_list' => __('Sites list'), -+ ) ++ 'heading_pagination' => __('Sites list navigation'), ++ 'heading_list' => __('Sites list'), + ) ); -$id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0; @@ -164709,22 +164422,20 @@ - if ( ! current_user_can( 'delete_site', $site_id ) ) { - $site = get_site( $site_id ); - $site_address = untrailingslashit( $site->domain . $site->path ); -- ++ if ( ! current_user_can('delete_site', $site_id) ) { ++ $site = get_site($site_id); ++ $site_address = untrailingslashit($site->domain . $site->path); + - wp_die( - sprintf( -- /* translators: %s: Site URL. */ ++ wp_die( ++ sprintf( + /* translators: %s: Site URL. */ - __( 'Sorry, you are not allowed to delete the site %s.' ), - $site_address - ), - 403 - ); -+ if ( ! current_user_can('delete_site', $site_id) ) { -+ $site = get_site($site_id); -+ $site_address = untrailingslashit($site->domain . $site->path); -+ -+ wp_die( -+ sprintf( -+ /* translators: %s: Site URL. */ + __('Sorry, you are not allowed to delete the site %s.'), + $site_address + ), @@ -164817,9 +164528,10 @@ $location = remove_query_arg( - array( '_wp_http_referer', '_wpnonce' ), - add_query_arg( $_POST, network_admin_url( 'sites.php' ) ) +- ); + array( '_wp_http_referer', '_wpnonce' ), + add_query_arg($_POST, network_admin_url('sites.php')) - ); ++ ); - wp_redirect( $location ); + wp_redirect($location); @@ -164958,9 +164670,8 @@ 'type' => 'success', 'dismissible' => true, 'id' => 'message', -- ) + ) - ); -+ ) +); } } @@ -165019,7 +164730,7 @@ /** Load WordPress Administration Bootstrap */ diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php -index 4c6febea98..667ca97fbc 100644 +index 4c6febea98..7e04545ad7 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -10,16 +10,16 @@ @@ -165199,14 +164910,12 @@ - wp_admin_notice( - '' . __( 'Caution:' ) . ' ' . __( 'This theme may be active on other sites in the network.' ), - array( -- 'additional_classes' => array( 'error' ), -- ) -- ); + wp_admin_notice( + '' . __('Caution:') . ' ' . __('This theme may be active on other sites in the network.'), + array( -+ 'additional_classes' => array( 'error' ), -+ ) + 'additional_classes' => array( 'error' ), + ) +- ); + ); ?> -

    @@ -165218,14 +164927,12 @@ - wp_admin_notice( - '' . __( 'Caution:' ) . ' ' . __( 'These themes may be active on other sites in the network.' ), - array( -- 'additional_classes' => array( 'error' ), -- ) -- ); + wp_admin_notice( + '' . __('Caution:') . ' ' . __('These themes may be active on other sites in the network.'), + array( -+ 'additional_classes' => array( 'error' ), -+ ) + 'additional_classes' => array( 'error' ), + ) +- ); + ); ?> -

    @@ -165295,47 +165002,42 @@ - esc_url( - add_query_arg( - array( -- 'verify-delete' => 1, -- 'action' => 'delete-selected', -- 'checked' => $_REQUEST['checked'], -- '_wpnonce' => $_REQUEST['_wpnonce'], -- ), -- network_admin_url( 'themes.php' ) -- ) -- ) + $theme, + esc_url( + add_query_arg( + array( -+ 'verify-delete' => 1, -+ 'action' => 'delete-selected', -+ 'checked' => $_REQUEST['checked'], -+ '_wpnonce' => $_REQUEST['_wpnonce'], -+ ), + 'verify-delete' => 1, + 'action' => 'delete-selected', + 'checked' => $_REQUEST['checked'], + '_wpnonce' => $_REQUEST['_wpnonce'], + ), +- network_admin_url( 'themes.php' ) +- ) +- ) +- ); + network_admin_url('themes.php') + ) + ) - ); ++ ); } $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; - wp_redirect( -+wp_redirect( - add_query_arg( +- add_query_arg( - array( - 'deleted' => count( $themes ), -- 'paged' => $paged, -- 's' => $s, -- ), -- network_admin_url( 'themes.php' ) ++wp_redirect( ++ add_query_arg( + array( -+ 'deleted' => count($themes), -+ 'paged' => $paged, -+ 's' => $s, -+ ), -+ network_admin_url('themes.php') - ) ++ 'deleted' => count($themes), + 'paged' => $paged, + 's' => $s, + ), +- network_admin_url( 'themes.php' ) +- ) - ); ++ network_admin_url('themes.php') ++ ) +); exit; case 'enable-auto-update': @@ -165439,22 +165141,18 @@ +add_screen_option('per_page'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.' ) . '

    ' . - '

    ' . __( 'If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.' ) . '

    ' . - '

    ' . __( 'Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '

    ' . -+ '

    ' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.') . '

    ' . -+ '

    ' . __('Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.') . '

    ', -+ ) ++ '

    ' . __('This screen enables and disables the inclusion of themes available to choose in the Appearance menu for each site. It does not activate or deactivate which theme a site is currently using.') . '

    ' . ++ '

    ' . __('If the network admin disables a theme that is in use, it can still remain selected on that site. If another theme is chosen, the disabled theme will not appear in the site’s Appearance > Themes screen.') . '

    ' . ++ '

    ' . __('Themes can be enabled on a site by site basis by the network admin on the Edit Site screen (which has a Themes tab); get there via the Edit action link on the All Sites screen. Only network admins are able to install or edit themes.') . '

    ', + ) ); $help_sidebar_autoupdates = ''; @@ -165462,51 +165160,44 @@ -if ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( 'theme' ) ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'plugins-themes-auto-updates', -- 'title' => __( 'Auto-updates' ), -- 'content' => -- '

    ' . __( 'Auto-updates can be enabled or disabled for each individual theme. Themes with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

    ' . -- '

    ' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '

    ', -- ) -- ); -- -- $help_sidebar_autoupdates = '

    ' . __( 'Documentation on Auto-updates' ) . '

    '; +if ( current_user_can('update_themes') && wp_is_auto_update_enabled_for_type('theme') ) { +get_current_screen()->add_help_tab( + array( -+ 'id' => 'plugins-themes-auto-updates', -+ 'title' => __('Auto-updates'), -+ 'content' => + 'id' => 'plugins-themes-auto-updates', +- 'title' => __( 'Auto-updates' ), ++ 'title' => __('Auto-updates'), + 'content' => +- '

    ' . __( 'Auto-updates can be enabled or disabled for each individual theme. Themes with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

    ' . +- '

    ' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '

    ', + '

    ' . __('Auto-updates can be enabled or disabled for each individual theme. Themes with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.') . '

    ' . + '

    ' . __('Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.') . '

    ', -+ ) + ) +- ); +); -+ + +- $help_sidebar_autoupdates = '

    ' . __( 'Documentation on Auto-updates' ) . '

    '; + $help_sidebar_autoupdates = '

    ' . __('Documentation on Auto-updates') . '

    '; } get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Network Themes' ) . '

    ' . -- $help_sidebar_autoupdates . ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Network Themes') . '

    ' . + $help_sidebar_autoupdates . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Network Themes') . '

    ' . -+ $help_sidebar_autoupdates . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter themes list' ), - 'heading_pagination' => __( 'Themes list navigation' ), - 'heading_list' => __( 'Themes list' ), -- ) -+ array( -+ 'heading_views' => __('Filter themes list'), -+ 'heading_pagination' => __('Themes list navigation'), -+ 'heading_list' => __('Themes list'), -+ ) ++ 'heading_views' => __('Filter themes list'), ++ 'heading_pagination' => __('Themes list navigation'), ++ 'heading_list' => __('Themes list'), + ) ); // Used in the HTML title tag. @@ -165659,18 +165350,14 @@ - wp_admin_notice( - $message, - array( -- 'type' => $type, -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => $type, -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => $type, + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); } ?> @@ -165713,7 +165400,7 @@ /** Load WordPress Administration Bootstrap */ diff --git a/wp-admin/network/upgrade.php b/wp-admin/network/upgrade.php -index 55cbedd643..8e2e7493c0 100644 +index 55cbedd643..df3faf9423 100644 --- a/wp-admin/network/upgrade.php +++ b/wp-admin/network/upgrade.php @@ -13,51 +13,51 @@ require_once __DIR__ . '/admin.php'; @@ -165725,31 +165412,27 @@ $parent_file = 'upgrade.php'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.' ) . '

    ' . - '

    ' . __( 'If a version update to core has not happened, clicking this button will not affect anything.' ) . '

    ' . - '

    ' . __( 'If this process fails for any reason, users logging in to their sites will force the same update.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.') . '

    ' . -+ '

    ' . __('If a version update to core has not happened, clicking this button will not affect anything.') . '

    ' . -+ '

    ' . __('If this process fails for any reason, users logging in to their sites will force the same update.') . '

    ', -+ ) ++ '

    ' . __('Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.') . '

    ' . ++ '

    ' . __('If a version update to core has not happened, clicking this button will not affect anything.') . '

    ' . ++ '

    ' . __('If this process fails for any reason, users logging in to their sites will force the same update.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Upgrade Network' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Upgrade Network') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Upgrade Network') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -165788,15 +165471,13 @@ 'spam' => 0, 'deleted' => 0, 'archived' => 0, -@@ -68,38 +68,38 @@ switch ( $action ) { - 'order' => 'DESC', +@@ -69,38 +69,38 @@ switch ( $action ) { 'orderby' => 'id', 'update_site_meta_cache' => false, -- ) + ) - ); - if ( empty( $site_ids ) ) { - echo '

    ' . __( 'All done!' ) . '

    '; -+ ) +); + if ( empty($site_ids) ) { + echo '

    ' . __('All done!') . '

    '; @@ -165814,9 +165495,11 @@ echo "
  • $siteurl
  • "; - $response = wp_remote_get( +- $upgrade_url, +- array( +$response = wp_remote_get( - $upgrade_url, - array( ++ $upgrade_url, ++ array( 'timeout' => 120, 'httpversion' => '1.1', 'sslverify' => false, @@ -165828,20 +165511,21 @@ + if ( is_wp_error($response) ) { wp_die( - sprintf( -- /* translators: 1: Site URL, 2: Server error message. */ ++ sprintf( + /* translators: 1: Site URL, 2: Server error message. */ - __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s' ), - $siteurl, - '' . $response->get_error_message() . '' - ) -+ sprintf( -+ /* translators: 1: Site URL, 2: Server error message. */ +- ); + __('Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s'), + $siteurl, + '' . $response->get_error_message() . '' + ) - ); ++ ); } + /** @@ -110,7 +110,7 @@ switch ( $action ) { * * @param array $response The upgrade response array. @@ -165893,7 +165577,7 @@ } ?> diff --git a/wp-admin/network/user-new.php b/wp-admin/network/user-new.php -index 6c9b69bc7c..5af0b473e1 100644 +index 6c9b69bc7c..a8d59d763c 100644 --- a/wp-admin/network/user-new.php +++ b/wp-admin/network/user-new.php @@ -10,49 +10,49 @@ @@ -165907,29 +165591,25 @@ } get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'Add User will set up a new user account on the network and send that person an email with username and password.' ) . '

    ' . - '

    ' . __( 'Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('Add User will set up a new user account on the network and send that person an email with username and password.') . '

    ' . -+ '

    ' . __('Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.') . '

    ', -+ ) ++ '

    ' . __('Add User will set up a new user account on the network and send that person an email with username and password.') . '

    ' . ++ '

    ' . __('Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Network Users' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Network Users') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Network Users') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); -if ( isset( $_REQUEST['action'] ) && 'add-user' === $_REQUEST['action'] ) { @@ -165978,20 +165658,19 @@ + do_action('network_user_new_created_user', $user_id); - wp_redirect( -+wp_redirect( - add_query_arg( +- add_query_arg( - array( -- 'update' => 'added', -- 'user_id' => $user_id, -- ), -- 'user-new.php' ++wp_redirect( ++ add_query_arg( + array( -+ 'update' => 'added', -+ 'user_id' => $user_id, -+ ), -+ 'user-new.php' - ) + 'update' => 'added', + 'user_id' => $user_id, + ), +- 'user-new.php' +- ) - ); ++ 'user-new.php' ++ ) +); exit; } @@ -166039,18 +165718,14 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); } @@ -166064,20 +165739,15 @@ - wp_admin_notice( - $error_messages, - array( -- 'type' => 'error', -- 'dismissible' => true, -- 'id' => 'message', -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $error_messages, + array( -+ 'type' => 'error', -+ 'dismissible' => true, -+ 'id' => 'message', -+ 'paragraph_wrap' => false, -+ ) + 'type' => 'error', + 'dismissible' => true, + 'id' => 'message', + 'paragraph_wrap' => false, + ) +- ); +); } ?> @@ -166116,7 +165786,7 @@ diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php -index d0b40e710d..acf885ec31 100644 +index d0b40e710d..ed1298ac5e 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -10,167 +10,167 @@ @@ -166215,16 +165885,15 @@ - if ( is_super_admin( $user->ID ) ) { - wp_die( - sprintf( -- /* translators: %s: User login. */ -- __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), -- esc_html( $user->user_login ) -- ) -- ); + $user = get_userdata($user_id); + if ( is_super_admin($user->ID) ) { + wp_die( + sprintf( -+ /* translators: %s: User login. */ + /* translators: %s: User login. */ +- __( 'Warning! User cannot be modified. The user %s is a network administrator.' ), +- esc_html( $user->user_login ) +- ) +- ); + __('Warning! User cannot be modified. The user %s is a network administrator.'), + esc_html($user->user_login) + ) @@ -166290,19 +165959,17 @@ wp_safe_redirect( - add_query_arg( - array( -- 'updated' => 'true', -- 'action' => $userfunction, -- ), -- wp_get_referer() -- ) + add_query_arg( + array( -+ 'updated' => 'true', -+ 'action' => $userfunction, -+ ), + 'updated' => 'true', + 'action' => $userfunction, + ), +- wp_get_referer() +- ) +- ); + wp_get_referer() + ) - ); ++ ); } else { - $location = network_admin_url( 'users.php' ); + $location = network_admin_url('users.php'); @@ -166366,20 +166033,19 @@ } - wp_redirect( -+wp_redirect( - add_query_arg( +- add_query_arg( - array( -- 'updated' => 'true', -- 'action' => $deletefunction, -- ), -- network_admin_url( 'users.php' ) ++wp_redirect( ++ add_query_arg( + array( -+ 'updated' => 'true', -+ 'action' => $deletefunction, -+ ), -+ network_admin_url('users.php') - ) + 'updated' => 'true', + 'action' => $deletefunction, + ), +- network_admin_url( 'users.php' ) +- ) - ); ++ network_admin_url('users.php') ++ ) +); exit; } @@ -166407,50 +166073,44 @@ +add_screen_option('per_page'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'This table shows all users across the network and the sites to which they are assigned.' ) . '

    ' . - '

    ' . __( 'Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.' ) . '

    ' . - '

    ' . __( 'You can also go to the user’s profile page by clicking on the individual username.' ) . '

    ' . - '

    ' . __( 'You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.' ) . '

    ' . - '

    ' . __( 'The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.' ) . '

    ' . - '

    ' . __( 'You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('This table shows all users across the network and the sites to which they are assigned.') . '

    ' . -+ '

    ' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '

    ' . -+ '

    ' . __('You can also go to the user’s profile page by clicking on the individual username.') . '

    ' . -+ '

    ' . __('You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.') . '

    ' . -+ '

    ' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '

    ' . -+ '

    ' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '

    ', -+ ) ++ '

    ' . __('This table shows all users across the network and the sites to which they are assigned.') . '

    ' . ++ '

    ' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to their Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '

    ' . ++ '

    ' . __('You can also go to the user’s profile page by clicking on the individual username.') . '

    ' . ++ '

    ' . __('You can sort the table by clicking on any of the table headings and switch between list and excerpt views by using the icons above the users list.') . '

    ' . ++ '

    ' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '

    ' . ++ '

    ' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Network Users' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Network Users') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Network Users') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter users list' ), - 'heading_pagination' => __( 'Users list navigation' ), - 'heading_list' => __( 'Users list' ), -- ) -+ array( -+ 'heading_views' => __('Filter users list'), -+ 'heading_pagination' => __('Users list navigation'), -+ 'heading_list' => __('Users list'), -+ ) ++ 'heading_views' => __('Filter users list'), ++ 'heading_pagination' => __('Users list navigation'), ++ 'heading_list' => __('Users list'), + ) ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -166484,18 +166144,14 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'success', -- 'dismissible' => true, -- 'id' => 'message', -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => 'success', -+ 'dismissible' => true, -+ 'id' => 'message', -+ ) + 'type' => 'success', + 'dismissible' => true, + 'id' => 'message', + ) +- ); +); } ?> @@ -166537,7 +166193,7 @@
    diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php -index 19e3c45dc8..88c900ac82 100644 +index 19e3c45dc8..b79c1851e1 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -8,105 +8,105 @@ @@ -166559,27 +166215,24 @@ +add_action('admin_print_footer_scripts', 'options_discussion_add_js'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => '

    ' . __( 'This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they will not all fit here! :) Use the documentation links to get information on what each discussion setting does.' ) . '

    ' . - '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => '

    ' . __('This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they will not all fit here! :) Use the documentation links to get information on what each discussion setting does.') . '

    ' . -+ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', -+ ) ++ 'title' => __('Overview'), ++ 'content' => '

    ' . __('This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they will not all fit here! :) Use the documentation links to get information on what each discussion setting does.') . '

    ' . ++ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Discussion Settings' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Discussion Settings') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Discussion Settings') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -166662,8 +166315,8 @@ /* translators: %s: Number of days. */ - __( 'Automatically close comments on posts older than %s days' ), - ' @@ -166699,7 +166352,7 @@ $thread_comments_depth .= " selected='selected'"; } $thread_comments_depth .= ">$i"; -@@ -128,28 +128,28 @@ for ( $i = 2; $i <= $maxdeep; $i++ ) { +@@ -128,27 +128,27 @@ for ( $i = 2; $i <= $maxdeep; $i++ ) { $thread_comments_depth .= ''; /* translators: %s: Number of levels. */ @@ -166730,13 +166383,11 @@ /* translators: 1: Form field control for number of top level comments per page, 2: Form field control for the 'first' or 'last' page. */ - __( 'Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default' ), - ' @@ -158,103 +158,103 @@ printf( ' -+ __('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), -+ '' ++ __('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), ++ '' ); ?>

    @@ -167008,7 +166659,7 @@
    diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php -index 490a138580..ed58677cc2 100644 +index 490a138580..4d0eeb0565 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -12,88 +12,88 @@ require_once __DIR__ . '/admin.php'; @@ -167072,25 +166723,21 @@ + '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $options_help, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $options_help, -+ ) ++ 'title' => __('Overview'), + 'content' => $options_help, + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on General Settings' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on General Settings') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on General Settings') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -167126,9 +166773,8 @@ $tagline_description = sprintf( /* translators: %s: Site tagline example. */ - __( 'In a few words, explain what this site is about. Example: “%s.”' ), -- $sample_tagline -+ __('In a few words, explain what this site is about. Example: “%s.”'), -+ $sample_tagline ++ __('In a few words, explain what this site is about. Example: “%s.”'), + $sample_tagline ); ?> @@ -167210,9 +166856,6 @@ - wp_admin_notice( - $pending_admin_email_message, - array( -- 'additional_classes' => array( 'updated', 'inline' ), -- ) -- ); + __('There is a pending change of the admin email to %s.'), + '' . esc_html($new_admin_email) . '' +); @@ -167224,8 +166867,9 @@ +wp_admin_notice( + $pending_admin_email_message, + array( -+ 'additional_classes' => array( 'updated', 'inline' ), -+ ) + 'additional_classes' => array( 'updated', 'inline' ), + ) +- ); +); } ?> @@ -167259,7 +166903,7 @@ -@@ -188,38 +188,38 @@ if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) { +@@ -188,39 +188,39 @@ if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) { $languages = get_available_languages(); $translations = wp_get_available_translations(); @@ -167282,8 +166926,9 @@ } - wp_dropdown_languages( +- array( +wp_dropdown_languages( - array( ++ array( 'name' => 'WPLANG', 'id' => 'WPLANG', 'selected' => $locale, @@ -167303,13 +166948,15 @@ - '4.0.0', - /* translators: 1: WPLANG, 2: wp-config.php */ - sprintf( __( 'The %1$s constant in your %2$s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) +- ); + 'define()', + '4.0.0', + /* translators: 1: WPLANG, 2: wp-config.php */ -+ sprintf(__('The %1$s constant in your %2$s file is no longer needed.'), 'WPLANG', 'wp-config.php') - ); ++ sprintf(__('The %1$s constant in your %2$s file is no longer needed.'), 'WPLANG', 'wp-config.php') ++ ); } ?> + @@ -230,17 +230,17 @@ if ( ! empty( $languages ) || ! empty( $translations ) ) { ?> @@ -167424,12 +167071,13 @@ /* translators: %s: Date and time. */ - __( 'Standard time begins on: %s.' ); - printf( -+ __('Standard time begins on: %s.'); -+printf( - $message, +- $message, - '' . wp_date( __( 'F j, Y' ) . ' ' . __( 'g:i a' ), $transitions[1]['ts'] ) . '' - ); -+ '' . wp_date(__('F j, Y') . ' ' . __('g:i a'), $transitions[1]['ts']) . '' ++ __('Standard time begins on: %s.'); ++printf( ++ $message, ++ '' . wp_date(__('F j, Y') . ' ' . __('g:i a'), $transitions[1]['ts']) . '' +); } else { - _e( 'This timezone does not observe daylight saving time.' ); @@ -167604,7 +167252,7 @@ settings_errors(); diff --git a/wp-admin/options-media.php b/wp-admin/options-media.php -index ce814c9d38..5b1a05d55a 100644 +index ce814c9d38..a19fe4fb5c 100644 --- a/wp-admin/options-media.php +++ b/wp-admin/options-media.php @@ -9,37 +9,37 @@ @@ -167639,25 +167287,21 @@ +$media_options_help .= '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $media_options_help, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $media_options_help, -+ ) ++ 'title' => __('Overview'), + 'content' => $media_options_help, + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Media Settings' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Media Settings') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Media Settings') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -167831,7 +167475,7 @@ diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php -index 379dc8a0f5..c35021377d 100644 +index 379dc8a0f5..ba7651bcf2 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -9,69 +9,69 @@ @@ -167850,32 +167494,27 @@ $parent_file = 'options-general.php'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => '

    ' . __( 'Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change — hence the name permalink.' ) . '

    ' . - '

    ' . __( 'This screen allows you to choose your permalink structure. You can choose from common settings or create custom URL structures.' ) . '

    ' . - '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => '

    ' . __('Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change — hence the name permalink.') . '

    ' . -+ '

    ' . __('This screen allows you to choose your permalink structure. You can choose from common settings or create custom URL structures.') . '

    ' . -+ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', -+ ) ++ 'title' => __('Overview'), ++ 'content' => '

    ' . __('Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change — hence the name permalink.') . '

    ' . ++ '

    ' . __('This screen allows you to choose your permalink structure. You can choose from common settings or create custom URL structures.') . '

    ' . ++ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'permalink-settings', + array( + 'id' => 'permalink-settings', - 'title' => __( 'Permalink Settings' ), - 'content' => '

    ' . __( 'Permalinks can contain useful information, such as the post date, title, or other elements. You can choose from any of the suggested permalink formats, or you can craft your own if you select Custom Structure.' ) . '

    ' . - '

    ' . sprintf( -+ array( -+ 'id' => 'permalink-settings', -+ 'title' => __('Permalink Settings'), -+ 'content' => '

    ' . __('Permalinks can contain useful information, such as the post date, title, or other elements. You can choose from any of the suggested permalink formats, or you can craft your own if you select Custom Structure.') . '

    ' . ++ 'title' => __('Permalink Settings'), ++ 'content' => '

    ' . __('Permalinks can contain useful information, such as the post date, title, or other elements. You can choose from any of the suggested permalink formats, or you can craft your own if you select Custom Structure.') . '

    ' . + '

    ' . sprintf( /* translators: %s: Percent sign (%). */ - __( 'If you pick an option other than Plain, your general URL path with structure tags (terms surrounded by %s) will also appear in the custom structure field and your path can be further modified there.' ), @@ -167892,28 +167531,24 @@ - '%tag%' - ) . '

    ' . - '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    ', -- ) + __('When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes %1$s or %2$s.'), + '%category%', + '%tag%' + ) . '

    ' . -+ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', -+ ) ++ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'custom-structures', + array( + 'id' => 'custom-structures', - 'title' => __( 'Custom Structures' ), - 'content' => '

    ' . __( 'The Optional fields let you customize the “category” and “tag” base names that will appear in archive URLs. For example, the page listing all posts in the “Uncategorized” category could be /topics/uncategorized instead of /category/uncategorized.' ) . '

    ' . - '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    ', -- ) -+ array( -+ 'id' => 'custom-structures', -+ 'title' => __('Custom Structures'), -+ 'content' => '

    ' . __('The Optional fields let you customize the “category” and “tag” base names that will appear in archive URLs. For example, the page listing all posts in the “Uncategorized” category could be /topics/uncategorized instead of /category/uncategorized.') . '

    ' . -+ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', -+ ) ++ 'title' => __('Custom Structures'), ++ 'content' => '

    ' . __('The Optional fields let you customize the “category” and “tag” base names that will appear in archive URLs. For example, the page listing all posts in the “Uncategorized” category could be /topics/uncategorized instead of /category/uncategorized.') . '

    ' . ++ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', + ) ); -$help_sidebar_content = '

    ' . __( 'For more information:' ) . '

    ' . @@ -168067,26 +167702,29 @@ /* translators: %s: web.config */ - __( 'You should update your %s file now.' ), - 'web.config' +- ); + __('You should update your %s file now.'), + 'web.config' - ); ++ ); } else { $message = sprintf( /* translators: %s: web.config */ - __( 'Permalink structure updated. Remove write access on %s file now!' ), - 'web.config' +- ); + __('Permalink structure updated. Remove write access on %s file now!'), + 'web.config' - ); ++ ); } } elseif ( ! $is_nginx && $htaccess_update_required && ! $writable ) { - $message = sprintf( +$message = sprintf( /* translators: %s: .htaccess */ - __( 'You should update your %s file now.' ), -+ __('You should update your %s file now.'), - '.htaccess' +- '.htaccess' - ); ++ __('You should update your %s file now.'), ++ '.htaccess' +); } } @@ -168121,8 +167759,8 @@ /* translators: %s: Documentation URL. */ - __( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.' ), - __( 'https://wordpress.org/documentation/article/customize-permalinks/' ) -+ __('WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.'), -+ __('https://wordpress.org/documentation/article/customize-permalinks/') ++ __('WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A number of tags are available, and here are some examples to get you started.'), ++ __('https://wordpress.org/documentation/article/customize-permalinks/') ); ?>

    @@ -168224,7 +167862,7 @@ ); /** -@@ -305,51 +305,51 @@ $available_tags = array( +@@ -305,21 +305,21 @@ $available_tags = array( * * @param string[] $available_tags An array of key => value pairs of available permalink structure tags. */ @@ -168248,12 +167886,11 @@ printf( /* translators: %s: %postname% */ - __( 'Select the permalink structure for your website. Including the %s tag makes links easy to understand, and can help your posts rank higher in search engines.' ), -- '%postname%' -+ __('Select the permalink structure for your website. Including the %s tag makes links easy to understand, and can help your posts rank higher in search engines.'), -+ '%postname%' ++ __('Select the permalink structure for your website. Including the %s tag makes links easy to understand, and can help your posts rank higher in search engines.'), + '%postname%' ); ?> -

    +@@ -327,29 +327,29 @@ printf( @@ -168347,7 +167984,7 @@ -@@ -409,13 +409,13 @@ printf( +@@ -409,12 +409,12 @@ printf( @@ -168358,12 +167995,10 @@ printf( /* translators: %s: Placeholder that must come at the start of the URL. */ - __( 'If you like, you may enter custom structures for your category and tag URLs here. For example, using topics as your category base would make your category links like %s/topics/uncategorized/. If you leave these blank the defaults will be used.' ), -- $url_base -+ __('If you like, you may enter custom structures for your category and tag URLs here. For example, using topics as your category base would make your category links like %s/topics/uncategorized/. If you leave these blank the defaults will be used.'), -+ $url_base ++ __('If you like, you may enter custom structures for your category and tag URLs here. For example, using topics as your category base would make your category links like %s/topics/uncategorized/. If you leave these blank the defaults will be used.'), + $url_base ); ?> -

    @@ -424,31 +424,31 @@ printf( @@ -168402,7 +168037,7 @@ -@@ -456,38 +456,38 @@ printf( +@@ -456,39 +456,39 @@ printf( Ctrl + A', - '⌘ + A', - '/<configuration>/<system.webServer>/<rewrite>/<rules>' +- ); + __('Error: Your %1$s file is not writable, so updating it automatically was not possible. This is the URL rewrite rule you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this rule inside of the %5$s element in %1$s file.'), + 'web.config', + __('https://wordpress.org/documentation/article/changing-file-permissions/'), + 'Ctrl + A', + '⌘ + A', + '/<configuration>/<system.webServer>/<rewrite>/<rules>' - ); ++ ); ?>

    @@ -168449,12 +168085,14 @@ /* translators: %s: web.config */ - __( 'If you temporarily make your %s file writable to generate rewrite rules automatically, do not forget to revert the permissions after the rule has been saved.' ), - 'web.config' +- ); + __('If you temporarily make your %s file writable to generate rewrite rules automatically, do not forget to revert the permissions after the rule has been saved.'), + 'web.config' - ); ++ ); ?>

    -@@ -496,30 +496,30 @@ printf( + +@@ -496,31 +496,31 @@ printf( web.config', - 'Ctrl + A', - '⌘ + A' +- ); + __('Error: The root directory of your site is not writable, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.'), + __('https://wordpress.org/documentation/article/changing-file-permissions/'), + 'web.config', + 'Ctrl + A', + '⌘ + A' - ); ++ ); ?>

    @@ -168490,11 +168129,13 @@ /* translators: %s: web.config */ - __( 'If you temporarily make your site’s root directory writable to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ), - 'web.config' +- ); + __('If you temporarily make your site’s root directory writable to generate the %s file automatically, do not forget to revert the permissions after the file has been created.'), + 'web.config' - ); ++ ); ?>

    + @@ -529,24 +529,24 @@ printf(

    @@ -168503,13 +168144,16 @@ +printf( /* translators: 1: .htaccess, 2: Documentation URL, 3: Ctrl + A, 4: ⌘ + A */ - __( 'Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ), -+ __('Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.'), - '.htaccess', +- '.htaccess', - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ), -+ __('https://wordpress.org/documentation/article/changing-file-permissions/'), - 'Ctrl + A', - '⌘ + A' +- 'Ctrl + A', +- '⌘ + A' - ); ++ __('Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.'), ++ '.htaccess', ++ __('https://wordpress.org/documentation/article/changing-file-permissions/'), ++ 'Ctrl + A', ++ '⌘ + A' +); ?>

    @@ -168528,10 +168172,10 @@
    diff --git a/wp-admin/options-privacy.php b/wp-admin/options-privacy.php -index 6441a43491..5c990f9b65 100644 +index 6441a43491..1b77551d3a 100644 --- a/wp-admin/options-privacy.php +++ b/wp-admin/options-privacy.php -@@ -9,52 +9,52 @@ +@@ -9,17 +9,17 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; @@ -168552,44 +168196,32 @@ +$title = __('Privacy'); add_filter( -- 'admin_body_class', -- static function ( $body_class ) { -- $body_class .= ' privacy-settings '; -+ 'admin_body_class', -+ static function ( $body_class ) { -+ $body_class .= ' privacy-settings '; - -- return $body_class; -- } -+ return $body_class; -+ } + 'admin_body_class', +@@ -30,31 +30,31 @@ add_filter( + } ); -$action = isset( $_POST['action'] ) ? $_POST['action'] : ''; +$action = isset($_POST['action']) ? $_POST['action'] : ''; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'The Privacy screen lets you either build a new privacy-policy page or choose one you already have to show.' ) . '

    ' . - '

    ' . __( 'This screen includes suggestions to help you write your own privacy policy. However, it is your responsibility to use these resources correctly, to provide the information required by your privacy policy, and to keep this information current and accurate.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('The Privacy screen lets you either build a new privacy-policy page or choose one you already have to show.') . '

    ' . + '

    ' . __('This screen includes suggestions to help you write your own privacy policy. However, it is your responsibility to use these resources correctly, to provide the information required by your privacy policy, and to keep this information current and accurate.') . '

    ', -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Privacy Settings' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Privacy Settings') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Privacy Settings') . '

    ' ); -if ( ! empty( $action ) ) { @@ -168623,9 +168255,10 @@ /* translators: %s: URL to Customizer -> Menus. */ - __( 'Privacy Policy page setting updated successfully. Remember to update your menus!' ), - esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus', admin_url( 'customize.php' ) ) ) +- ); + __('Privacy Policy page setting updated successfully. Remember to update your menus!'), + esc_url(add_query_arg('autofocus[panel]', 'nav_menus', admin_url('customize.php'))) - ); ++ ); } } @@ -168648,23 +168281,26 @@ 'post_status' => 'draft', 'post_type' => 'page', 'post_content' => $privacy_policy_page_content, -- ), + ), - true - ); -+ ), -+ true -+); - +- - if ( is_wp_error( $privacy_policy_page_id ) ) { - add_settings_error( -+ if ( is_wp_error($privacy_policy_page_id) ) { -+add_settings_error( - 'page_for_privacy_policy', - 'page_for_privacy_policy', +- 'page_for_privacy_policy', +- 'page_for_privacy_policy', - __( 'Unable to create a Privacy Policy page.' ), -+ __('Unable to create a Privacy Policy page.'), - 'error' +- 'error' - ); ++ true ++); ++ ++ if ( is_wp_error($privacy_policy_page_id) ) { ++add_settings_error( ++ 'page_for_privacy_policy', ++ 'page_for_privacy_policy', ++ __('Unable to create a Privacy Policy page.'), ++ 'error' +); } else { - update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id ); @@ -168704,18 +168340,23 @@ } else { if ( 'trash' === $privacy_policy_page->post_status ) { - add_settings_error( +- 'page_for_privacy_policy', +- 'page_for_privacy_policy', +- sprintf( +add_settings_error( - 'page_for_privacy_policy', - 'page_for_privacy_policy', - sprintf( ++ 'page_for_privacy_policy', ++ 'page_for_privacy_policy', ++ sprintf( /* translators: %s: URL to Pages Trash. */ - __( 'The currently selected Privacy Policy page is in the Trash. Please create or select a new Privacy Policy page or restore the current page.' ), - 'edit.php?post_status=trash&post_type=page' +- ), +- 'error' +- ); + __('The currently selected Privacy Policy page is in the Trash. Please create or select a new Privacy Policy page or restore the current page.'), + 'edit.php?post_status=trash&post_type=page' - ), - 'error' -- ); ++ ), ++ 'error' +); } else { $privacy_policy_page_exists = true; @@ -168758,21 +168399,16 @@ ?> -@@ -179,82 +179,82 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -179,7 +179,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; 'error', -- 'additional_classes' => array( 'hide-if-js' ), -- ) -+ __('The Privacy Settings require JavaScript.'), -+ array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'hide-if-js' ), -+ ) - ); ++ __('The Privacy Settings require JavaScript.'), + array( + 'type' => 'error', + 'additional_classes' => array( 'hide-if-js' ), +@@ -188,65 +188,65 @@ wp_admin_notice( ?>
    @@ -168800,15 +168436,16 @@ $privacy_policy_page_id, 'action' => 'edit', ), - admin_url( 'post.php' ) - ); - $view_href = get_permalink( $privacy_policy_page_id ); -+ admin_url('post.php') ++ admin_url('post.php') +); + $view_href = get_permalink($privacy_policy_page_id); ?> @@ -168863,21 +168500,16 @@ 'page', -- 'posts_per_page' => 1, -- 'post_status' => array( +$has_pages = (bool) get_posts( + array( -+ 'post_type' => 'page', -+ 'posts_per_page' => 1, -+ 'post_status' => array( - 'publish', + 'post_type' => 'page', + 'posts_per_page' => 1, + 'post_status' => array( +@@ -254,7 +254,7 @@ wp_admin_notice( 'draft', -- ), -- ) + ), + ) - ); -+ ), -+ ) +); ?> @@ -168923,35 +168555,28 @@ 'page_for_privacy_policy', -- 'show_option_none' => __( '— Select —' ), -- 'option_none_value' => '0', -- 'selected' => $privacy_policy_page_id, -- 'post_status' => array( 'draft', 'publish' ), -- ) -- ); -- -- wp_nonce_field( 'set-privacy-page' ); -- -- submit_button( __( 'Use This Page' ), 'primary', 'submit', false, array( 'id' => 'set-page' ) ); + wp_dropdown_pages( + array( -+ 'name' => 'page_for_privacy_policy', -+ 'show_option_none' => __('— Select —'), -+ 'option_none_value' => '0', -+ 'selected' => $privacy_policy_page_id, -+ 'post_status' => array( 'draft', 'publish' ), -+ ) + 'name' => 'page_for_privacy_policy', +- 'show_option_none' => __( '— Select —' ), ++ 'show_option_none' => __('— Select —'), + 'option_none_value' => '0', + 'selected' => $privacy_policy_page_id, + 'post_status' => array( 'draft', 'publish' ), + ) +- ); + ); -+ + +- wp_nonce_field( 'set-privacy-page' ); + wp_nonce_field('set-privacy-page'); -+ + +- submit_button( __( 'Use This Page' ), 'primary', 'submit', false, array( 'id' => 'set-page' ) ); + submit_button(__('Use This Page'), 'primary', 'submit', false, array( 'id' => 'set-page' )); ?> diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php -index c2ee28d518..b0e96ea382 100644 +index c2ee28d518..ca79b0dc15 100644 --- a/wp-admin/options-reading.php +++ b/wp-admin/options-reading.php @@ -9,63 +9,63 @@ @@ -168973,15 +168598,13 @@ +add_action('admin_head', 'options_reading_add_js'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => '

    ' . __( 'This screen contains the settings that affect the display of your content.' ) . '

    ' . - '

    ' . sprintf( -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => '

    ' . __('This screen contains the settings that affect the display of your content.') . '

    ' . ++ 'title' => __('Overview'), ++ 'content' => '

    ' . __('This screen contains the settings that affect the display of your content.') . '

    ' . + '

    ' . sprintf( /* translators: %s: URL to create a new page. */ - __( 'You can choose what’s displayed on the homepage of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static homepage, you first need to create two Pages. One will become the homepage, and the other will be where your posts are displayed.' ), @@ -168997,38 +168620,34 @@ - __( 'https://wordpress.org/documentation/article/wordpress-feeds/' ) - ) . '

    ' . - '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    ', -- ) + __('You can also control the display of your content in RSS feeds, including the maximum number of posts to display and whether to show full text or an excerpt. Learn more about feeds.'), + __('https://wordpress.org/documentation/article/wordpress-feeds/') + ) . '

    ' . -+ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', -+ ) ++ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'site-visibility', + array( + 'id' => 'site-visibility', - 'title' => has_action( 'blog_privacy_selector' ) ? __( 'Site visibility' ) : __( 'Search engine visibility' ), - 'content' => '

    ' . __( 'You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the checkbox next to “Discourage search engines from indexing this site” and click the Save Changes button at the bottom of the screen.' ) . '

    ' . - '

    ' . __( 'Note that even when set to discourage search engines, your site is still visible on the web and not all search engines adhere to this directive.' ) . '

    ' . - '

    ' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, “Search engines discouraged”, to remind you that you have directed search engines to not crawl your site.' ) . '

    ', -- ) -+ array( -+ 'id' => 'site-visibility', -+ 'title' => has_action('blog_privacy_selector') ? __('Site visibility') : __('Search engine visibility'), -+ 'content' => '

    ' . __('You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the checkbox next to “Discourage search engines from indexing this site” and click the Save Changes button at the bottom of the screen.') . '

    ' . -+ '

    ' . __('Note that even when set to discourage search engines, your site is still visible on the web and not all search engines adhere to this directive.') . '

    ' . -+ '

    ' . __('When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, “Search engines discouraged”, to remind you that you have directed search engines to not crawl your site.') . '

    ', -+ ) ++ 'title' => has_action('blog_privacy_selector') ? __('Site visibility') : __('Search engine visibility'), ++ 'content' => '

    ' . __('You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the checkbox next to “Discourage search engines from indexing this site” and click the Save Changes button at the bottom of the screen.') . '

    ' . ++ '

    ' . __('Note that even when set to discourage search engines, your site is still visible on the web and not all search engines adhere to this directive.') . '

    ' . ++ '

    ' . __('When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, “Search engines discouraged”, to remind you that you have directed search engines to not crawl your site.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Reading Settings' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Reading Settings') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Reading Settings') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -169111,23 +168730,19 @@ - __( 'Homepage: %s' ), - wp_dropdown_pages( - array( -- 'name' => 'page_on_front', -- 'echo' => 0, ++ __('Homepage: %s'), ++ wp_dropdown_pages( ++ array( + 'name' => 'page_on_front', + 'echo' => 0, - 'show_option_none' => __( '— Select —' ), -- 'option_none_value' => '0', ++ 'show_option_none' => __('— Select —'), + 'option_none_value' => '0', - 'selected' => get_option( 'page_on_front' ), -- ) ++ 'selected' => get_option('page_on_front'), + ) - ) - ); -+ __('Homepage: %s'), -+ wp_dropdown_pages( -+ array( -+ 'name' => 'page_on_front', -+ 'echo' => 0, -+ 'show_option_none' => __('— Select —'), -+ 'option_none_value' => '0', -+ 'selected' => get_option('page_on_front'), -+ ) + ) +); ?> @@ -169140,23 +168755,19 @@ - __( 'Posts page: %s' ), - wp_dropdown_pages( - array( -- 'name' => 'page_for_posts', -- 'echo' => 0, ++ __('Posts page: %s'), ++ wp_dropdown_pages( ++ array( + 'name' => 'page_for_posts', + 'echo' => 0, - 'show_option_none' => __( '— Select —' ), -- 'option_none_value' => '0', ++ 'show_option_none' => __('— Select —'), + 'option_none_value' => '0', - 'selected' => get_option( 'page_for_posts' ), -- ) ++ 'selected' => get_option('page_for_posts'), + ) - ) - ); -+ __('Posts page: %s'), -+ wp_dropdown_pages( -+ array( -+ 'name' => 'page_for_posts', -+ 'echo' => 0, -+ 'show_option_none' => __('— Select —'), -+ 'option_none_value' => '0', -+ 'selected' => get_option('page_for_posts'), -+ ) + ) +); ?> @@ -169174,9 +168785,8 @@ 'type' => 'warning', 'id' => 'front-page-warning', 'additional_classes' => array( 'inline' ), -- ) + ) - ); -+ ) +); endif; - if ( get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_for_posts' ) || get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_on_front' ) ) : @@ -169190,9 +168800,8 @@ 'type' => 'warning', 'id' => 'privacy-policy-page-warning', 'additional_classes' => array( 'inline' ), -- ) + ) - ); -+ ) +); endif; ?> @@ -169305,10 +168914,10 @@ diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php -index b65f19ebf9..9127f8e5ea 100644 +index b65f19ebf9..8e8f38147d 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php -@@ -9,200 +9,200 @@ +@@ -9,81 +9,81 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; @@ -169324,36 +168933,31 @@ $parent_file = 'options-general.php'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), - 'content' => '

    ' . __( 'You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.' ) . '

    ' . - '

    ' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => '

    ' . __('You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.') . '

    ' . -+ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', -+ ) ++ 'title' => __('Overview'), ++ 'content' => '

    ' . __('You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.') . '

    ' . ++ '

    ' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '

    ', + ) ); /** This filter is documented in wp-admin/options.php */ -if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'options-postemail', -- 'title' => __( 'Post Via Email' ), -- 'content' => '

    ' . __( 'Post via email settings allow you to send your WordPress installation an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.' ) . '

    ', -- ) -- ); +if ( apply_filters('enable_post_by_email_configuration', true) ) { +get_current_screen()->add_help_tab( + array( -+ 'id' => 'options-postemail', -+ 'title' => __('Post Via Email'), -+ 'content' => '

    ' . __('Post via email settings allow you to send your WordPress installation an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.') . '

    ', -+ ) + 'id' => 'options-postemail', +- 'title' => __( 'Post Via Email' ), +- 'content' => '

    ' . __( 'Post via email settings allow you to send your WordPress installation an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.' ) . '

    ', ++ 'title' => __('Post Via Email'), ++ 'content' => '

    ' . __('Post via email settings allow you to send your WordPress installation an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.') . '

    ', + ) +- ); +); } @@ -169361,18 +168965,16 @@ -if ( apply_filters( 'enable_update_services_configuration', true ) ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'options-services', -- 'title' => __( 'Update Services' ), -- 'content' => '

    ' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '

    ', -- ) -- ); +if ( apply_filters('enable_update_services_configuration', true) ) { +get_current_screen()->add_help_tab( + array( -+ 'id' => 'options-services', -+ 'title' => __('Update Services'), -+ 'content' => '

    ' . __('If desired, WordPress will automatically alert various services of your new posts.') . '

    ', -+ ) + 'id' => 'options-services', +- 'title' => __( 'Update Services' ), +- 'content' => '

    ' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '

    ', ++ 'title' => __('Update Services'), ++ 'content' => '

    ' . __('If desired, WordPress will automatically alert various services of your new posts.') . '

    ', + ) +- ); +); } @@ -169380,9 +168982,9 @@ - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Writing Settings' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Writing Settings') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Writing Settings') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); -wp_enqueue_script( 'user-profile' ); @@ -169428,23 +169030,16 @@ +@@ -100,109 +100,109 @@ wp_dropdown_categories( 0, -- 'name' => 'default_link_category', -- 'orderby' => 'name', -- 'selected' => get_option( 'default_link_category' ), -- 'hierarchical' => true, -- 'taxonomy' => 'link_category', -- ) -- ); +wp_dropdown_categories( + array( -+ 'hide_empty' => 0, -+ 'name' => 'default_link_category', -+ 'orderby' => 'name', -+ 'selected' => get_option('default_link_category'), -+ 'hierarchical' => true, -+ 'taxonomy' => 'link_category', -+ ) + 'hide_empty' => 0, + 'name' => 'default_link_category', + 'orderby' => 'name', +- 'selected' => get_option( 'default_link_category' ), ++ 'selected' => get_option('default_link_category'), + 'hierarchical' => true, + 'taxonomy' => 'link_category', + ) +- ); +); ?> @@ -169576,21 +169165,16 @@ 0, -- 'name' => 'default_email_category', -- 'orderby' => 'name', -- 'selected' => get_option( 'default_email_category' ), -- 'hierarchical' => true, -- ) -- ); +wp_dropdown_categories( + array( -+ 'hide_empty' => 0, -+ 'name' => 'default_email_category', -+ 'orderby' => 'name', -+ 'selected' => get_option('default_email_category'), -+ 'hierarchical' => true, -+ ) + 'hide_empty' => 0, + 'name' => 'default_email_category', + 'orderby' => 'name', +- 'selected' => get_option( 'default_email_category' ), ++ 'selected' => get_option('default_email_category'), + 'hierarchical' => true, + ) +- ); +); ?> @@ -169657,7 +169241,7 @@ diff --git a/wp-admin/options.php b/wp-admin/options.php -index 3e2e104214..da8d72437e 100644 +index 3e2e104214..470ac5356d 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -19,16 +19,16 @@ @@ -169697,7 +169281,7 @@ +if ( ! current_user_can($capability) ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to manage options for this site.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to manage options for this site.') . '

    ', + 403 +); } @@ -169750,7 +169334,7 @@ +if ( is_multisite() && ! current_user_can('manage_network_options') && 'update' !== $action ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to delete these items.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to delete these items.') . '

    ', + 403 +); } @@ -169811,20 +169395,12 @@ } } -@@ -216,11 +216,11 @@ if ( ! is_multisite() ) { - * @param array $allowed_options The allowed options list. - */ - $allowed_options = apply_filters_deprecated( -- 'whitelist_options', -- array( $allowed_options ), -- '5.5.0', -- 'allowed_options', +@@ -220,7 +220,7 @@ $allowed_options = apply_filters_deprecated( + array( $allowed_options ), + '5.5.0', + 'allowed_options', - __( 'Please consider writing more inclusive code.' ) -+ 'whitelist_options', -+ array( $allowed_options ), -+ '5.5.0', -+ 'allowed_options', -+ __('Please consider writing more inclusive code.') ++ __('Please consider writing more inclusive code.') ); /** @@ -169917,13 +169493,16 @@ } - add_settings_error( -+add_settings_error( - 'general', - 'settings_updated', +- 'general', +- 'settings_updated', - __( 'The timezone you have entered is not valid. Please select a valid timezone.' ), -+ __('The timezone you have entered is not valid. Please select a valid timezone.'), - 'error' +- 'error' - ); ++add_settings_error( ++ 'general', ++ 'settings_updated', ++ __('The timezone you have entered is not valid. Please select a valid timezone.'), ++ 'error' +); } @@ -169945,18 +169524,18 @@ - 'options.php', - '2.7.0', - sprintf( -- /* translators: %s: The option/setting. */ -- __( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://developer.wordpress.org/plugins/settings/settings-api/' ), -- '' . esc_html( $option ) . '' -- ) + 'options.php', + '2.7.0', + sprintf( -+ /* translators: %s: The option/setting. */ + /* translators: %s: The option/setting. */ +- __( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://developer.wordpress.org/plugins/settings/settings-api/' ), +- '' . esc_html( $option ) . '' +- ) +- ); + __('The %s setting is unregistered. Unregistered settings are deprecated. See https://developer.wordpress.org/plugins/settings/settings-api/'), + '' . esc_html($option) . '' + ) - ); ++ ); } - $option = trim( $option ); @@ -170027,14 +169606,12 @@ - wp_admin_notice( - '' . __( 'Warning:' ) . ' ' . __( 'This page allows direct access to your site settings. You can break things here. Please be cautious!' ), - array( -- 'type' => 'warning', -- ) -- ); +wp_admin_notice( + '' . __('Warning:') . ' ' . __('This page allows direct access to your site settings. You can break things here. Please be cautious!'), + array( -+ 'type' => 'warning', -+ ) + 'type' => 'warning', + ) +- ); +); ?> @@ -170095,7 +169672,7 @@ diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php -index 345f0c09e0..4c8818366c 100644 +index 345f0c09e0..879e6609f2 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -10,33 +10,33 @@ @@ -170136,9 +169713,8 @@ + array( 'id' => 'message', 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) +); ?> @@ -170200,7 +169776,7 @@ $real_file = WP_PLUGIN_DIR . '/' . $file; // Handle fallback editing of file when JavaScript is not available. -@@ -90,127 +90,127 @@ $edit_error = null; +@@ -90,39 +90,39 @@ $edit_error = null; $posted_content = null; if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) { @@ -170218,20 +169794,16 @@ - wp_redirect( - add_query_arg( - array( -- 'a' => 1, // This means "success" for some reason. -- 'plugin' => $plugin, -- 'file' => $file, -- ), -- admin_url( 'plugin-editor.php' ) -- ) -- ); +wp_redirect( + add_query_arg( + array( -+ 'a' => 1, // This means "success" for some reason. -+ 'plugin' => $plugin, -+ 'file' => $file, -+ ), + 'a' => 1, // This means "success" for some reason. + 'plugin' => $plugin, + 'file' => $file, + ), +- admin_url( 'plugin-editor.php' ) +- ) +- ); + admin_url('plugin-editor.php') + ) +); @@ -170261,20 +169833,17 @@ } } } - +@@ -130,87 +130,87 @@ if ( ! is_file( $real_file ) ) { get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'You can use the plugin file editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.' ) . '

    ' . - '

    ' . __( 'Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Do not forget to save your changes (Update File) when you are finished.' ) . '

    ' . - '

    ' . __( 'The documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.' ) . '

    ' . - '

    ' . __( 'When using a keyboard to navigate:' ) . '

    ' . -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('You can use the plugin file editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '

    ' . + '

    ' . __('Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Do not forget to save your changes (Update File) when you are finished.') . '

    ' . + '

    ' . __('The documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.') . '

    ' . @@ -170289,10 +169858,9 @@ '' . - '

    ' . __( 'If you want to make changes but do not want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.' ) . '

    ' . - ( is_network_admin() ? '

    ' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '

    ' : '' ), -- ) + '

    ' . __('If you want to make changes but do not want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '

    ' . + ( is_network_admin() ? '

    ' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

    ' : '' ), -+ ) + ) ); get_current_screen()->set_help_sidebar( @@ -170300,10 +169868,10 @@ - '

    ' . __( 'Documentation on Editing Plugins' ) . '

    ' . - '

    ' . __( 'Documentation on Writing Plugins' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Editing Plugins') . '

    ' . -+ '

    ' . __('Documentation on Writing Plugins') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Editing Plugins') . '

    ' . ++ '

    ' . __('Documentation on Writing Plugins') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); $settings = array( @@ -170362,20 +169930,17 @@ - wp_admin_notice( - __( 'File edited successfully.' ), - array( -- 'additional_classes' => array( 'updated', 'is-dismissible' ), -- 'id' => 'message', -- ) -- ); --elseif ( is_wp_error( $edit_error ) ) : -- $error = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); -- $message = '

    ' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '

    +if ( isset($_GET['a']) ) : +wp_admin_notice( + __('File edited successfully.'), + array( -+ 'additional_classes' => array( 'updated', 'is-dismissible' ), -+ 'id' => 'message', -+ ) + 'additional_classes' => array( 'updated', 'is-dismissible' ), + 'id' => 'message', + ) +- ); +-elseif ( is_wp_error( $edit_error ) ) : +- $error = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); +- $message = '

    ' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '

    +); +elseif ( is_wp_error($edit_error) ) : + $error = esc_html($edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code()); @@ -170384,18 +169949,14 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'error', -- 'id' => 'message', -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => 'error', -+ 'id' => 'message', -+ 'paragraph_wrap' => false, -+ ) + 'type' => 'error', + 'id' => 'message', + 'paragraph_wrap' => false, + ) +- ); +); endif; ?> @@ -170511,10 +170072,11 @@ - if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { - wp_admin_notice( - __( 'Warning: Making changes to active plugins is not recommended.' ), +- array( + if ( in_array($plugin, (array) get_option('active_plugins', array()), true) ) { +wp_admin_notice( -+ __('Warning: Making changes to active plugins is not recommended.'), - array( ++ __('Warning: Making changes to active plugins is not recommended.'), ++ array( 'type' => 'warning', 'additional_classes' => array( 'inline', 'active-plugin-edit-warning' ), ) @@ -170537,8 +170099,8 @@ - __( 'You need to make this file writable before you can save your changes. See Changing File Permissions for more information.' ), - __( 'https://wordpress.org/documentation/article/changing-file-permissions/' ) - ); -+ __('You need to make this file writable before you can save your changes. See Changing File Permissions for more information.'), -+ __('https://wordpress.org/documentation/article/changing-file-permissions/') ++ __('You need to make this file writable before you can save your changes. See Changing File Permissions for more information.'), ++ __('https://wordpress.org/documentation/article/changing-file-permissions/') +); ?>

    @@ -170586,7 +170148,7 @@ diff --git a/wp-admin/plugin-install.php b/wp-admin/plugin-install.php -index 571b9a9875..5ce4a97756 100644 +index 571b9a9875..fd78d4832f 100644 --- a/wp-admin/plugin-install.php +++ b/wp-admin/plugin-install.php @@ -6,8 +6,8 @@ @@ -170674,7 +170236,7 @@ /* * Call the pre upload action on every non-upload plugin installation screen -@@ -87,47 +87,47 @@ do_action( "install_plugins_pre_{$tab}" ); +@@ -87,46 +87,46 @@ do_action( "install_plugins_pre_{$tab}" ); */ if ( 'upload' !== $tab ) { /** This action is documented in wp-admin/plugin-install.php */ @@ -170683,71 +170245,61 @@ } get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => ++ 'title' => __('Overview'), + 'content' => '

    ' . sprintf( /* translators: %s: https://wordpress.org/plugins/ */ - __( 'Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official WordPress Plugin Directory are compatible with the license WordPress uses.' ), - __( 'https://wordpress.org/plugins/' ) +- ) . '

    ' . +- '

    ' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '

    ', + __('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official WordPress Plugin Directory are compatible with the license WordPress uses.'), + __('https://wordpress.org/plugins/') - ) . '

    ' . -- '

    ' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '

    ', ++ ) . '

    ' . + '

    ' . __('You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.') . ' ' . __('The search results will be updated as you type.') . '

    ', -- ) -+ ) + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'adding-plugins', + array( + 'id' => 'adding-plugins', - 'title' => __( 'Adding Plugins' ), -- 'content' => ++ 'title' => __('Adding Plugins'), + 'content' => - '

    ' . __( 'If you know what you are looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.' ) . '

    ' . - '

    ' . __( 'If you just want to get an idea of what’s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.' ) . '

    ' . - '

    ' . __( 'You can also browse a user’s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.' ) . '

    ' . - '

    ' . __( 'If you want to install a plugin that you’ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '

    ', -- ) -+ array( -+ 'id' => 'adding-plugins', -+ 'title' => __('Adding Plugins'), -+ 'content' => + '

    ' . __('If you know what you are looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '

    ' . + '

    ' . __('If you just want to get an idea of what’s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.') . '

    ' . + '

    ' . __('You can also browse a user’s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.') . '

    ' . + '

    ' . __('If you want to install a plugin that you’ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.') . '

    ', -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Installing Plugins' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Installing Plugins') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Installing Plugins') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter plugins list' ), - 'heading_pagination' => __( 'Plugins list navigation' ), - 'heading_list' => __( 'Plugins list' ), -- ) -+ array( -+ 'heading_views' => __('Filter plugins list'), -+ 'heading_pagination' => __('Plugins list navigation'), -+ 'heading_list' => __('Plugins list'), -+ ) ++ 'heading_views' => __('Filter plugins list'), ++ 'heading_pagination' => __('Plugins list navigation'), ++ 'heading_list' => __('Plugins list'), + ) ); - /** @@ -135,21 +135,21 @@ get_current_screen()->set_screen_reader_content( */ require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -170798,7 +170350,7 @@ diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php -index 93f9c454ab..86c7516286 100644 +index 93f9c454ab..0a3d740d27 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -9,17 +9,17 @@ @@ -171246,9 +170798,8 @@ + $maybe_active_plugin, + array( 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) + ); endif; ?> @@ -171268,9 +170819,8 @@ + $maybe_active_plugins, + array( 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) + ); endif; ?> @@ -171515,48 +171065,42 @@ +add_screen_option('per_page', array( 'default' => 999 )); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.' ) . '

    ' . - '

    ' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '

    ' . -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '

    ' . + '

    ' . __('The search for installed plugins will search for terms in their name, description, or author.') . ' ' . __('The search results will be updated as you type.') . '

    ' . '

    ' . sprintf( /* translators: %s: WordPress Plugin Directory URL. */ - __( 'If you would like to see more plugins to choose from, click on the “Add New Plugin” button and you will be able to browse or search for additional plugins from the WordPress Plugin Directory. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!' ), - __( 'https://wordpress.org/plugins/' ) +- ) . '

    ', + __('If you would like to see more plugins to choose from, click on the “Add New Plugin” button and you will be able to browse or search for additional plugins from the WordPress Plugin Directory. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), + __('https://wordpress.org/plugins/') - ) . '

    ', -- ) -+ ) ++ ) . '

    ', + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'compatibility-problems', + array( + 'id' => 'compatibility-problems', - 'title' => __( 'Troubleshooting' ), -- 'content' => ++ 'title' => __('Troubleshooting'), + 'content' => - '

    ' . __( 'Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin’s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.' ) . '

    ' . -+ array( -+ 'id' => 'compatibility-problems', -+ 'title' => __('Troubleshooting'), -+ 'content' => + '

    ' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin’s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '

    ' . '

    ' . sprintf( /* translators: %s: WP_PLUGIN_DIR constant value. */ - __( 'If something goes wrong with a plugin and you cannot use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.' ), - '' . WP_PLUGIN_DIR . '' +- ) . '

    ', + __('If something goes wrong with a plugin and you cannot use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.'), + '' . WP_PLUGIN_DIR . '' - ) . '

    ', -- ) -+ ) ++ ) . '

    ', + ) ); $help_sidebar_autoupdates = ''; @@ -171564,53 +171108,46 @@ -if ( current_user_can( 'update_plugins' ) && wp_is_auto_update_enabled_for_type( 'plugin' ) ) { - get_current_screen()->add_help_tab( - array( -- 'id' => 'plugins-themes-auto-updates', ++if ( current_user_can('update_plugins') && wp_is_auto_update_enabled_for_type('plugin') ) { ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'plugins-themes-auto-updates', - 'title' => __( 'Auto-updates' ), -- 'content' => ++ 'title' => __('Auto-updates'), + 'content' => - '

    ' . __( 'Auto-updates can be enabled or disabled for each individual plugin. Plugins with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

    ' . - '

    ' . __( 'Auto-updates are only available for plugins recognized by WordPress.org, or that include a compatible update system.' ) . '

    ' . - '

    ' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '

    ', -- ) -- ); -- -- $help_sidebar_autoupdates = '

    ' . __( 'Documentation on Auto-updates' ) . '

    '; -+if ( current_user_can('update_plugins') && wp_is_auto_update_enabled_for_type('plugin') ) { -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'plugins-themes-auto-updates', -+ 'title' => __('Auto-updates'), -+ 'content' => + '

    ' . __('Auto-updates can be enabled or disabled for each individual plugin. Plugins with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.') . '

    ' . + '

    ' . __('Auto-updates are only available for plugins recognized by WordPress.org, or that include a compatible update system.') . '

    ' . + '

    ' . __('Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.') . '

    ', -+ ) + ) +- ); +); -+ + +- $help_sidebar_autoupdates = '

    ' . __( 'Documentation on Auto-updates' ) . '

    '; + $help_sidebar_autoupdates = '

    ' . __('Documentation on Auto-updates') . '

    '; } get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Managing Plugins' ) . '

    ' . -- $help_sidebar_autoupdates . ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Managing Plugins') . '

    ' . + $help_sidebar_autoupdates . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Managing Plugins') . '

    ' . -+ $help_sidebar_autoupdates . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter plugins list' ), - 'heading_pagination' => __( 'Plugins list navigation' ), - 'heading_list' => __( 'Plugins list' ), -- ) -+ array( -+ 'heading_views' => __('Filter plugins list'), -+ 'heading_pagination' => __('Plugins list navigation'), -+ 'heading_list' => __('Plugins list'), -+ ) ++ 'heading_views' => __('Filter plugins list'), ++ 'heading_pagination' => __('Plugins list navigation'), ++ 'heading_list' => __('Plugins list'), + ) ); // Used in the HTML title tag. @@ -171643,9 +171180,8 @@ + array( 'id' => 'message', 'additional_classes' => array( 'error' ), -- ) + ) - ); -+ ) +); } } @@ -171702,12 +171238,11 @@ 'action' => 'error_scrape', - 'plugin' => urlencode( $plugin ), - '_wpnonce' => urlencode( $_GET['_error_nonce'] ), -- ), -- admin_url( 'plugins.php' ) -- ); + 'plugin' => urlencode($plugin), + '_wpnonce' => urlencode($_GET['_error_nonce']), -+ ), + ), +- admin_url( 'plugins.php' ) +- ); + admin_url('plugins.php') +); @@ -171718,16 +171253,13 @@ - wp_admin_notice( - $errmsg, - array( -- 'id' => 'message', -- 'additional_classes' => array( 'error' ), -- ) -- ); +wp_admin_notice( + $errmsg, + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'error' ), -+ ) + 'id' => 'message', + 'additional_classes' => array( 'error' ), + ) +- ); +); -} elseif ( isset( $_GET['deleted'] ) ) { @@ -171758,9 +171290,8 @@ 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, -- ) + ) - ); -+ ) +); } else { if ( 1 === (int) $_GET['deleted'] ) { @@ -171872,7 +171403,7 @@ display(); ?> diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php -index 521ef9ef7c..e32fb662fc 100644 +index 521ef9ef7c..4d7fadc3a5 100644 --- a/wp-admin/post-new.php +++ b/wp-admin/post-new.php @@ -16,29 +16,29 @@ require_once __DIR__ . '/admin.php'; @@ -171926,7 +171457,7 @@ +if ( ! current_user_can($post_type_object->cap->edit_posts) || ! current_user_can($post_type_object->cap->create_posts) ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to create posts as this user.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to create posts as this user.') . '

    ', + 403 +); } @@ -171955,7 +171486,7 @@ require_once ABSPATH . 'wp-admin/admin-footer.php'; diff --git a/wp-admin/post.php b/wp-admin/post.php -index 17875cb3e5..12a24074a2 100644 +index 17875cb3e5..e1a0bbaed8 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -14,13 +14,13 @@ require_once __DIR__ . '/admin.php'; @@ -172062,12 +171593,13 @@ // Wrap Quick Draft content in the Paragraph block. - if ( ! str_contains( $_POST['content'], '' ) ) { - $_POST['content'] = sprintf( -+ if ( ! str_contains($_POST['content'], '') ) { -+$_POST['content'] = sprintf( - '%s', +- '%s', - str_replace( array( "\r\n", "\r", "\n" ), '
    ', $_POST['content'] ) - ); -+ str_replace(array( "\r\n", "\r", "\n" ), '
    ', $_POST['content']) ++ if ( ! str_contains($_POST['content'], '') ) { ++$_POST['content'] = sprintf( ++ '%s', ++ str_replace(array( "\r\n", "\r", "\n" ), '
    ', $_POST['content']) +); } @@ -172255,18 +171787,15 @@ - wp_redirect( - add_query_arg( - array( -- 'trashed' => 1, -- 'ids' => $post_id, -- ), -- $sendback -- ) -- ); +wp_redirect( + add_query_arg( + array( -+ 'trashed' => 1, -+ 'ids' => $post_id, -+ ), + 'trashed' => 1, + 'ids' => $post_id, + ), +- $sendback +- ) +- ); + $sendback + ) +); @@ -172304,11 +171833,10 @@ + array( 'untrashed' => 1, 'ids' => $post_id, -- ), + ), - $sendback - ); - wp_redirect( $sendback ); -+ ), + $sendback +); + wp_redirect($sendback); @@ -172393,7 +171921,7 @@ } // End switch. diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php -index ebe7502f54..98491d3a94 100644 +index ebe7502f54..9416c65950 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -6,7 +6,7 @@ @@ -172429,75 +171957,74 @@ - } elseif ( current_user_can( 'activate_plugins' ) ) { - if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { - $url = wp_nonce_url( +- add_query_arg( +- array( + } elseif ( current_user_can('activate_plugins') ) { + if ( file_exists(WP_PLUGIN_DIR . '/' . $plugin_file) ) { +$url = wp_nonce_url( - add_query_arg( -- array( -- 'action' => 'activate', -- 'plugin' => $plugin_file, -- 'from' => 'press-this', -- ), -- admin_url( 'plugins.php' ) ++ add_query_arg( + array( -+ 'action' => 'activate', -+ 'plugin' => $plugin_file, -+ 'from' => 'press-this', -+ ), -+ admin_url('plugins.php') - ), - 'activate-plugin_' . $plugin_file + 'action' => 'activate', + 'plugin' => $plugin_file, + 'from' => 'press-this', + ), +- admin_url( 'plugins.php' ) +- ), +- 'activate-plugin_' . $plugin_file - ); - $action = sprintf( -+); -+$action = sprintf( - '%2$s', +- '%2$s', - esc_url( $url ), - __( 'Activate Press This' ) - ); -+ esc_url($url), -+ __('Activate Press This') ++ admin_url('plugins.php') ++ ), ++ 'activate-plugin_' . $plugin_file ++); ++$action = sprintf( ++ '%2$s', ++ esc_url($url), ++ __('Activate Press This') +); } else { if ( is_main_site() ) { $url = wp_nonce_url( - add_query_arg( - array( -- 'action' => 'install-plugin', -- 'plugin' => $plugin_slug, -- 'from' => 'press-this', -- ), ++ add_query_arg( ++ array( + 'action' => 'install-plugin', + 'plugin' => $plugin_slug, + 'from' => 'press-this', + ), - self_admin_url( 'update.php' ) - ), - 'install-plugin_' . $plugin_slug -+ add_query_arg( -+ array( -+ 'action' => 'install-plugin', -+ 'plugin' => $plugin_slug, -+ 'from' => 'press-this', -+ ), +- ); + self_admin_url('update.php') + ), + 'install-plugin_' . $plugin_slug - ); ++ ); $action = sprintf( - '%3$s', - esc_url( $url ), - esc_attr( $plugin_slug ), - __( 'Install Now' ) +- ); + '%3$s', + esc_url($url), + esc_attr($plugin_slug), + __('Install Now') - ); ++ ); } else { $action = sprintf( /* translators: %s: URL to Press This bookmarklet on the main site. */ - __( 'Press This is not installed. Please install Press This from the main site.' ), - get_admin_url( get_current_network_id(), 'press-this.php' ) +- ); + __('Press This is not installed. Please install Press This from the main site.'), + get_admin_url(get_current_network_id(), 'press-this.php') - ); ++ ); } } - wp_die( @@ -172525,10 +172052,10 @@ } diff --git a/wp-admin/privacy-policy-guide.php b/wp-admin/privacy-policy-guide.php -index ffff9e4374..acd5e01a15 100644 +index ffff9e4374..2fecf742a5 100644 --- a/wp-admin/privacy-policy-guide.php +++ b/wp-admin/privacy-policy-guide.php -@@ -9,27 +9,27 @@ +@@ -9,16 +9,16 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; @@ -172548,17 +172075,9 @@ +$title = __('Privacy Policy Guide'); add_filter( -- 'admin_body_class', -- static function ( $body_class ) { -- $body_class .= ' privacy-settings '; -+ 'admin_body_class', -+ static function ( $body_class ) { -+ $body_class .= ' privacy-settings '; - -- return $body_class; -- } -+ return $body_class; -+ } + 'admin_body_class', +@@ -29,7 +29,7 @@ add_filter( + } ); -wp_enqueue_script( 'privacy-tools' ); @@ -172595,21 +172114,16 @@ ?> -@@ -62,37 +62,37 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -62,7 +62,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; 'error', -- 'additional_classes' => array( 'hide-if-js' ), -- ) -+ __('The Privacy Settings require JavaScript.'), -+ array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'hide-if-js' ), -+ ) - ); ++ __('The Privacy Settings require JavaScript.'), + array( + 'type' => 'error', + 'additional_classes' => array( 'hide-if-js' ), +@@ -71,28 +71,28 @@ wp_admin_notice( ?>
    @@ -172648,7 +172162,7 @@
    diff --git a/wp-admin/privacy.php b/wp-admin/privacy.php -index dd1747f486..0eaa7bb579 100644 +index dd1747f486..84ac239712 100644 --- a/wp-admin/privacy.php +++ b/wp-admin/privacy.php @@ -10,9 +10,9 @@ @@ -172663,7 +172177,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?> -@@ -21,34 +21,34 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -21,35 +21,35 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

    @@ -172704,22 +172218,26 @@ /* translators: %s: https://wordpress.org/about/stats/ */ - __( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the WordPress.org stats page.' ), - __( 'https://wordpress.org/about/stats/' ) +- ); + __('This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the WordPress.org stats page.'), + __('https://wordpress.org/about/stats/') - ); ++ ); ?>

    -@@ -57,8 +57,8 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; + +@@ -57,9 +57,9 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; our Privacy Policy.' ), - __( 'https://wordpress.org/about/privacy/' ) +- ); + __('We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit our Privacy Policy.'), + __('https://wordpress.org/about/privacy/') - ); ++ ); ?>

    +

    diff --git a/wp-admin/profile.php b/wp-admin/profile.php index 18fb60069b..ef15c5172f 100644 --- a/wp-admin/profile.php @@ -172734,7 +172252,7 @@ /** Load User Editing Page */ require_once __DIR__ . '/user-edit.php'; diff --git a/wp-admin/revision.php b/wp-admin/revision.php -index 72b8e74ae2..6172543eb8 100644 +index 72b8e74ae2..cbc7fa426f 100644 --- a/wp-admin/revision.php +++ b/wp-admin/revision.php @@ -21,44 +21,44 @@ require ABSPATH . 'wp-admin/includes/revision.php'; @@ -172808,10 +172326,9 @@ + array( 'message' => 5, 'revision' => $revision->ID, -- ), + ), - get_edit_post_link( $post->ID, 'url' ) - ); -+ ), + get_edit_post_link($post->ID, 'url') +); break; @@ -172901,16 +172418,12 @@ +$revisions_overview .= '
  • ' . __('To restore a revision, click Restore This Revision.') . '
  • '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'revisions-overview', + array( + 'id' => 'revisions-overview', - 'title' => __( 'Overview' ), -- 'content' => $revisions_overview, -- ) -+ array( -+ 'id' => 'revisions-overview', -+ 'title' => __('Overview'), -+ 'content' => $revisions_overview, -+ ) ++ 'title' => __('Overview'), + 'content' => $revisions_overview, + ) ); -$revisions_sidebar = '

    ' . __( 'For more information:' ) . '

    '; @@ -172926,7 +172439,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php -index ddcb4943c7..53f83b8111 100644 +index ddcb4943c7..310fd8358b 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -12,22 +12,22 @@ @@ -172972,14 +172485,13 @@ } else { - wp_die( - sprintf( -- /* translators: %s: wp-config-sample.php */ ++wp_die( ++ sprintf( + /* translators: %s: wp-config-sample.php */ - __( 'Sorry, I need a %s file to work from. Please re-upload this file to your WordPress installation.' ), - 'wp-config-sample.php' - ) - ); -+wp_die( -+ sprintf( -+ /* translators: %s: wp-config-sample.php */ + __('Sorry, I need a %s file to work from. Please re-upload this file to your WordPress installation.'), + 'wp-config-sample.php' + ) @@ -172990,17 +172502,16 @@ -if ( file_exists( ABSPATH . 'wp-config.php' ) ) { - wp_die( - '

    ' . sprintf( -- /* translators: 1: wp-config.php, 2: install.php */ ++if ( file_exists(ABSPATH . 'wp-config.php') ) { ++wp_die( ++ '

    ' . sprintf( + /* translators: 1: wp-config.php, 2: install.php */ - __( 'The file %1$s already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.' ), - 'wp-config.php', - 'install.php' - ) . '

    ', - 409 - ); -+if ( file_exists(ABSPATH . 'wp-config.php') ) { -+wp_die( -+ '

    ' . sprintf( -+ /* translators: 1: wp-config.php, 2: install.php */ + __('The file %1$s already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.'), + 'wp-config.php', + 'install.php' @@ -173013,17 +172524,16 @@ -if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) { - wp_die( - '

    ' . sprintf( -- /* translators: 1: wp-config.php, 2: install.php */ ++if ( @file_exists(ABSPATH . '../wp-config.php') && ! @file_exists(ABSPATH . '../wp-settings.php') ) { ++wp_die( ++ '

    ' . sprintf( + /* translators: 1: wp-config.php, 2: install.php */ - __( 'The file %1$s already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.' ), - 'wp-config.php', - 'install.php' - ) . '

    ', - 409 - ); -+if ( @file_exists(ABSPATH . '../wp-config.php') && ! @file_exists(ABSPATH . '../wp-settings.php') ) { -+wp_die( -+ '

    ' . sprintf( -+ /* translators: 1: wp-config.php, 2: install.php */ + __('The file %1$s already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.'), + 'wp-config.php', + 'install.php' @@ -173560,10 +173070,10 @@ diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php -index 6442ee562b..d3d8ce20d4 100644 +index 6442ee562b..43ca147528 100644 --- a/wp-admin/site-editor.php +++ b/wp-admin/site-editor.php -@@ -11,40 +11,40 @@ global $editor_styles; +@@ -11,33 +11,33 @@ global $editor_styles; /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; @@ -173576,7 +173086,7 @@ +if ( ! current_user_can('edit_theme_options') ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to edit theme options on this site.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to edit theme options on this site.') . '

    ', + 403 +); } @@ -173610,17 +173120,6 @@ // Default to is-fullscreen-mode to avoid jumps in the UI. add_filter( -- 'admin_body_class', -- static function ( $classes ) { -- return "$classes is-fullscreen-mode"; -- } -+ 'admin_body_class', -+ static function ( $classes ) { -+ return "$classes is-fullscreen-mode"; -+ } - ); - - $indexed_template_types = array(); @@ -53,27 +53,27 @@ foreach ( get_default_block_template_types() as $slug => $template_type ) { $indexed_template_types[] = $template_type; } @@ -173658,15 +173157,6 @@ } } -@@ -81,7 +81,7 @@ $active_global_styles_id = WP_Theme_JSON_Resolver::get_user_global_styles_post_i - $active_theme = get_stylesheet(); - - $navigation_rest_route = rest_get_route_for_post_type_items( -- 'wp_navigation' -+ 'wp_navigation' - ); - - $preload_paths = array( @@ -97,8 +97,8 @@ $preload_paths = array( '/wp/v2/global-styles/themes/' . $active_theme, array( $navigation_rest_route, 'OPTIONS' ), @@ -173678,14 +173168,12 @@ 'context' => 'edit', 'per_page' => 100, 'order' => 'desc', -@@ -106,52 +106,52 @@ $preload_paths = array( - // array indices are required to avoid query being encoded and not matching in cache. +@@ -107,51 +107,51 @@ $preload_paths = array( 'status[0]' => 'publish', 'status[1]' => 'draft', -- ), + ), - $navigation_rest_route - ), -+ ), + $navigation_rest_route +), 'GET', @@ -173696,10 +173184,9 @@ +block_editor_rest_api_preload($preload_paths, $block_editor_context); wp_add_inline_script( -- 'wp-edit-site', + 'wp-edit-site', - sprintf( - 'wp.domReady( function() { -+ 'wp-edit-site', + sprintf( + 'wp.domReady( function() { wp.editSite.initializeEditor( "site-editor", %s ); @@ -173712,19 +173199,16 @@ // Preload server-registered block schemas. wp_add_inline_script( -- 'wp-blocks', + 'wp-blocks', - 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' -+ 'wp-blocks', -+ 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode(get_block_editor_server_block_settings()) . ');' ++ 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode(get_block_editor_server_block_settings()) . ');' ); wp_add_inline_script( -- 'wp-blocks', + 'wp-blocks', - sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( isset( $editor_settings['blockCategories'] ) ? $editor_settings['blockCategories'] : array() ) ), -- 'after' -+ 'wp-blocks', -+ sprintf('wp.blocks.setCategories( %s );', wp_json_encode(isset($editor_settings['blockCategories']) ? $editor_settings['blockCategories'] : array())), -+ 'after' ++ sprintf('wp.blocks.setCategories( %s );', wp_json_encode(isset($editor_settings['blockCategories']) ? $editor_settings['blockCategories'] : array())), + 'after' ); -wp_enqueue_script( 'wp-edit-site' ); @@ -173776,18 +173260,17 @@ + array( 'type' => 'error', 'additional_classes' => array( 'hide-if-js' ), -- ) + ) - ); -+ ) +); ?>
    diff --git a/wp-admin/site-health-info.php b/wp-admin/site-health-info.php -index 46b329adb6..9517560b07 100644 +index 46b329adb6..66512b10e9 100644 --- a/wp-admin/site-health-info.php +++ b/wp-admin/site-health-info.php -@@ -6,25 +6,25 @@ +@@ -6,21 +6,21 @@ * @subpackage Administration */ @@ -173809,18 +173292,10 @@ wp_admin_notice( - __( 'The Site Health check requires JavaScript.' ), -- array( -- 'type' => 'error', -- 'additional_classes' => array( 'hide-if-js' ), -- ) -+ __('The Site Health check requires JavaScript.'), -+ array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'hide-if-js' ), -+ ) - ); - ?> - ++ __('The Site Health check requires JavaScript.'), + array( + 'type' => 'error', + 'additional_classes' => array( 'hide-if-js' ), @@ -38,25 +38,25 @@ wp_admin_notice( ?> @@ -173873,12 +173348,13 @@ - if ( isset( $details['show_count'] ) && $details['show_count'] ) { - printf( -+ if ( isset($details['show_count']) && $details['show_count'] ) { -+ printf( - '(%s)', +- '(%s)', - number_format_i18n( count( $details['fields'] ) ) - ); -+ number_format_i18n(count($details['fields'])) ++ if ( isset($details['show_count']) && $details['show_count'] ) { ++ printf( ++ '(%s)', ++ number_format_i18n(count($details['fields'])) + ); } @@ -173928,7 +173404,7 @@ } diff --git a/wp-admin/site-health.php b/wp-admin/site-health.php -index ededbf001b..fd62273876 100644 +index ededbf001b..f25b0a1449 100644 --- a/wp-admin/site-health.php +++ b/wp-admin/site-health.php @@ -9,13 +9,13 @@ @@ -173948,7 +173424,7 @@ ); /** -@@ -28,66 +28,66 @@ $tabs = array( +@@ -28,47 +28,47 @@ $tabs = array( * * @param string[] $tabs An associative array of tab labels keyed by their slug. */ @@ -173969,8 +173445,8 @@ // translators: %s: The currently displayed tab. - __( 'Site Health - %s' ), - ( isset( $tabs[ $current_tab ] ) ? esc_html( $tabs[ $current_tab ] ) : esc_html( reset( $tabs ) ) ) -+ __('Site Health - %s'), -+ ( isset($tabs[ $current_tab ]) ? esc_html($tabs[ $current_tab ]) : esc_html(reset($tabs)) ) ++ __('Site Health - %s'), ++ ( isset($tabs[ $current_tab ]) ? esc_html($tabs[ $current_tab ]) : esc_html(reset($tabs)) ) ); -if ( ! current_user_can( 'view_site_health_checks' ) ) { @@ -174011,32 +173487,27 @@ exit; } - $health_check_site_status = WP_Site_Health::get_instance(); - +@@ -77,17 +77,17 @@ $health_check_site_status = WP_Site_Health::get_instance(); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'This screen allows you to obtain a health diagnosis of your site, and displays an overall rating of the status of your installation.' ) . '

    ' . - '

    ' . __( 'In the Status tab, you can see critical information about your WordPress configuration, along with anything else that requires your attention.' ) . '

    ' . - '

    ' . __( 'In the Info tab, you will find all the details about the configuration of your WordPress site, server, and database. There is also an export feature that allows you to copy all of the information about your site to the clipboard, to help solve problems on your site when obtaining support.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('This screen allows you to obtain a health diagnosis of your site, and displays an overall rating of the status of your installation.') . '

    ' . + '

    ' . __('In the Status tab, you can see critical information about your WordPress configuration, along with anything else that requires your attention.') . '

    ' . + '

    ' . __('In the Info tab, you will find all the details about the configuration of your WordPress site, server, and database. There is also an export feature that allows you to copy all of the information about your site to the clipboard, to help solve problems on your site when obtaining support.') . '

    ', -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Site Health tool' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Site Health tool') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Site Health tool') . '

    ' ); // Start by checking if this is a special request checking for the existence of certain filters. @@ -174055,9 +173526,10 @@ if ( $_GET['https_updated'] ) { - wp_admin_notice( - __( 'Site URLs switched to HTTPS.' ), +- array( +wp_admin_notice( -+ __('Site URLs switched to HTTPS.'), - array( ++ __('Site URLs switched to HTTPS.'), ++ array( 'type' => 'success', 'id' => 'message', 'dismissible' => true, @@ -174067,9 +173539,10 @@ } else { - wp_admin_notice( - __( 'Site URLs could not be switched to HTTPS.' ), +- array( +wp_admin_notice( -+ __('Site URLs could not be switched to HTTPS.'), - array( ++ __('Site URLs could not be switched to HTTPS.'), ++ array( 'type' => 'error', 'id' => 'message', 'dismissible' => true, @@ -174105,26 +173578,28 @@ foreach ( $tabs_slice as $slug => $label ) { - printf( -+printf( - '%s', - esc_url( +- '%s', +- esc_url( - add_query_arg( - array( -- 'tab' => $slug, -- ), -- admin_url( 'site-health.php' ) -- ) ++printf( ++ '%s', ++ esc_url( + add_query_arg( + array( -+ 'tab' => $slug, -+ ), -+ admin_url('site-health.php') -+ ) - ), - ( $current_tab === $slug ? 'active' : '' ), + 'tab' => $slug, + ), +- admin_url( 'site-health.php' ) +- ) +- ), +- ( $current_tab === $slug ? 'active' : '' ), - esc_html( $label ) - ); -+ esc_html($label) ++ admin_url('site-health.php') ++ ) ++ ), ++ ( $current_tab === $slug ? 'active' : '' ), ++ esc_html($label) +); } ?> @@ -174152,21 +173627,19 @@ - esc_url( - add_query_arg( - array( -- 'tab' => $slug, -- ), ++ printf( ++ '%s', ++ esc_url( ++ add_query_arg( ++ array( + 'tab' => $slug, + ), - admin_url( 'site-health.php' ) - ) - ), - ( isset( $_GET['tab'] ) && $_GET['tab'] === $slug ? 'active' : '' ), - esc_html( $label ) - ); -+ printf( -+ '%s', -+ esc_url( -+ add_query_arg( -+ array( -+ 'tab' => $slug, -+ ), + admin_url('site-health.php') + ) + ), @@ -174198,16 +173671,13 @@ - wp_admin_notice( - __( 'The Site Health check requires JavaScript.' ), - array( -- 'type' => 'error', -- 'additional_classes' => array( 'hide-if-js' ), -- ) -- ); +wp_admin_notice( + __('The Site Health check requires JavaScript.'), + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'hide-if-js' ), -+ ) + 'type' => 'error', + 'additional_classes' => array( 'hide-if-js' ), + ) +- ); +); ?> @@ -174282,7 +173752,7 @@ diff --git a/wp-admin/term.php b/wp-admin/term.php -index 4d29b5d996..ae351ca89a 100644 +index 4d29b5d996..db7d4f7755 100644 --- a/wp-admin/term.php +++ b/wp-admin/term.php @@ -10,46 +10,46 @@ @@ -174336,7 +173806,7 @@ - ); +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to edit this item.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to edit this item.') . '

    ', + 403 +); } @@ -174351,18 +173821,9 @@ } if ( 'post' !== $post_type ) { -@@ -64,12 +64,12 @@ if ( 'post' !== $post_type ) { - } - - get_current_screen()->set_screen_reader_content( -- array( -- 'heading_pagination' => $tax->labels->items_list_navigation, -- 'heading_list' => $tax->labels->items_list, -- ) -+ array( -+ 'heading_pagination' => $tax->labels->items_list_navigation, -+ 'heading_list' => $tax->labels->items_list, -+ ) +@@ -69,7 +69,7 @@ get_current_screen()->set_screen_reader_content( + 'heading_list' => $tax->labels->items_list, + ) ); -wp_enqueue_script( 'admin-tags' ); +wp_enqueue_script('admin-tags'); @@ -174370,7 +173831,7 @@ require ABSPATH . 'wp-admin/edit-tag-form.php'; require_once ABSPATH . 'wp-admin/admin-footer.php'; diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php -index bd932d8f94..a0e8754f3b 100644 +index bd932d8f94..18a3d7cefc 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -10,53 +10,53 @@ @@ -174394,18 +173855,15 @@ $parent_file = 'themes.php'; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'You can use the theme file editor to edit the individual CSS and PHP files which make up your theme.' ) . '

    ' . - '

    ' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme’s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '

    ' . - '

    ' . __( 'For PHP files, you can use the documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.' ) . '

    ' . - '

    ' . __( 'When using a keyboard to navigate:' ) . '

    ' . -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('You can use the theme file editor to edit the individual CSS and PHP files which make up your theme.') . '

    ' . + '

    ' . __('Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme’s template files. Clicking once on any file name causes the file to appear in the large Editor box.') . '

    ' . + '

    ' . __('For PHP files, you can use the documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.') . '

    ' . @@ -174426,13 +173884,13 @@ /* translators: %s: Link to documentation on child themes. */ - __( 'Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.' ), - __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) +- ) . '

    ' . +- ( is_network_admin() ? '

    ' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '

    ' : '' ), + __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a child theme instead.'), + __('https://developer.wordpress.org/themes/advanced-topics/child-themes/') - ) . '

    ' . -- ( is_network_admin() ? '

    ' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '

    ' : '' ), -- ) ++ ) . '

    ' . + ( is_network_admin() ? '

    ' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '

    ' : '' ), -+ ) + ) ); get_current_screen()->set_help_sidebar( @@ -174442,12 +173900,12 @@ - '

    ' . __( 'Documentation on Editing Files' ) . '

    ' . - '

    ' . __( 'Documentation on Template Tags' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Theme Development') . '

    ' . -+ '

    ' . __('Documentation on Editing Themes') . '

    ' . -+ '

    ' . __('Documentation on Editing Files') . '

    ' . -+ '

    ' . __('Documentation on Template Tags') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Theme Development') . '

    ' . ++ '

    ' . __('Documentation on Editing Themes') . '

    ' . ++ '

    ' . __('Documentation on Editing Files') . '

    ' . ++ '

    ' . __('Documentation on Template Tags') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); -wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) ); @@ -174539,20 +173997,16 @@ - wp_redirect( - add_query_arg( - array( -- 'a' => 1, // This means "success" for some reason. -- 'theme' => $stylesheet, -- 'file' => $relative_file, -- ), -- admin_url( 'theme-editor.php' ) -- ) -- ); +wp_redirect( + add_query_arg( + array( -+ 'a' => 1, // This means "success" for some reason. -+ 'theme' => $stylesheet, -+ 'file' => $relative_file, -+ ), + 'a' => 1, // This means "success" for some reason. + 'theme' => $stylesheet, + 'file' => $relative_file, + ), +- admin_url( 'theme-editor.php' ) +- ) +- ); + admin_url('theme-editor.php') + ) +); @@ -174636,22 +174090,18 @@ - wp_admin_notice( - __( 'File edited successfully.' ), - array( -- 'id' => 'message', -- 'dismissible' => true, -- 'additional_classes' => array( 'updated' ), -- ) -- ); --} elseif ( is_wp_error( $edit_error ) ) { -- $error_code = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); -- $message = '

    ' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '

    +if ( isset($_GET['a']) ) { +wp_admin_notice( + __('File edited successfully.'), + array( -+ 'id' => 'message', -+ 'dismissible' => true, -+ 'additional_classes' => array( 'updated' ), -+ ) + 'id' => 'message', + 'dismissible' => true, + 'additional_classes' => array( 'updated' ), + ) +- ); +-} elseif ( is_wp_error( $edit_error ) ) { +- $error_code = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); +- $message = '

    ' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '

    +); +} elseif ( is_wp_error($edit_error) ) { + $error_code = esc_html($edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code()); @@ -174660,16 +174110,13 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'error', -- 'id' => 'message', -- ) -- ); +wp_admin_notice( + $message, + array( -+ 'type' => 'error', -+ 'id' => 'message', -+ ) + 'type' => 'error', + 'id' => 'message', + ) +- ); +); } @@ -174684,19 +174131,16 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'info', -- 'id' => 'message', -- ) -- ); + __('There is no need to change your CSS here — you can edit and live preview CSS changes in the built-in CSS editor.'), + esc_url(add_query_arg('autofocus[section]', 'custom_css', admin_url('customize.php'))) +) . '

    '; +wp_admin_notice( + $message, + array( -+ 'type' => 'info', -+ 'id' => 'message', -+ ) + 'type' => 'info', + 'id' => 'message', + ) +- ); +); } ?> @@ -174742,14 +174186,12 @@ - wp_admin_notice( - '' . __( 'This theme is broken.' ) . ' ' . $theme->errors()->get_error_message(), - array( -- 'additional_classes' => array( 'error' ), -- ) -- ); +wp_admin_notice( + '' . __('This theme is broken.') . ' ' . $theme->errors()->get_error_message(), + array( -+ 'additional_classes' => array( 'error' ), -+ ) + 'additional_classes' => array( 'error' ), + ) +- ); +); } ?> @@ -174769,13 +174211,14 @@ - self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ), - $theme->parent()->display( 'Name' ) - ) +- ); + __('This child theme inherits templates from a parent theme, %s.'), + sprintf( + '%s', + self_admin_url('theme-editor.php?theme=' . urlencode($theme->get_template())), + $theme->parent()->display('Name') + ) - ); ++ ); ?> @@ -174793,14 +174236,12 @@ - wp_admin_notice( - __( 'File does not exist! Please double check the name and try again.' ), - array( -- 'additional_classes' => array( 'error' ), -- ) -- ); +wp_admin_notice( + __('File does not exist! Please double check the name and try again.'), + array( -+ 'additional_classes' => array( 'error' ), -+ ) + 'additional_classes' => array( 'error' ), + ) +- ); +); else : ?> @@ -174838,18 +174279,15 @@ - wp_admin_notice( - $message, - array( -- 'type' => 'warning', -- 'additional_classes' => array( 'inline' ), -- ) -- ); + $message = ( is_writable($file) ) ? '' . __('Caution:') . ' ' : ''; + $message .= __('This is a file in your current parent theme.'); + wp_admin_notice( + $message, + array( -+ 'type' => 'warning', -+ 'additional_classes' => array( 'inline' ), -+ ) + 'type' => 'warning', + 'additional_classes' => array( 'inline' ), + ) +- ); + ); endif; ?> @@ -174924,8 +174362,8 @@ - __( 'If you need to tweak more than your theme’s CSS, you might want to try making a child theme.' ), - esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) ) - ); -+ __('If you need to tweak more than your theme’s CSS, you might want to try making a child theme.'), -+ esc_url(__('https://developer.wordpress.org/themes/advanced-topics/child-themes/')) ++ __('If you need to tweak more than your theme’s CSS, you might want to try making a child theme.'), ++ esc_url(__('https://developer.wordpress.org/themes/advanced-topics/child-themes/')) + ); echo '

    '; } @@ -174942,7 +174380,7 @@ diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php -index 25212974d8..619dc19103 100644 +index 25212974d8..a6a85dbe32 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -10,19 +10,19 @@ @@ -174970,7 +174408,7 @@ $parent_file = 'themes.php'; if ( ! is_network_admin() ) { -@@ -37,49 +37,49 @@ if ( false === $installed_themes ) { +@@ -37,8 +37,8 @@ if ( false === $installed_themes ) { foreach ( $installed_themes as $theme_slug => $theme_data ) { // Ignore child themes. @@ -174981,72 +174419,56 @@ } } - wp_localize_script( -- 'theme', -- '_wpThemeSettings', -- array( -- 'themes' => false, -- 'settings' => array( -- 'isInstall' => true, +@@ -49,37 +49,37 @@ wp_localize_script( + 'themes' => false, + 'settings' => array( + 'isInstall' => true, - 'canInstall' => current_user_can( 'install_themes' ), - 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, - 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ), -- ), -- 'l10n' => array( ++ 'canInstall' => current_user_can('install_themes'), ++ 'installURI' => current_user_can('install_themes') ? self_admin_url('theme-install.php') : null, ++ 'adminUrl' => parse_url(self_admin_url(), PHP_URL_PATH), + ), + 'l10n' => array( - 'addNew' => __( 'Add New Theme' ), - 'search' => __( 'Search Themes' ), - 'searchPlaceholder' => __( 'Search themes...' ), // Placeholder (no ellipsis). - 'upload' => __( 'Upload Theme' ), - 'back' => __( 'Back' ), - 'error' => sprintf( -+ 'theme', -+ '_wpThemeSettings', -+ array( -+ 'themes' => false, -+ 'settings' => array( -+ 'isInstall' => true, -+ 'canInstall' => current_user_can('install_themes'), -+ 'installURI' => current_user_can('install_themes') ? self_admin_url('theme-install.php') : null, -+ 'adminUrl' => parse_url(self_admin_url(), PHP_URL_PATH), -+ ), -+ 'l10n' => array( -+ 'addNew' => __('Add New Theme'), -+ 'search' => __('Search Themes'), -+ 'searchPlaceholder' => __('Search themes...'), // Placeholder (no ellipsis). -+ 'upload' => __('Upload Theme'), -+ 'back' => __('Back'), ++ 'addNew' => __('Add New Theme'), ++ 'search' => __('Search Themes'), ++ 'searchPlaceholder' => __('Search themes...'), // Placeholder (no ellipsis). ++ 'upload' => __('Upload Theme'), ++ 'back' => __('Back'), + 'error' => sprintf( /* translators: %s: Support forums URL. */ - __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/forums/' ) - ), - 'tryAgain' => __( 'Try Again' ), -- /* translators: %d: Number of themes. */ ++ __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), ++ __('https://wordpress.org/support/forums/') ++ ), ++ 'tryAgain' => __('Try Again'), + /* translators: %d: Number of themes. */ - 'themesFound' => __( 'Number of Themes found: %d' ), - 'noThemesFound' => __( 'No themes found. Try a different search.' ), - 'collapseSidebar' => __( 'Collapse Sidebar' ), - 'expandSidebar' => __( 'Expand Sidebar' ), -- /* translators: Hidden accessibility text. */ ++ 'themesFound' => __('Number of Themes found: %d'), ++ 'noThemesFound' => __('No themes found. Try a different search.'), ++ 'collapseSidebar' => __('Collapse Sidebar'), ++ 'expandSidebar' => __('Expand Sidebar'), + /* translators: Hidden accessibility text. */ - 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), -- ), ++ 'selectFeatureFilter' => __('Select one or more Theme features to filter by'), + ), - 'installedThemes' => array_keys( $installed_themes ), -- 'activeTheme' => get_stylesheet(), -- ) -+ __('An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.'), -+ __('https://wordpress.org/support/forums/') -+ ), -+ 'tryAgain' => __('Try Again'), -+ /* translators: %d: Number of themes. */ -+ 'themesFound' => __('Number of Themes found: %d'), -+ 'noThemesFound' => __('No themes found. Try a different search.'), -+ 'collapseSidebar' => __('Collapse Sidebar'), -+ 'expandSidebar' => __('Expand Sidebar'), -+ /* translators: Hidden accessibility text. */ -+ 'selectFeatureFilter' => __('Select one or more Theme features to filter by'), -+ ), -+ 'installedThemes' => array_keys($installed_themes), -+ 'activeTheme' => get_stylesheet(), -+ ) ++ 'installedThemes' => array_keys($installed_themes), + 'activeTheme' => get_stylesheet(), + ) ); -wp_enqueue_script( 'theme' ); @@ -175089,16 +174511,12 @@ +) . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $help_overview, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $help_overview, -+ ) ++ 'title' => __('Overview'), + 'content' => $help_overview, + ) ); $help_installing = @@ -175108,16 +174526,12 @@ + '

    ' . __('To install the theme so you can preview it with your site’s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme’s thumbnail image.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'installing', + array( + 'id' => 'installing', - 'title' => __( 'Previewing and Installing' ), -- 'content' => $help_installing, -- ) -+ array( -+ 'id' => 'installing', -+ 'title' => __('Previewing and Installing'), -+ 'content' => $help_installing, -+ ) ++ 'title' => __('Previewing and Installing'), + 'content' => $help_installing, + ) ); // Help tab: Block themes. @@ -175128,16 +174542,12 @@ + '

    ' . __('With a block theme, you can place and edit blocks without affecting your content by customizing or creating new templates.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'block_themes', + array( + 'id' => 'block_themes', - 'title' => __( 'Block themes' ), -- 'content' => $help_block_themes, -- ) -+ array( -+ 'id' => 'block_themes', -+ 'title' => __('Block themes'), -+ 'content' => $help_block_themes, -+ ) ++ 'title' => __('Block themes'), + 'content' => $help_block_themes, + ) ); get_current_screen()->set_help_sidebar( @@ -175145,10 +174555,10 @@ - '

    ' . __( 'Documentation on Adding New Themes' ) . '

    ' . - '

    ' . __( 'Documentation on Block Themes' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Adding New Themes') . '

    ' . -+ '

    ' . __('Documentation on Block Themes') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Adding New Themes') . '

    ' . ++ '

    ' . __('Documentation on Block Themes') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -175179,14 +174589,12 @@ - wp_admin_notice( - __( 'The Theme Installer screen requires JavaScript.' ), - array( -- 'additional_classes' => array( 'error', 'hide-if-js' ), -- ) -- ); +wp_admin_notice( + __('The Theme Installer screen requires JavaScript.'), + array( -+ 'additional_classes' => array( 'error', 'hide-if-js' ), -+ ) + 'additional_classes' => array( 'error', 'hide-if-js' ), + ) +- ); +); ?> @@ -175328,9 +174736,8 @@ + array( 'type' => 'success', 'additional_classes' => array( 'notice-alt' ), -- ) + ) - ); -+ ) +); ?> <# } #> @@ -175688,10 +175095,10 @@ diff --git a/wp-admin/themes.php b/wp-admin/themes.php -index 31a2e26d64..6778fd0f58 100644 +index 31a2e26d64..9ea69a56d3 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php -@@ -9,353 +9,353 @@ +@@ -9,213 +9,213 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; @@ -175704,7 +175111,7 @@ +if ( ! current_user_can('switch_themes') && ! current_user_can('edit_theme_options') ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to edit theme options on this site.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to edit theme options on this site.') . '

    ', + 403 +); } @@ -175721,11 +175128,12 @@ - wp_die( - '

    ' . __( 'Something went wrong.' ) . '

    ' . - '

    ' . __( 'The requested theme does not exist.' ) . '

    ', +- 403 +- ); +wp_die( -+ '

    ' . __('Something went wrong.') . '

    ' . ++ '

    ' . __('Something went wrong.') . '

    ' . + '

    ' . __('The requested theme does not exist.') . '

    ', - 403 -- ); ++ 403 +); } @@ -175737,19 +175145,21 @@ } elseif ( 'resume' === $_GET['action'] ) { - check_admin_referer( 'resume-theme_' . $_GET['stylesheet'] ); - $theme = wp_get_theme( $_GET['stylesheet'] ); -+ check_admin_referer('resume-theme_' . $_GET['stylesheet']); -+ $theme = wp_get_theme($_GET['stylesheet']); - +- - if ( ! current_user_can( 'resume_theme', $_GET['stylesheet'] ) ) { - wp_die( - '

    ' . __( 'You need a higher level of permission.' ) . '

    ' . - '

    ' . __( 'Sorry, you are not allowed to resume this theme.' ) . '

    ', +- 403 +- ); ++ check_admin_referer('resume-theme_' . $_GET['stylesheet']); ++ $theme = wp_get_theme($_GET['stylesheet']); ++ + if ( ! current_user_can('resume_theme', $_GET['stylesheet']) ) { +wp_die( -+ '

    ' . __('You need a higher level of permission.') . '

    ' . ++ '

    ' . __('You need a higher level of permission.') . '

    ' . + '

    ' . __('Sorry, you are not allowed to resume this theme.') . '

    ', - 403 -- ); ++ 403 +); } @@ -175768,19 +175178,21 @@ } elseif ( 'delete' === $_GET['action'] ) { - check_admin_referer( 'delete-theme_' . $_GET['stylesheet'] ); - $theme = wp_get_theme( $_GET['stylesheet'] ); -+ check_admin_referer('delete-theme_' . $_GET['stylesheet']); -+ $theme = wp_get_theme($_GET['stylesheet']); - +- - if ( ! current_user_can( 'delete_themes' ) ) { - wp_die( - '

    ' . __( 'You need a higher level of permission.' ) . '

    ' . - '

    ' . __( 'Sorry, you are not allowed to delete this item.' ) . '

    ', +- 403 +- ); ++ check_admin_referer('delete-theme_' . $_GET['stylesheet']); ++ $theme = wp_get_theme($_GET['stylesheet']); ++ + if ( ! current_user_can('delete_themes') ) { +wp_die( -+ '

    ' . __('You need a higher level of permission.') . '

    ' . ++ '

    ' . __('You need a higher level of permission.') . '

    ' . + '

    ' . __('Sorry, you are not allowed to delete this item.') . '

    ', - 403 -- ); ++ 403 +); } @@ -175788,11 +175200,12 @@ - wp_die( - '

    ' . __( 'Something went wrong.' ) . '

    ' . - '

    ' . __( 'The requested theme does not exist.' ) . '

    ', +- 403 +- ); +wp_die( -+ '

    ' . __('Something went wrong.') . '

    ' . ++ '

    ' . __('Something went wrong.') . '

    ' . + '

    ' . __('The requested theme does not exist.') . '

    ', - 403 -- ); ++ 403 +); } @@ -175883,11 +175296,6 @@ - - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', -- 'title' => __( 'Overview' ), -- 'content' => $help_overview, -- ) -- ); +if ( current_user_can('switch_themes') ) { + $help_overview = '

    ' . __('This screen is used for managing your installed themes. Aside from the default theme(s) included with your WordPress installation, themes are designed and developed by third parties.') . '

    ' . + '

    ' . __('From this screen you can:') . '

    ' . @@ -175899,10 +175307,12 @@ + +get_current_screen()->add_help_tab( + array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $help_overview, -+ ) + 'id' => 'overview', +- 'title' => __( 'Overview' ), ++ 'title' => __('Overview'), + 'content' => $help_overview, + ) +- ); +); } // End if 'switch_themes'. @@ -175926,17 +175336,14 @@ - get_current_screen()->add_help_tab( - array( -- 'id' => 'adding-themes', -- 'title' => __( 'Adding Themes' ), -- 'content' => $help_install, -- ) -- ); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'adding-themes', -+ 'title' => __('Adding Themes'), -+ 'content' => $help_install, -+ ) + 'id' => 'adding-themes', +- 'title' => __( 'Adding Themes' ), ++ 'title' => __('Adding Themes'), + 'content' => $help_install, + ) +- ); +); } // End if 'install_themes'. @@ -175947,24 +175354,20 @@ - '

    ' . __( 'Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.' ) . '

    ' . - '

    ' . __( 'The theme being previewed is fully interactive — navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Activate & Publish button above the menu.' ) . '

    ' . - '

    ' . __( 'When previewing on smaller monitors, you can use the collapse icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the collapse icon again.' ) . '

    '; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'customize-preview-themes', -- 'title' => __( 'Previewing and Customizing' ), -- 'content' => $help_customize, -- ) -- ); + '

    ' . __('Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.') . '

    ' . + '

    ' . __('The theme being previewed is fully interactive — navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Activate & Publish button above the menu.') . '

    ' . + '

    ' . __('When previewing on smaller monitors, you can use the collapse icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the collapse icon again.') . '

    '; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'customize-preview-themes', -+ 'title' => __('Previewing and Customizing'), -+ 'content' => $help_customize, -+ ) + 'id' => 'customize-preview-themes', +- 'title' => __( 'Previewing and Customizing' ), ++ 'title' => __('Previewing and Customizing'), + 'content' => $help_customize, + ) +- ); +); } // End if 'edit_theme_options' && 'customize'. @@ -175976,23 +175379,19 @@ $help_tab_autoupdates = - '

    ' . __( 'Auto-updates can be enabled or disabled for each individual theme. Themes with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

    ' . - '

    ' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '

    '; -- -- get_current_screen()->add_help_tab( -- array( -- 'id' => 'plugins-themes-auto-updates', -- 'title' => __( 'Auto-updates' ), -- 'content' => $help_tab_autoupdates, -- ) -- ); + '

    ' . __('Auto-updates can be enabled or disabled for each individual theme. Themes with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.') . '

    ' . + '

    ' . __('Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.') . '

    '; -+ + +- get_current_screen()->add_help_tab( +- array( +get_current_screen()->add_help_tab( + array( -+ 'id' => 'plugins-themes-auto-updates', -+ 'title' => __('Auto-updates'), -+ 'content' => $help_tab_autoupdates, -+ ) + 'id' => 'plugins-themes-auto-updates', +- 'title' => __( 'Auto-updates' ), ++ 'title' => __('Auto-updates'), + 'content' => $help_tab_autoupdates, + ) +- ); +); - $help_sidebar_autoupdates = '

    ' . __( 'Documentation on Auto-updates' ) . '

    '; @@ -176003,13 +175402,12 @@ - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Using Themes' ) . '

    ' . - '

    ' . __( 'Documentation on Managing Themes' ) . '

    ' . -- $help_sidebar_autoupdates . ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Using Themes') . '

    ' . ++ '

    ' . __('Documentation on Managing Themes') . '

    ' . + $help_sidebar_autoupdates . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Using Themes') . '

    ' . -+ '

    ' . __('Documentation on Managing Themes') . '

    ' . -+ $help_sidebar_autoupdates . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('Support forums') . '

    ' ); -if ( current_user_can( 'switch_themes' ) ) { @@ -176023,44 +175421,34 @@ +wp_reset_vars(array( 'theme', 'search' )); wp_localize_script( -- 'theme', -- '_wpThemeSettings', -- array( -- 'themes' => $themes, -- 'settings' => array( + 'theme', +@@ -223,139 +223,139 @@ wp_localize_script( + array( + 'themes' => $themes, + 'settings' => array( - 'canInstall' => ( ! is_multisite() && current_user_can( 'install_themes' ) ), - 'installURI' => ( ! is_multisite() && current_user_can( 'install_themes' ) ) ? admin_url( 'theme-install.php' ) : null, - 'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ), - 'adminUrl' => parse_url( admin_url(), PHP_URL_PATH ), -- ), -- 'l10n' => array( ++ 'canInstall' => ( ! is_multisite() && current_user_can('install_themes') ), ++ 'installURI' => ( ! is_multisite() && current_user_can('install_themes') ) ? admin_url('theme-install.php') : null, ++ 'confirmDelete' => __("Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete."), ++ 'adminUrl' => parse_url(admin_url(), PHP_URL_PATH), + ), + 'l10n' => array( - 'addNew' => __( 'Add New Theme' ), - 'search' => __( 'Search Installed Themes' ), - 'searchPlaceholder' => __( 'Search installed themes...' ), // Placeholder (no ellipsis). -- /* translators: %d: Number of themes. */ ++ 'addNew' => __('Add New Theme'), ++ 'search' => __('Search Installed Themes'), ++ 'searchPlaceholder' => __('Search installed themes...'), // Placeholder (no ellipsis). + /* translators: %d: Number of themes. */ - 'themesFound' => __( 'Number of Themes found: %d' ), - 'noThemesFound' => __( 'No themes found. Try a different search.' ), -- ), -- ) -+ 'theme', -+ '_wpThemeSettings', -+ array( -+ 'themes' => $themes, -+ 'settings' => array( -+ 'canInstall' => ( ! is_multisite() && current_user_can('install_themes') ), -+ 'installURI' => ( ! is_multisite() && current_user_can('install_themes') ) ? admin_url('theme-install.php') : null, -+ 'confirmDelete' => __("Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete."), -+ 'adminUrl' => parse_url(admin_url(), PHP_URL_PATH), -+ ), -+ 'l10n' => array( -+ 'addNew' => __('Add New Theme'), -+ 'search' => __('Search Installed Themes'), -+ 'searchPlaceholder' => __('Search installed themes...'), // Placeholder (no ellipsis). -+ /* translators: %d: Number of themes. */ -+ 'themesFound' => __('Number of Themes found: %d'), -+ 'noThemesFound' => __('No themes found. Try a different search.'), -+ ), -+ ) ++ 'themesFound' => __('Number of Themes found: %d'), ++ 'noThemesFound' => __('No themes found. Try a different search.'), + ), + ) ); add_thickbox(); @@ -176093,24 +175481,20 @@ - wp_admin_notice( - __( 'The active theme is broken. Reverting to the default theme.' ), - array( -- 'id' => 'message1', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) ++if ( ! validate_current_theme() || isset($_GET['broken']) ) { ++wp_admin_notice( ++ __('The active theme is broken. Reverting to the default theme.'), ++ array( + 'id' => 'message1', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) - ); -} elseif ( isset( $_GET['activated'] ) ) { - if ( isset( $_GET['previewed'] ) ) { - wp_admin_notice( - __( 'Settings saved and theme activated.' ) . ' ' . __( 'Visit site' ) . '', - array( -+if ( ! validate_current_theme() || isset($_GET['broken']) ) { -+wp_admin_notice( -+ __('The active theme is broken. Reverting to the default theme.'), -+ array( -+ 'id' => 'message1', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) +); +} elseif ( isset($_GET['activated']) ) { + if ( isset($_GET['previewed']) ) { @@ -176120,9 +175504,8 @@ 'id' => 'message2', 'additional_classes' => array( 'updated' ), 'dismissible' => true, -- ) + ) - ); -+ ) +); } else { - wp_admin_notice( @@ -176134,114 +175517,91 @@ 'id' => 'message2', 'additional_classes' => array( 'updated' ), 'dismissible' => true, -- ) + ) - ); -+ ) +); } -} elseif ( isset( $_GET['deleted'] ) ) { - wp_admin_notice( - __( 'Theme deleted.' ), - array( -- 'id' => 'message3', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) ++} elseif ( isset($_GET['deleted']) ) { ++wp_admin_notice( ++ __('Theme deleted.'), ++ array( + 'id' => 'message3', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) - ); -} elseif ( isset( $_GET['delete-active-child'] ) ) { - wp_admin_notice( - __( 'You cannot delete a theme while it has an active child theme.' ), - array( -- 'id' => 'message4', -- 'additional_classes' => array( 'error' ), -- ) -- ); --} elseif ( isset( $_GET['resumed'] ) ) { -- wp_admin_notice( -- __( 'Theme resumed.' ), -- array( -- 'id' => 'message5', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); --} elseif ( isset( $_GET['error'] ) && 'resuming' === $_GET['error'] ) { -- wp_admin_notice( -- __( 'Theme could not be resumed because it triggered a fatal error.' ), -- array( -- 'id' => 'message6', -- 'additional_classes' => array( 'error' ), -- ) -- ); --} elseif ( isset( $_GET['enabled-auto-update'] ) ) { -- wp_admin_notice( -- __( 'Theme will be auto-updated.' ), -- array( -- 'id' => 'message7', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); --} elseif ( isset( $_GET['disabled-auto-update'] ) ) { -- wp_admin_notice( -- __( 'Theme will no longer be auto-updated.' ), -- array( -- 'id' => 'message8', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); -+} elseif ( isset($_GET['deleted']) ) { -+wp_admin_notice( -+ __('Theme deleted.'), -+ array( -+ 'id' => 'message3', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) +); +} elseif ( isset($_GET['delete-active-child']) ) { +wp_admin_notice( + __('You cannot delete a theme while it has an active child theme.'), + array( -+ 'id' => 'message4', -+ 'additional_classes' => array( 'error' ), -+ ) + 'id' => 'message4', + 'additional_classes' => array( 'error' ), + ) +- ); +-} elseif ( isset( $_GET['resumed'] ) ) { +- wp_admin_notice( +- __( 'Theme resumed.' ), +- array( +); +} elseif ( isset($_GET['resumed']) ) { +wp_admin_notice( + __('Theme resumed.'), + array( -+ 'id' => 'message5', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message5', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +-} elseif ( isset( $_GET['error'] ) && 'resuming' === $_GET['error'] ) { +- wp_admin_notice( +- __( 'Theme could not be resumed because it triggered a fatal error.' ), +- array( +); +} elseif ( isset($_GET['error']) && 'resuming' === $_GET['error'] ) { +wp_admin_notice( + __('Theme could not be resumed because it triggered a fatal error.'), + array( -+ 'id' => 'message6', -+ 'additional_classes' => array( 'error' ), -+ ) + 'id' => 'message6', + 'additional_classes' => array( 'error' ), + ) +- ); +-} elseif ( isset( $_GET['enabled-auto-update'] ) ) { +- wp_admin_notice( +- __( 'Theme will be auto-updated.' ), +- array( +); +} elseif ( isset($_GET['enabled-auto-update']) ) { +wp_admin_notice( + __('Theme will be auto-updated.'), + array( -+ 'id' => 'message7', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message7', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +-} elseif ( isset( $_GET['disabled-auto-update'] ) ) { +- wp_admin_notice( +- __( 'Theme will no longer be auto-updated.' ), +- array( +); +} elseif ( isset($_GET['disabled-auto-update']) ) { +wp_admin_notice( + __('Theme will no longer be auto-updated.'), + array( -+ 'id' => 'message8', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message8', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +); } @@ -176251,15 +175611,13 @@ - wp_admin_notice( - __( 'Error:' ) . ' ' . $current_theme->errors()->get_error_message(), - array( -- 'additional_classes' => array( 'error' ), -- ) -- ); +if ( $current_theme->errors() && ( ! is_multisite() || current_user_can('manage_network_themes') ) ) { +wp_admin_notice( + __('Error:') . ' ' . $current_theme->errors()->get_error_message(), + array( -+ 'additional_classes' => array( 'error' ), -+ ) + 'additional_classes' => array( 'error' ), + ) +- ); +); } @@ -176362,9 +175720,11 @@ + $new_version_available = __('New version available.'); } - wp_admin_notice( +- $new_version_available, +- array( +wp_admin_notice( - $new_version_available, - array( ++ $new_version_available, ++ array( 'type' => 'warning', 'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ), ) @@ -176377,11 +175737,12 @@ /* translators: %s: Theme name. */ - __( 'There is a new version of %s available, but it does not work with your versions of WordPress and PHP.' ), - $theme['name'] -+ __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'), -+ $theme['name'] - ); +- ); - if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { - $theme_update_error .= sprintf( ++ __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'), ++ $theme['name'] ++ ); + if ( current_user_can('update_core') && current_user_can('update_php') ) { + $theme_update_error .= sprintf( /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ @@ -176425,11 +175786,12 @@ /* translators: %s: Theme name. */ - __( 'There is a new version of %s available, but it does not work with your version of WordPress.' ), - $theme['name'] -+ __('There is a new version of %s available, but it does not work with your version of WordPress.'), -+ $theme['name'] - ); +- ); - if ( current_user_can( 'update_core' ) ) { - $theme_update_error .= sprintf( ++ __('There is a new version of %s available, but it does not work with your version of WordPress.'), ++ $theme['name'] ++ ); + if ( current_user_can('update_core') ) { + $theme_update_error .= sprintf( /* translators: %s: URL to WordPress Updates screen. */ @@ -176445,11 +175807,12 @@ /* translators: %s: Theme name. */ - __( 'There is a new version of %s available, but it does not work with your version of PHP.' ), - $theme['name'] -+ __('There is a new version of %s available, but it does not work with your version of PHP.'), -+ $theme['name'] - ); +- ); - if ( current_user_can( 'update_php' ) ) { - $theme_update_error .= sprintf( ++ __('There is a new version of %s available, but it does not work with your version of PHP.'), ++ $theme['name'] ++ ); + if ( current_user_can('update_php') ) { + $theme_update_error .= sprintf( /* translators: %s: URL to Update PHP page. */ @@ -176464,9 +175827,11 @@ } } - wp_admin_notice( +- $theme_update_error, +- array( +wp_admin_notice( - $theme_update_error, - array( ++ $theme_update_error, ++ array( 'type' => 'error', 'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ), ) @@ -176487,31 +175852,34 @@ - ' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ), - self_admin_url( 'update-core.php' ), - esc_url( wp_get_update_php_url() ) +- ); +- $message .= wp_update_php_annotation( '

    ', '', false ); +- } elseif ( current_user_can( 'update_core' ) ) { + ' ' . __('Please update WordPress, and then learn more about updating PHP.'), + self_admin_url('update-core.php'), + esc_url(wp_get_update_php_url()) - ); -- $message .= wp_update_php_annotation( '

    ', '', false ); -- } elseif ( current_user_can( 'update_core' ) ) { ++ ); + $message .= wp_update_php_annotation('

    ', '', false); + } elseif ( current_user_can('update_core') ) { $message .= sprintf( /* translators: %s: URL to WordPress Updates screen. */ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) +- ); +- } elseif ( current_user_can( 'update_php' ) ) { + ' ' . __('Please update WordPress.'), + self_admin_url('update-core.php') - ); -- } elseif ( current_user_can( 'update_php' ) ) { ++ ); + } elseif ( current_user_can('update_php') ) { $message .= sprintf( /* translators: %s: URL to Update PHP page. */ - ' ' . __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); +- $message .= wp_update_php_annotation( '

    ', '', false ); + ' ' . __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); -- $message .= wp_update_php_annotation( '

    ', '', false ); ++ ); + $message .= wp_update_php_annotation('

    ', '', false); } } elseif ( ! $theme['compatibleWP'] ) { @@ -176523,9 +175891,10 @@ /* translators: %s: URL to WordPress Updates screen. */ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) +- ); + ' ' . __('Please update WordPress.'), + self_admin_url('update-core.php') - ); ++ ); } } elseif ( ! $theme['compatiblePHP'] ) { - $message .= __( 'This theme does not work with your version of PHP.' ); @@ -176536,10 +175905,11 @@ /* translators: %s: URL to Update PHP page. */ - ' ' . __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); +- $message .= wp_update_php_annotation( '

    ', '', false ); + ' ' . __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); -- $message .= wp_update_php_annotation( '

    ', '', false ); ++ ); + $message .= wp_update_php_annotation('

    ', '', false); } } @@ -176552,9 +175922,8 @@ + array( 'type' => 'error', 'additional_classes' => array( 'inline', 'notice-alt' ), -- ) + ) - ); -+ ) +); } @@ -176683,17 +176052,15 @@ $stylesheet = $broken_theme->get_stylesheet(); - $resume_url = add_query_arg( - array( -- 'action' => 'resume', ++ $resume_url = add_query_arg( ++ array( + 'action' => 'resume', - 'stylesheet' => urlencode( $stylesheet ), -- ), ++ 'stylesheet' => urlencode($stylesheet), + ), - admin_url( 'themes.php' ) - ); - $resume_url = wp_nonce_url( $resume_url, 'resume-theme_' . $stylesheet ); -+ $resume_url = add_query_arg( -+ array( -+ 'action' => 'resume', -+ 'stylesheet' => urlencode($stylesheet), -+ ), + admin_url('themes.php') + ); + $resume_url = wp_nonce_url($resume_url, 'resume-theme_' . $stylesheet); @@ -176708,17 +176075,16 @@ $stylesheet = $broken_theme->get_stylesheet(); $delete_url = add_query_arg( - array( -- 'action' => 'delete', ++ array( + 'action' => 'delete', - 'stylesheet' => urlencode( $stylesheet ), -- ), ++ 'stylesheet' => urlencode($stylesheet), + ), - admin_url( 'themes.php' ) -+ array( -+ 'action' => 'delete', -+ 'stylesheet' => urlencode($stylesheet), -+ ), -+ admin_url('themes.php') - ); +- ); - $delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet ); ++ admin_url('themes.php') ++ ); + $delete_url = wp_nonce_url($delete_url, 'delete-theme_' . $stylesheet); ?> -

    @@ -176729,25 +176095,22 @@ if ( $can_install && 'theme_no_parent' === $broken_theme->errors()->get_error_code() ) { - $parent_theme_name = $broken_theme->get( 'Template' ); - $parent_theme = themes_api( 'theme_information', array( 'slug' => urlencode( $parent_theme_name ) ) ); -- ++ $parent_theme_name = $broken_theme->get('Template'); ++ $parent_theme = themes_api('theme_information', array( 'slug' => urlencode($parent_theme_name) )); + - if ( ! is_wp_error( $parent_theme ) ) { - $install_url = add_query_arg( - array( -- 'action' => 'install-theme', ++ if ( ! is_wp_error($parent_theme) ) { ++ $install_url = add_query_arg( ++ array( + 'action' => 'install-theme', - 'theme' => urlencode( $parent_theme_name ), -- ), ++ 'theme' => urlencode($parent_theme_name), + ), - admin_url( 'update.php' ) - ); - $install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name ); -+ $parent_theme_name = $broken_theme->get('Template'); -+ $parent_theme = themes_api('theme_information', array( 'slug' => urlencode($parent_theme_name) )); -+ -+ if ( ! is_wp_error($parent_theme) ) { -+ $install_url = add_query_arg( -+ array( -+ 'action' => 'install-theme', -+ 'theme' => urlencode($parent_theme_name), -+ ), + admin_url('update.php') + ); + $install_url = wp_nonce_url($install_url, 'install-theme_' . $parent_theme_name); @@ -176764,16 +176127,13 @@ - $notice = wp_get_admin_notice( - '', - array( -- 'type' => 'error', -- 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -- ) -- ); +$notice = wp_get_admin_notice( + '', + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), -+ ) + 'type' => 'error', + 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), + ) +- ); +); $template = '
    @@ -177128,31 +176488,34 @@ - ' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ), - self_admin_url( 'update-core.php' ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '

    ', '' ); +- } elseif ( current_user_can( 'update_core' ) ) { + ' ' . __('Please update WordPress, and then learn more about updating PHP.'), + self_admin_url('update-core.php'), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '

    ', '' ); -- } elseif ( current_user_can( 'update_core' ) ) { ++ ); + wp_update_php_annotation('

    ', ''); + } elseif ( current_user_can('update_core') ) { printf( /* translators: %s: URL to WordPress Updates screen. */ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) +- ); +- } elseif ( current_user_can( 'update_php' ) ) { + ' ' . __('Please update WordPress.'), + self_admin_url('update-core.php') - ); -- } elseif ( current_user_can( 'update_php' ) ) { ++ ); + } elseif ( current_user_can('update_php') ) { printf( /* translators: %s: URL to Update PHP page. */ - ' ' . __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '

    ', '' ); + ' ' . __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '

    ', '' ); ++ ); + wp_update_php_annotation('

    ', ''); } ?> @@ -177166,9 +176529,10 @@ /* translators: %s: URL to WordPress Updates screen. */ - ' ' . __( 'Please update WordPress.' ), - self_admin_url( 'update-core.php' ) +- ); + ' ' . __('Please update WordPress.'), + self_admin_url('update-core.php') - ); ++ ); } ?> <# } else if ( ! data.compatiblePHP ) { #> @@ -177181,10 +176545,11 @@ /* translators: %s: URL to Update PHP page. */ - ' ' . __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); +- wp_update_php_annotation( '

    ', '' ); + ' ' . __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); -- wp_update_php_annotation( '

    ', '' ); ++ ); + wp_update_php_annotation('

    ', ''); } ?> @@ -177372,25 +176737,8 @@ <# } #>

    -@@ -1258,11 +1258,11 @@ wp_print_admin_notice_templates(); - wp_print_update_row_templates(); - - wp_localize_script( -- 'updates', -- '_wpUpdatesItemCounts', -- array( -- 'totals' => wp_get_update_data(), -- ) -+ 'updates', -+ '_wpUpdatesItemCounts', -+ array( -+ 'totals' => wp_get_update_data(), -+ ) - ); - - require_once ABSPATH . 'wp-admin/admin-footer.php'; diff --git a/wp-admin/tools.php b/wp-admin/tools.php -index d03c64fa61..fde0f1a4b8 100644 +index d03c64fa61..1531be5f59 100644 --- a/wp-admin/tools.php +++ b/wp-admin/tools.php @@ -6,7 +6,7 @@ @@ -177430,7 +176778,7 @@ exit; } } -@@ -40,43 +40,43 @@ if ( isset( $_GET['wp-privacy-policy-guide'] ) ) { +@@ -40,44 +40,44 @@ if ( isset( $_GET['wp-privacy-policy-guide'] ) ) { require_once __DIR__ . '/admin.php'; // Used in the HTML title tag. @@ -177438,27 +176786,24 @@ +$title = __('Tools'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'converter', + array( + 'id' => 'converter', - 'title' => __( 'Categories and Tags Converter' ), - 'content' => '

    ' . __( 'Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '

    ' . - '

    ' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '

    ', -- ) -+ array( -+ 'id' => 'converter', -+ 'title' => __('Categories and Tags Converter'), -+ 'content' => '

    ' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.') . '

    ' . -+ '

    ' . __('The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.') . '

    ', -+ ) ++ 'title' => __('Categories and Tags Converter'), ++ 'content' => '

    ' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.') . '

    ' . ++ '

    ' . __('The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.') . '

    ', + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Tools' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Tools') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Tools') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -177487,11 +176832,13 @@ /* translators: %s: URL to Import screen. */ - __( 'If you want to convert your categories to tags (or vice versa), use the Categories and Tags Converter available from the Import screen.' ), - 'import.php' +- ); + __('If you want to convert your categories to tags (or vice versa), use the Categories and Tags Converter available from the Import screen.'), + 'import.php' - ); ++ ); ?>

    + @@ -90,7 +90,7 @@ endif; * * @since 2.8.0 @@ -177502,7 +176849,7 @@ ?> diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php -index c34ac06f24..e6b9d70f51 100644 +index c34ac06f24..42444fa3e0 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -9,18 +9,18 @@ @@ -177603,8 +176950,8 @@ - esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), - sanitize_title( $update->current ) - ); -+ esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')), -+ sanitize_title($update->current) ++ esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')), ++ sanitize_title($update->current) +); - $php_update_message = '

    ' . sprintf( @@ -177613,13 +176960,13 @@ - __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) - ); -+ __('Learn more about updating PHP.'), -+ esc_url(wp_get_update_php_url()) ++ __('Learn more about updating PHP.'), ++ esc_url(wp_get_update_php_url()) +); $annotation = wp_get_update_php_annotation(); -@@ -110,39 +110,39 @@ function list_core_update( $update ) { +@@ -110,40 +110,40 @@ function list_core_update( $update ) { if ( ! $mysql_compat && ! $php_compat ) { $message = sprintf( /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */ @@ -177630,6 +176977,7 @@ - $update->mysql_version, - $php_version, - $mysql_version +- ) . $php_update_message; + __('You cannot update because WordPress %2$s requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'), + $version_url, + $update->current, @@ -177637,7 +176985,7 @@ + $update->mysql_version, + $php_version, + $mysql_version - ) . $php_update_message; ++ ) . $php_update_message; } elseif ( ! $php_compat ) { $message = sprintf( /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */ @@ -177646,12 +176994,13 @@ - $update->current, - $update->php_version, - $php_version +- ) . $php_update_message; + __('You cannot update because WordPress %2$s requires PHP version %3$s or higher. You are running version %4$s.'), + $version_url, + $update->current, + $update->php_version, + $php_version - ) . $php_update_message; ++ ) . $php_update_message; } elseif ( ! $mysql_compat ) { $message = sprintf( /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */ @@ -177660,12 +177009,13 @@ - $update->current, - $update->mysql_version, - $mysql_version +- ); + __('You cannot update because WordPress %2$s requires MySQL version %3$s or higher. You are running version %4$s.'), + $version_url, + $update->current, + $update->mysql_version, + $mysql_version - ); ++ ); } else { $message = sprintf( /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */ @@ -177673,13 +177023,15 @@ - $wp_version, - $version_url, - $version_string +- ); + __('You can update from WordPress %1$s to WordPress %3$s manually:'), + $wp_version, + $version_url, + $version_string - ); ++ ); } + if ( ! $mysql_compat || ! $php_compat ) { @@ -156,38 +156,38 @@ function list_core_update( $update ) { echo $message; echo '

    '; @@ -177740,15 +177092,12 @@ function dismissed_updates() { - $dismissed = get_core_updates( - array( -- 'dismissed' => true, -- 'available' => false, -- ) -- ); +$dismissed = get_core_updates( + array( -+ 'dismissed' => true, -+ 'available' => false, -+ ) + 'dismissed' => true, + 'available' => false, + ) +- ); +); if ( $dismissed ) { @@ -177806,9 +177155,8 @@ + array( 'type' => 'warning', 'additional_classes' => array( 'inline' ), -- ) + ) - ); -+ ) +); } elseif ( $is_development_version ) { - echo '

    ' . __( 'You are using a development version of WordPress.' ) . '

    '; @@ -177858,10 +177206,12 @@ if ( 'enabled' === $_GET['core-major-auto-updates-saved'] ) { - $notice_text = __( 'Automatic updates for all WordPress versions have been enabled. Thank you!' ); - wp_admin_notice( +- $notice_text, +- array( + $notice_text = __('Automatic updates for all WordPress versions have been enabled. Thank you!'); +wp_admin_notice( - $notice_text, - array( ++ $notice_text, ++ array( 'type' => 'success', 'dismissible' => true, ) @@ -177870,10 +177220,12 @@ } elseif ( 'disabled' === $_GET['core-major-auto-updates-saved'] ) { - $notice_text = __( 'WordPress will only receive automatic security and maintenance releases from now on.' ); - wp_admin_notice( +- $notice_text, +- array( + $notice_text = __('WordPress will only receive automatic security and maintenance releases from now on.'); +wp_admin_notice( - $notice_text, - array( ++ $notice_text, ++ array( 'type' => 'success', 'dismissible' => true, ) @@ -177964,10 +177316,11 @@ - '%s', - wp_nonce_url( add_query_arg( 'value', 'disable', $action_url ), 'core-major-auto-updates-nonce' ), - __( 'Switch to automatic updates for maintenance and security releases only.' ) +- ); + '%s', + wp_nonce_url(add_query_arg('value', 'disable', $action_url), 'core-major-auto-updates-nonce'), + __('Switch to automatic updates for maintenance and security releases only.') - ); ++ ); } } elseif ( $upgrade_minor ) { - _e( 'This site is automatically kept up to date with maintenance and security releases of WordPress only.' ); @@ -177979,10 +177332,11 @@ - '%s', - wp_nonce_url( add_query_arg( 'value', 'enable', $action_url ), 'core-major-auto-updates-nonce' ), - __( 'Enable automatic updates for all new versions of WordPress.' ) +- ); + '%s', + wp_nonce_url(add_query_arg('value', 'enable', $action_url), 'core-major-auto-updates-nonce'), + __('Enable automatic updates for all new versions of WordPress.') - ); ++ ); } } else { - _e( 'This site will not receive automatic updates for new versions of WordPress.' ); @@ -178128,8 +177482,8 @@ - __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) - ); -+ __('Learn more about updating PHP.'), -+ esc_url(wp_get_update_php_url()) ++ __('Learn more about updating PHP.'), ++ esc_url(wp_get_update_php_url()) +); $annotation = wp_get_update_php_annotation(); @@ -178162,9 +177516,9 @@ + '%3$s', + esc_url($details_url), + /* translators: 1: Plugin name, 2: Version number. */ -+ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_data->Name, $plugin_data->update->new_version)), ++ esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_data->Name, $plugin_data->update->new_version)), + /* translators: %s: Plugin version. */ -+ sprintf(__('View version %s details.'), $plugin_data->update->new_version) ++ sprintf(__('View version %s details.'), $plugin_data->update->new_version) +); + + $checkbox_id = 'checkbox_' . md5($plugin_file); @@ -178191,10 +177545,12 @@ +printf( /* translators: 1: Plugin version, 2: New version. */ - __( 'You have version %1$s installed. Update to %2$s.' ), -+ __('You have version %1$s installed. Update to %2$s.'), - $plugin_data->Version, - $plugin_data->update->new_version +- $plugin_data->Version, +- $plugin_data->update->new_version - ); ++ __('You have version %1$s installed. Update to %2$s.'), ++ $plugin_data->Version, ++ $plugin_data->update->new_version +); echo ' ' . $details . $compat; @@ -178218,7 +177574,7 @@ Please update WordPress, and then learn more about updating PHP.' ), - esc_url( self_admin_url( 'update-core.php' ) ), - esc_url( wp_get_update_php_url() ) +- ); + __('Please update WordPress, and then learn more about updating PHP.'), + esc_url(self_admin_url('update-core.php')), + esc_url(wp_get_update_php_url()) - ); ++ ); $annotation = wp_get_update_php_annotation(); -@@ -710,17 +710,17 @@ function list_theme_updates() { + if ( $annotation ) { $compat .= '

    ' . $annotation . ''; } @@ -178329,21 +177686,24 @@ /* translators: %s: URL to WordPress Updates screen. */ - __( 'Please update WordPress.' ), - esc_url( self_admin_url( 'update-core.php' ) ) +- ); +- } elseif ( current_user_can( 'update_php' ) ) { + __('Please update WordPress.'), + esc_url(self_admin_url('update-core.php')) - ); -- } elseif ( current_user_can( 'update_php' ) ) { ++ ); + } elseif ( current_user_can('update_php') ) { $compat .= sprintf( /* translators: %s: URL to Update PHP page. */ - __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); + __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); ++ ); $annotation = wp_get_update_php_annotation(); -@@ -730,21 +730,21 @@ function list_theme_updates() { + +@@ -730,22 +730,22 @@ function list_theme_updates() { } } } elseif ( ! $compatible_wp ) { @@ -178355,9 +177715,10 @@ /* translators: %s: URL to WordPress Updates screen. */ - __( 'Please update WordPress.' ), - esc_url( self_admin_url( 'update-core.php' ) ) +- ); + __('Please update WordPress.'), + esc_url(self_admin_url('update-core.php')) - ); ++ ); } } elseif ( ! $compatible_php ) { - $compat .= '
    ' . __( 'This update does not work with your version of PHP.' ) . ' '; @@ -178368,11 +177729,13 @@ /* translators: %s: URL to Update PHP page. */ - __( 'Learn more about updating PHP.' ), - esc_url( wp_get_update_php_url() ) +- ); + __('Learn more about updating PHP.'), + esc_url(wp_get_update_php_url()) - ); ++ ); $annotation = wp_get_update_php_annotation(); + @@ -755,36 +755,36 @@ function list_theme_updates() { } } @@ -178407,10 +177770,11 @@ /* translators: 1: Theme version, 2: New version. */ - __( 'You have version %1$s installed. Update to %2$s.' ), - $theme->display( 'Version' ), -+ __('You have version %1$s installed. Update to %2$s.'), -+ $theme->display('Version'), - $theme->update['new_version'] +- $theme->update['new_version'] - ); ++ __('You have version %1$s installed. Update to %2$s.'), ++ $theme->display('Version'), ++ $theme->update['new_version'] +); echo ' ' . $compat; @@ -178524,14 +177888,12 @@ - $result = $upgrader->upgrade( - $update, - array( -- 'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership, -- ) -- ); +$result = $upgrader->upgrade( + $update, + array( -+ 'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership, -+ ) + 'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership, + ) +- ); +); - if ( is_wp_error( $result ) ) { @@ -178549,7 +177911,10 @@ - show_message( __( 'WordPress updated successfully.' ) ); - show_message( - '' . sprintf( -- /* translators: 1: WordPress version, 2: URL to About screen. */ ++ show_message(__('WordPress updated successfully.')); ++show_message( ++ '' . sprintf( + /* translators: 1: WordPress version, 2: URL to About screen. */ - __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.' ), - $result, - esc_url( self_admin_url( 'about.php?updated' ) ) @@ -178557,16 +177922,6 @@ - ); - show_message( - '' . sprintf( -- /* translators: 1: WordPress version, 2: URL to About screen. */ -- __( 'Welcome to WordPress %1$s. Learn more.' ), -- $result, -- esc_url( self_admin_url( 'about.php?updated' ) ) -- ) . '' -- ); -+ show_message(__('WordPress updated successfully.')); -+show_message( -+ '' . sprintf( -+ /* translators: 1: WordPress version, 2: URL to About screen. */ + __('Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.'), + $result, + esc_url(self_admin_url('about.php?updated')) @@ -178574,7 +177929,12 @@ +); +show_message( + '' . sprintf( -+ /* translators: 1: WordPress version, 2: URL to About screen. */ + /* translators: 1: WordPress version, 2: URL to About screen. */ +- __( 'Welcome to WordPress %1$s. Learn more.' ), +- $result, +- esc_url( self_admin_url( 'about.php?updated' ) ) +- ) . '' +- ); + __('Welcome to WordPress %1$s. Learn more.'), + $result, + esc_url(self_admin_url('about.php?updated')) @@ -178650,16 +178010,12 @@ +$updates_overview .= '

    ' . __('If an update is available, you᾿ll see a notification appear in the Toolbar and navigation menu.') . ' ' . __('Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $updates_overview, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $updates_overview, -+ ) ++ 'title' => __('Overview'), + 'content' => $updates_overview, + ) ); -$updates_howto = '

    ' . __( 'WordPress — Updating your WordPress installation is a simple one-click procedure: just click on the “Update now” button when you are notified that a new version is available.' ) . ' ' . __( 'In most cases, WordPress will automatically apply maintenance and security updates in the background for you.' ) . '

    '; @@ -178673,16 +178029,12 @@ } get_current_screen()->add_help_tab( -- array( -- 'id' => 'how-to-update', + array( + 'id' => 'how-to-update', - 'title' => __( 'How to Update' ), -- 'content' => $updates_howto, -- ) -+ array( -+ 'id' => 'how-to-update', -+ 'title' => __('How to Update'), -+ 'content' => $updates_howto, -+ ) ++ 'title' => __('How to Update'), + 'content' => $updates_howto, + ) ); $help_sidebar_autoupdates = ''; @@ -178696,17 +178048,14 @@ - get_current_screen()->add_help_tab( - array( -- 'id' => 'plugins-themes-auto-updates', -- 'title' => __( 'Auto-updates' ), -- 'content' => $help_tab_autoupdates, -- ) -- ); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'plugins-themes-auto-updates', -+ 'title' => __('Auto-updates'), -+ 'content' => $help_tab_autoupdates, -+ ) + 'id' => 'plugins-themes-auto-updates', +- 'title' => __( 'Auto-updates' ), ++ 'title' => __('Auto-updates'), + 'content' => $help_tab_autoupdates, + ) +- ); +); - $help_sidebar_autoupdates = '

    ' . __( 'Documentation on Auto-updates' ) . '

    '; @@ -178725,17 +178074,14 @@ - get_current_screen()->add_help_tab( - array( -- 'id' => 'rollback-plugins-themes', -- 'title' => __( 'Restore Plugin or Theme' ), -- 'content' => $rollback_help, -- ) -- ); +get_current_screen()->add_help_tab( + array( -+ 'id' => 'rollback-plugins-themes', -+ 'title' => __('Restore Plugin or Theme'), -+ 'content' => $rollback_help, -+ ) + 'id' => 'rollback-plugins-themes', +- 'title' => __( 'Restore Plugin or Theme' ), ++ 'title' => __('Restore Plugin or Theme'), + 'content' => $rollback_help, + ) +- ); +); - $help_sidebar_rollback = '

    ' . __( 'Common Errors' ) . '

    '; @@ -178745,14 +178091,12 @@ get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Updating WordPress' ) . '

    ' . -- $help_sidebar_autoupdates . ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Updating WordPress') . '

    ' . + $help_sidebar_autoupdates . - '

    ' . __( 'Support forums' ) . '

    ' . -- $help_sidebar_rollback -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Updating WordPress') . '

    ' . -+ $help_sidebar_autoupdates . -+ '

    ' . __('Support forums') . '

    ' . -+ $help_sidebar_rollback ++ '

    ' . __('Support forums') . '

    ' . + $help_sidebar_rollback ); if ( 'upgrade-core' === $action ) { @@ -178779,13 +178123,12 @@ wp_admin_notice( - __( 'Please select one or more themes to update.' ), - array( -- 'additional_classes' => array( 'error' ), -- ) + __('Please select one or more themes to update.'), + array( -+ 'additional_classes' => array( 'error' ), -+ ) - ); + 'additional_classes' => array( 'error' ), + ) +- ); ++ ); } } else { $plugin_updates = get_plugin_updates(); @@ -178794,13 +178137,12 @@ wp_admin_notice( - __( 'Please select one or more plugins to update.' ), - array( -- 'additional_classes' => array( 'error' ), -- ) + __('Please select one or more plugins to update.'), + array( -+ 'additional_classes' => array( 'error' ), -+ ) - ); + 'additional_classes' => array( 'error' ), + ) +- ); ++ ); } } } @@ -178835,9 +178177,9 @@ - echo ' ' . __( 'Check again.' ) . ''; + __('Last checked on %1$s at %2$s.'), + /* translators: Last update date format. See https://www.php.net/manual/datetime.format.php */ -+ date_i18n(__('F j, Y'), $last_update_check), ++ date_i18n(__('F j, Y'), $last_update_check), + /* translators: Last update time format. See https://www.php.net/manual/datetime.format.php */ -+ date_i18n(__('g:i a T'), $last_update_check) ++ date_i18n(__('g:i a T'), $last_update_check) +); + echo ' ' . __('Check again.') . ''; echo '

    '; @@ -178872,15 +178214,13 @@ - 'updates', - '_wpUpdatesItemCounts', - array( -- 'totals' => wp_get_update_data(), -- ) -- ); +wp_localize_script( + 'updates', + '_wpUpdatesItemCounts', + array( -+ 'totals' => wp_get_update_data(), -+ ) + 'totals' => wp_get_update_data(), + ) +- ); +); require_once ABSPATH . 'wp-admin/admin-footer.php'; @@ -178919,15 +178259,13 @@ - 'updates', - '_wpUpdatesItemCounts', - array( -- 'totals' => wp_get_update_data(), -- ) -- ); +wp_localize_script( + 'updates', + '_wpUpdatesItemCounts', + array( -+ 'totals' => wp_get_update_data(), -+ ) + 'totals' => wp_get_update_data(), + ) +- ); +); require_once ABSPATH . 'wp-admin/admin-footer.php'; @@ -178979,15 +178317,13 @@ - 'updates', - '_wpUpdatesItemCounts', - array( -- 'totals' => wp_get_update_data(), -- ) -- ); +wp_localize_script( + 'updates', + '_wpUpdatesItemCounts', + array( -+ 'totals' => wp_get_update_data(), -+ ) + 'totals' => wp_get_update_data(), + ) +- ); +); require_once ABSPATH . 'wp-admin/admin-footer.php'; @@ -179039,15 +178375,13 @@ - 'updates', - '_wpUpdatesItemCounts', - array( -- 'totals' => wp_get_update_data(), -- ) -- ); +wp_localize_script( + 'updates', + '_wpUpdatesItemCounts', + array( -+ 'totals' => wp_get_update_data(), -+ ) + 'totals' => wp_get_update_data(), + ) +- ); +); require_once ABSPATH . 'wp-admin/admin-footer.php'; @@ -179080,15 +178414,13 @@ - 'updates', - '_wpUpdatesItemCounts', - array( -- 'totals' => wp_get_update_data(), -- ) -- ); +wp_localize_script( + 'updates', + '_wpUpdatesItemCounts', + array( -+ 'totals' => wp_get_update_data(), -+ ) + 'totals' => wp_get_update_data(), + ) +- ); +); require_once ABSPATH . 'wp-admin/admin-footer.php'; @@ -179135,7 +178467,7 @@ + do_action("update-core-custom_{$action}"); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } diff --git a/wp-admin/update.php b/wp-admin/update.php -index 29480c2840..6fd9259128 100644 +index 29480c2840..8fdc446ad8 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -6,10 +6,10 @@ @@ -179301,9 +178633,8 @@ 'fields' => array( 'sections' => false, ), -- ) + ) - ); -+ ) +); - if ( is_wp_error( $api ) ) { @@ -179508,9 +178839,8 @@ 'sections' => false, 'tags' => false, ), -- ) + ) - ); // Save on a bit of bandwidth. -+ ) +); // Save on a bit of bandwidth. - if ( is_wp_error( $api ) ) { @@ -179838,7 +179168,7 @@ break; endswitch; diff --git a/wp-admin/upload.php b/wp-admin/upload.php -index 3c48cc9476..b7b1a24b14 100644 +index 3c48cc9476..a738bd759a 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -9,209 +9,209 @@ @@ -180008,16 +179338,15 @@ -$messages[2] = __( 'Media file permanently deleted.' ); -$messages[3] = __( 'Error saving media file.' ); -$messages[4] = __( 'Media file moved to the Trash.' ) . sprintf( -- ' %2$s', -- esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ), -- __( 'Undo' ) +$messages[1] = __('Media file updated.'); +$messages[2] = __('Media file permanently deleted.'); +$messages[3] = __('Error saving media file.'); +$messages[4] = __('Media file moved to the Trash.') . sprintf( -+ ' %2$s', -+ esc_url(wp_nonce_url('upload.php?doaction=undo&action=untrash&ids=' . ( isset($_GET['ids']) ? $_GET['ids'] : '' ), 'bulk-media')), -+ __('Undo') + ' %2$s', +- esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ), +- __( 'Undo' ) ++ esc_url(wp_nonce_url('upload.php?doaction=undo&action=untrash&ids=' . ( isset($_GET['ids']) ? $_GET['ids'] : '' ), 'bulk-media')), ++ __('Undo') ); -$messages[5] = __( 'Media file restored from the Trash.' ); +$messages[5] = __('Media file restored from the Trash.'); @@ -180060,7 +179389,7 @@ +add_filter( + 'removable_query_args', + function () { -+ return array( 'error' ); ++ return array( 'error' ); + }, + 10, + 0 @@ -180086,72 +179415,61 @@ - '_wpMediaGridSettings', - array( - 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ), -- 'queryVars' => (object) $vars, -- ) ++wp_localize_script( ++ 'media-grid', ++ '_wpMediaGridSettings', ++ array( ++ 'adminUrl' => parse_url(self_admin_url(), PHP_URL_PATH), + 'queryVars' => (object) $vars, + ) - ); -- ++); + - get_current_screen()->add_help_tab( - array( -- 'id' => 'overview', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first.' ) . '

    ' . - '

    ' . __( 'You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.' ) . '

    ' . - '

    ' . __( 'To delete media items, click the Bulk Select button at the top of the screen. Select any items you wish to delete, then click the Delete Selected button. Clicking the Cancel Selection button takes you back to viewing your media.' ) . '

    ', -- ) ++ '

    ' . __('All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first.') . '

    ' . ++ '

    ' . __('You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.') . '

    ' . ++ '

    ' . __('To delete media items, click the Bulk Select button at the top of the screen. Select any items you wish to delete, then click the Delete Selected button. Clicking the Cancel Selection button takes you back to viewing your media.') . '

    ', + ) - ); -- ++); + - get_current_screen()->add_help_tab( - array( -- 'id' => 'attachment-details', ++get_current_screen()->add_help_tab( ++ array( + 'id' => 'attachment-details', - 'title' => __( 'Attachment Details' ), -- 'content' => ++ 'title' => __('Attachment Details'), + 'content' => - '

    ' . __( 'Clicking an item will display an Attachment Details dialog, which allows you to preview media and make quick edits. Any changes you make to the attachment details will be automatically saved.' ) . '

    ' . - '

    ' . __( 'Use the arrow buttons at the top of the dialog, or the left and right arrow keys on your keyboard, to navigate between media items quickly.' ) . '

    ' . - '

    ' . __( 'You can also delete individual items and access the extended edit screen from the details dialog.' ) . '

    ', -- ) ++ '

    ' . __('Clicking an item will display an Attachment Details dialog, which allows you to preview media and make quick edits. Any changes you make to the attachment details will be automatically saved.') . '

    ' . ++ '

    ' . __('Use the arrow buttons at the top of the dialog, or the left and right arrow keys on your keyboard, to navigate between media items quickly.') . '

    ' . ++ '

    ' . __('You can also delete individual items and access the extended edit screen from the details dialog.') . '

    ', + ) - ); -- ++); + - get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Media Library' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' - ); -+wp_localize_script( -+ 'media-grid', -+ '_wpMediaGridSettings', -+ array( -+ 'adminUrl' => parse_url(self_admin_url(), PHP_URL_PATH), -+ 'queryVars' => (object) $vars, -+ ) -+); -+ -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => -+ '

    ' . __('All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first.') . '

    ' . -+ '

    ' . __('You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.') . '

    ' . -+ '

    ' . __('To delete media items, click the Bulk Select button at the top of the screen. Select any items you wish to delete, then click the Delete Selected button. Clicking the Cancel Selection button takes you back to viewing your media.') . '

    ', -+ ) -+); -+ -+get_current_screen()->add_help_tab( -+ array( -+ 'id' => 'attachment-details', -+ 'title' => __('Attachment Details'), -+ 'content' => -+ '

    ' . __('Clicking an item will display an Attachment Details dialog, which allows you to preview media and make quick edits. Any changes you make to the attachment details will be automatically saved.') . '

    ' . -+ '

    ' . __('Use the arrow buttons at the top of the dialog, or the left and right arrow keys on your keyboard, to navigate between media items quickly.') . '

    ' . -+ '

    ' . __('You can also delete individual items and access the extended edit screen from the details dialog.') . '

    ', -+ ) -+); -+ +get_current_screen()->set_help_sidebar( + '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Media Library') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('Documentation on Media Library') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' +); // Used in the HTML title tag. @@ -180180,10 +179498,12 @@ 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, @@ -180208,14 +179528,13 @@ + $js_required_message, + array( 'additional_classes' => array( 'error', 'hide-if-js' ), -- ) + ) - ); -+ ) +); ?> count( $post_ids ), - 'ids' => implode( ',', $post_ids ), ++$location = add_query_arg( ++ array( + 'trashed' => count($post_ids), + 'ids' => implode(',', $post_ids), ), - $location +- $location - ); ++ $location +); break; case 'untrash': @@ -180372,33 +179693,26 @@ +add_screen_option('per_page'); get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => ++ 'title' => __('Overview'), + 'content' => - '

    ' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the Screen Options tab to customize the display of this screen.' ) . '

    ' . - '

    ' . __( 'You can narrow the list by file type/status or by date using the dropdown menus above the media table.' ) . '

    ' . - '

    ' . __( 'You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.' ) . '

    ', -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => + '

    ' . __('All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the Screen Options tab to customize the display of this screen.') . '

    ' . + '

    ' . __('You can narrow the list by file type/status or by date using the dropdown menus above the media table.') . '

    ' . + '

    ' . __('You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.') . '

    ', -+ ) + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'actions-links', + array( + 'id' => 'actions-links', - 'title' => __( 'Available Actions' ), -- 'content' => ++ 'title' => __('Available Actions'), + 'content' => - '

    ' . __( 'Hovering over a row reveals action links that allow you to manage media items. You can perform the following actions:' ) . '

    ' . -+ array( -+ 'id' => 'actions-links', -+ 'title' => __('Available Actions'), -+ 'content' => + '

    ' . __('Hovering over a row reveals action links that allow you to manage media items. You can perform the following actions:') . '

    ' . '
      ' . - '
    • ' . __( 'Edit takes you to a simple screen to edit that individual file’s metadata. You can also reach that screen by clicking on the media file name or thumbnail.' ) . '
    • ' . @@ -180412,47 +179726,40 @@ + '
    • ' . __('Copy URL copies the URL for the media file to your clipboard.') . '
    • ' . + '
    • ' . __('Download file downloads the original media file to your device.') . '
    • ' . '
    ', -- ) -+ ) + ) ); get_current_screen()->add_help_tab( -- array( -- 'id' => 'attaching-files', + array( + 'id' => 'attaching-files', - 'title' => __( 'Attaching Files' ), -- 'content' => ++ 'title' => __('Attaching Files'), + 'content' => - '

    ' . __( 'If a media file has not been attached to any content, you will see that in the Uploaded To column, and can click on Attach to launch a small popup that will allow you to search for existing content and attach the file.' ) . '

    ', -- ) -+ array( -+ 'id' => 'attaching-files', -+ 'title' => __('Attaching Files'), -+ 'content' => + '

    ' . __('If a media file has not been attached to any content, you will see that in the Uploaded To column, and can click on Attach to launch a small popup that will allow you to search for existing content and attach the file.') . '

    ', -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Media Library' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Media Library') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Media Library') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); get_current_screen()->set_screen_reader_content( -- array( + array( - 'heading_views' => __( 'Filter media items list' ), - 'heading_pagination' => __( 'Media items list navigation' ), - 'heading_list' => __( 'Media items list' ), -- ) -+ array( -+ 'heading_views' => __('Filter media items list'), -+ 'heading_pagination' => __('Media items list navigation'), -+ 'heading_list' => __('Media items list'), -+ ) ++ 'heading_views' => __('Filter media items list'), ++ 'heading_pagination' => __('Media items list navigation'), ++ 'heading_list' => __('Media items list'), + ) ); - require_once ABSPATH . 'wp-admin/admin-header.php'; +@@ -413,22 +413,22 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ?>
    @@ -180491,25 +179798,21 @@ - wp_admin_notice( - $message, - array( -- 'id' => 'message', -- 'additional_classes' => array( 'updated' ), -- 'dismissible' => true, -- ) -- ); +if ( ! empty($message) ) { +wp_admin_notice( + $message, + array( -+ 'id' => 'message', -+ 'additional_classes' => array( 'updated' ), -+ 'dismissible' => true, -+ ) + 'id' => 'message', + 'additional_classes' => array( 'updated' ), + 'dismissible' => true, + ) +- ); +); } ?> diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php -index bbb321a272..41d86101cb 100644 +index bbb321a272..54f4ef5d62 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -12,75 +12,75 @@ require_once __DIR__ . '/admin.php'; @@ -180589,25 +179892,21 @@ + '

    ' . __('Remember to click the Update Profile button when you are finished.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $profile_help, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $profile_help, -+ ) ++ 'title' => __('Overview'), + 'content' => $profile_help, + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on User Profiles' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on User Profiles') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on User Profiles') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); -$wp_http_referer = remove_query_arg( array( 'update', 'delete_count', 'user_id' ), $wp_http_referer ); @@ -180762,11 +180061,13 @@ - if ( ! IS_PROFILE_PAGE && is_super_admin( $profile_user->ID ) && current_user_can( 'manage_network_options' ) ) : - $message = '' . __( 'Important:' ) . ' ' . __( 'This user has super admin privileges.' ); - wp_admin_notice( +- $message, +- array( + if ( ! IS_PROFILE_PAGE && is_super_admin($profile_user->ID) && current_user_can('manage_network_options') ) : + $message = '' . __('Important:') . ' ' . __('This user has super admin privileges.'); +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'info', ) - ); @@ -180788,9 +180089,11 @@ + $message .= '' . __('← Go to Users') . ''; endif; - wp_admin_notice( +- $message, +- array( +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'id' => 'message', 'dismissible' => true, 'additional_classes' => array( 'updated' ), @@ -180807,9 +180110,11 @@ + $message = __('Error while saving the new email address. Please try again.'); endif; - wp_admin_notice( +- $message, +- array( +wp_admin_notice( - $message, - array( ++ $message, ++ array( 'type' => 'error', ) - ); @@ -180819,10 +180124,11 @@ - if ( isset( $errors ) && is_wp_error( $errors ) ) { - wp_admin_notice( - implode( "

    \n

    ", $errors->get_error_messages() ), +- array( + if ( isset($errors) && is_wp_error($errors) ) { +wp_admin_notice( -+ implode("

    \n

    ", $errors->get_error_messages()), - array( ++ implode("

    \n

    ", $errors->get_error_messages()), ++ array( 'additional_classes' => array( 'error' ), ) - ); @@ -180983,7 +180289,7 @@

    @@ -181368,8 +180677,8 @@ - __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ), - esc_html( $profile_user->display_name ) - ); -+ __('Send %s a link to reset their password. This will not change their password, nor will it force a change.'), -+ esc_html($profile_user->display_name) ++ __('Send %s a link to reset their password. This will not change their password, nor will it force a change.'), ++ esc_html($profile_user->display_name) + ); ?>

    @@ -181446,11 +180755,14 @@ the %2$s site in this installation that you have permissions on.', - 'Application passwords grant access to all %2$s sites in this installation that you have permissions on.', - $blogs_count +- 'Application passwords grant access to the %2$s site in this installation that you have permissions on.', +- 'Application passwords grant access to all %2$s sites in this installation that you have permissions on.', +- $blogs_count - ); ++ $message = _n( ++ 'Application passwords grant access to the %2$s site in this installation that you have permissions on.', ++ 'Application passwords grant access to all %2$s sites in this installation that you have permissions on.', ++ $blogs_count + ); - if ( is_super_admin( $user_id ) ) { @@ -181460,20 +180772,22 @@ - 'Application passwords grant access to the %2$s site on the network as you have Super Admin rights.', - 'Application passwords grant access to all %2$s sites on the network as you have Super Admin rights.', - $blogs_count +- ); + 'Application passwords grant access to the %2$s site on the network as you have Super Admin rights.', + 'Application passwords grant access to all %2$s sites on the network as you have Super Admin rights.', + $blogs_count - ); ++ ); } - printf( -+ printf( - $message, +- $message, - admin_url( 'my-sites.php' ), - number_format_i18n( $blogs_count ) - ); -+ admin_url('my-sites.php'), -+ number_format_i18n($blogs_count) ++ printf( ++ $message, ++ admin_url('my-sites.php'), ++ number_format_i18n($blogs_count) + ); ?>

    @@ -181510,16 +180824,13 @@ - wp_admin_notice( - __( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ), - array( -- 'type' => 'error', -- 'additional_classes' => array( 'inline' ), -- ) -- ); + wp_admin_notice( + __('Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.'), + array( -+ 'type' => 'error', -+ 'additional_classes' => array( 'inline' ), -+ ) + 'type' => 'error', + 'additional_classes' => array( 'inline' ), + ) +- ); + ); endif; ?> @@ -181650,7 +180961,7 @@ diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php -index c24033a6ed..59500da254 100644 +index c24033a6ed..16b5e3531a 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -10,52 +10,52 @@ @@ -181666,7 +180977,7 @@ + if ( ! current_user_can('create_users') && ! current_user_can('promote_users') ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to add users to this network.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to add users to this network.') . '

    ', + 403 +); } @@ -181679,7 +180990,7 @@ +} elseif ( ! current_user_can('create_users') ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to create users.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to create users.') . '

    ', + 403 +); } @@ -181728,7 +181039,7 @@ + if ( ! current_user_can('promote_user', $user_details->ID) ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to add users to this network.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to add users to this network.') . '

    ', + 403 +); } @@ -181745,9 +181056,10 @@ } else { - if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) { - $result = add_existing_user_to_blog( +- array( + if ( isset($_POST['noconfirmation']) && current_user_can('manage_network_users') ) { +$result = add_existing_user_to_blog( - array( ++ array( 'user_id' => $user_id, 'role' => $_REQUEST['role'], ) @@ -181758,16 +181070,14 @@ + if ( ! is_wp_error($result) ) { $redirect = add_query_arg( - array( -- 'update' => 'addnoconfirmation', -- 'user_id' => $user_id, -- ), -- 'user-new.php' + array( -+ 'update' => 'addnoconfirmation', -+ 'user_id' => $user_id, -+ ), + 'update' => 'addnoconfirmation', + 'user_id' => $user_id, + ), +- 'user-new.php' +- ); + 'user-new.php' - ); ++ ); } else { - $redirect = add_query_arg( array( 'update' => 'could_not_add' ), 'user-new.php' ); + $redirect = add_query_arg(array( 'update' => 'could_not_add' ), 'user-new.php'); @@ -181775,10 +181085,12 @@ } else { - $newuser_key = wp_generate_password( 20, false ); - add_option( +- 'new_user_' . $newuser_key, +- array( + $newuser_key = wp_generate_password(20, false); +add_option( - 'new_user_' . $newuser_key, - array( ++ 'new_user_' . $newuser_key, ++ array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST['role'], @@ -181788,7 +181100,7 @@ $roles = get_editable_roles(); $role = $roles[ $_REQUEST['role'] ]; -@@ -108,18 +108,18 @@ if ( isset( $_REQUEST['action'] ) && 'adduser' === $_REQUEST['action'] ) { +@@ -108,40 +108,40 @@ if ( isset( $_REQUEST['action'] ) && 'adduser' === $_REQUEST['action'] ) { * @param array $role Array containing role information for the invited user. * @param string $newuser_key The key of the invitation. */ @@ -181809,11 +181121,12 @@ /* translators: 1: Site title, 2: Site URL, 3: User role, 4: Activation URL. */ - $message = __( +- 'Hi, +$message = __( - 'Hi, ++ 'Hi, You\'ve been invited to join \'%1$s\' at -@@ -127,21 +127,21 @@ You\'ve been invited to join \'%1$s\' at + %2$s with the role of %3$s. Please click the following link to confirm the invite: %4$s' @@ -181825,26 +181138,29 @@ +$new_user_email['subject'] = sprintf( /* translators: Joining confirmation notification email subject. %s: Site title. */ - __( '[%s] Joining Confirmation' ), -+ __('[%s] Joining Confirmation'), - $site_title +- $site_title - ); - $new_user_email['message'] = sprintf( -+); -+$new_user_email['message'] = sprintf( - $message, +- $message, - get_option( 'blogname' ), -+ get_option('blogname'), - home_url(), +- home_url(), - wp_specialchars_decode( translate_user_role( $role['name'] ) ), - home_url( "/newbloguser/$newuser_key/" ) - ); -+ wp_specialchars_decode(translate_user_role($role['name'])), -+ home_url("/newbloguser/$newuser_key/") ++ __('[%s] Joining Confirmation'), ++ $site_title ++); ++$new_user_email['message'] = sprintf( ++ $message, ++ get_option('blogname'), ++ home_url(), ++ wp_specialchars_decode(translate_user_role($role['name'])), ++ home_url("/newbloguser/$newuser_key/") +); $new_user_email['headers'] = ''; /** -@@ -162,148 +162,148 @@ Please click the following link to confirm the invite: +@@ -162,121 +162,121 @@ Please click the following link to confirm the invite: * @param string $newuser_key The key of the invitation. * */ @@ -181852,12 +181168,16 @@ + $new_user_email = apply_filters('invited_user_email', $new_user_email, $user_id, $role, $newuser_key); - wp_mail( -+wp_mail( - $new_user_email['to'], - $new_user_email['subject'], - $new_user_email['message'], - $new_user_email['headers'] +- $new_user_email['to'], +- $new_user_email['subject'], +- $new_user_email['message'], +- $new_user_email['headers'] - ); ++wp_mail( ++ $new_user_email['to'], ++ $new_user_email['subject'], ++ $new_user_email['message'], ++ $new_user_email['headers'] +); if ( $switched_locale ) { @@ -181886,7 +181206,7 @@ + if ( ! current_user_can('create_users') ) { +wp_die( + '

    ' . __('You need a higher level of permission.') . '

    ' . -+ '

    ' . __('Sorry, you are not allowed to create users.') . '

    ', ++ '

    ' . __('Sorry, you are not allowed to create users.') . '

    ', + 403 +); } @@ -181930,10 +181250,13 @@ + add_filter('wpmu_welcome_user_notification', '__return_false'); // Disable welcome email. } - wpmu_signup_user( +- $new_user_login, +- $new_user_email, +- array( +wpmu_signup_user( - $new_user_login, - $new_user_email, - array( ++ $new_user_login, ++ $new_user_email, ++ array( 'add_to_blog' => get_current_blog_id(), 'new_role' => $_REQUEST['role'], ) @@ -181956,16 +181279,13 @@ } else { - $redirect = add_query_arg( - array( -- 'update' => 'addnoconfirmation', -- 'user_id' => $new_user['user_id'], -- ), -- 'user-new.php' -- ); + $redirect = add_query_arg( + array( -+ 'update' => 'addnoconfirmation', -+ 'user_id' => $new_user['user_id'], -+ ), + 'update' => 'addnoconfirmation', + 'user_id' => $new_user['user_id'], + ), +- 'user-new.php' +- ); + 'user-new.php' + ); } @@ -182011,27 +181331,21 @@ +$help .= '

    ' . __('Remember to click the Add New User button at the bottom of this screen when you are finished.') . '

    '; get_current_screen()->add_help_tab( -- array( -- 'id' => 'overview', + array( + 'id' => 'overview', - 'title' => __( 'Overview' ), -- 'content' => $help, -- ) -+ array( -+ 'id' => 'overview', -+ 'title' => __('Overview'), -+ 'content' => $help, -+ ) ++ 'title' => __('Overview'), + 'content' => $help, + ) ); - +@@ -284,26 +284,26 @@ get_current_screen()->add_help_tab( get_current_screen()->add_help_tab( -- array( -- 'id' => 'user-roles', + array( + 'id' => 'user-roles', - 'title' => __( 'User Roles' ), - 'content' => '

    ' . __( 'Here is a basic overview of the different user roles and the permissions associated with each one:' ) . '

    ' . -+ array( -+ 'id' => 'user-roles', -+ 'title' => __('User Roles'), -+ 'content' => '

    ' . __('Here is a basic overview of the different user roles and the permissions associated with each one:') . '

    ' . ++ 'title' => __('User Roles'), ++ 'content' => '

    ' . __('Here is a basic overview of the different user roles and the permissions associated with each one:') . '

    ' . '
      ' . - '
    • ' . __( 'Subscribers can read comments/comment/receive newsletters, etc. but cannot create regular site content.' ) . '
    • ' . - '
    • ' . __( 'Contributors can write and manage their posts but not publish posts or upload media files.' ) . '
    • ' . @@ -182044,17 +181358,16 @@ + '
    • ' . __('Editors can publish posts, manage posts as well as manage other people’s posts, etc.') . '
    • ' . + '
    • ' . __('Administrators have access to all the administration features.') . '
    • ' . '
    ', -- ) -+ ) + ) ); get_current_screen()->set_help_sidebar( - '

    ' . __( 'For more information:' ) . '

    ' . - '

    ' . __( 'Documentation on Adding New Users' ) . '

    ' . - '

    ' . __( 'Support forums' ) . '

    ' -+ '

    ' . __('For more information:') . '

    ' . -+ '

    ' . __('Documentation on Adding New Users') . '

    ' . -+ '

    ' . __('Support forums') . '

    ' ++ '

    ' . __('For more information:') . '

    ' . ++ '

    ' . __('Documentation on Adding New Users') . '

    ' . ++ '

    ' . __('Support forums') . '

    ' ); -wp_enqueue_script( 'wp-ajax-response' ); @@ -182168,16 +181481,13 @@ - wp_admin_notice( - '
      ' . $error_message . '
    ', - array( -- 'additional_classes' => array( 'error' ), -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + '
      ' . $error_message . '
    ', + array( -+ 'additional_classes' => array( 'error' ), -+ 'paragraph_wrap' => false, -+ ) + 'additional_classes' => array( 'error' ), + 'paragraph_wrap' => false, + ) +- ); +); endif; @@ -182193,9 +181503,8 @@ 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, -- ) + ) - ); -+ ) +); } } @@ -182211,16 +181520,13 @@ - wp_admin_notice( - $error_message, - array( -- 'additional_classes' => array( 'error' ), -- 'paragraph_wrap' => false, -- ) -- ); +wp_admin_notice( + $error_message, + array( -+ 'additional_classes' => array( 'error' ), -+ 'paragraph_wrap' => false, -+ ) + 'additional_classes' => array( 'error' ), + 'paragraph_wrap' => false, + ) +- ); +); endif; ?> @@ -182377,7 +181683,7 @@