Browse Source

Update to WordPress 5.5. IMPORTANT: If you select "Auto-resolve conflicts" for this release, it may cause your customizations to wp-config.php to be removed. Changes were made in the upstream wp-config.php in order to support wp_get_environment_type(). Double-check the contents of your wp-config.php file after applying this update. If you have problems with merge conflicts, see https://pantheon.io/docs/git-resolve-merge-conflicts

update-5.5.1 5.5
Pantheon Automation 6 months ago
parent
commit
5a2b7bacc3
917 changed files with 145873 additions and 105175 deletions
  1. +1
    -1
      readme.html
  2. +13
    -7
      wp-activate.php
  3. +164
    -163
      wp-admin/about.php
  4. +3
    -2
      wp-admin/admin-ajax.php
  5. +12
    -9
      wp-admin/admin-header.php
  6. +11
    -4
      wp-admin/admin.php
  7. +6
    -5
      wp-admin/async-upload.php
  8. +32
    -25
      wp-admin/comment.php
  9. +4
    -10
      wp-admin/credits.php
  10. +101
    -70
      wp-admin/css/about-rtl.css
  11. +1
    -1
      wp-admin/css/about-rtl.min.css
  12. +101
    -70
      wp-admin/css/about.css
  13. +1
    -1
      wp-admin/css/about.min.css
  14. +9
    -19
      wp-admin/css/admin-menu-rtl.css
  15. +1
    -1
      wp-admin/css/admin-menu-rtl.min.css
  16. +9
    -19
      wp-admin/css/admin-menu.css
  17. +1
    -1
      wp-admin/css/admin-menu.min.css
  18. +7
    -3
      wp-admin/css/color-picker-rtl.css
  19. +1
    -1
      wp-admin/css/color-picker-rtl.min.css
  20. +7
    -3
      wp-admin/css/color-picker.css
  21. +1
    -1
      wp-admin/css/color-picker.min.css
  22. +186
    -6
      wp-admin/css/colors/_admin.scss
  23. +0
    -10
      wp-admin/css/colors/_mixins.scss
  24. +2
    -0
      wp-admin/css/colors/_variables.scss
  25. +170
    -12
      wp-admin/css/colors/blue/colors-rtl.css
  26. +1
    -1
      wp-admin/css/colors/blue/colors-rtl.min.css
  27. +170
    -12
      wp-admin/css/colors/blue/colors.css
  28. +1
    -1
      wp-admin/css/colors/blue/colors.min.css
  29. +131
    -10
      wp-admin/css/colors/coffee/colors-rtl.css
  30. +1
    -1
      wp-admin/css/colors/coffee/colors-rtl.min.css
  31. +131
    -10
      wp-admin/css/colors/coffee/colors.css
  32. +1
    -1
      wp-admin/css/colors/coffee/colors.min.css
  33. +1
    -0
      wp-admin/css/colors/coffee/colors.scss
  34. +170
    -12
      wp-admin/css/colors/ectoplasm/colors-rtl.css
  35. +1
    -1
      wp-admin/css/colors/ectoplasm/colors-rtl.min.css
  36. +170
    -12
      wp-admin/css/colors/ectoplasm/colors.css
  37. +1
    -1
      wp-admin/css/colors/ectoplasm/colors.min.css
  38. +170
    -12
      wp-admin/css/colors/light/colors-rtl.css
  39. +1
    -1
      wp-admin/css/colors/light/colors-rtl.min.css
  40. +170
    -12
      wp-admin/css/colors/light/colors.css
  41. +1
    -1
      wp-admin/css/colors/light/colors.min.css
  42. +170
    -12
      wp-admin/css/colors/midnight/colors-rtl.css
  43. +1
    -1
      wp-admin/css/colors/midnight/colors-rtl.min.css
  44. +170
    -12
      wp-admin/css/colors/midnight/colors.css
  45. +1
    -1
      wp-admin/css/colors/midnight/colors.min.css
  46. +743
    -0
      wp-admin/css/colors/modern/colors-rtl.css
  47. +2
    -0
      wp-admin/css/colors/modern/colors-rtl.min.css
  48. +743
    -0
      wp-admin/css/colors/modern/colors.css
  49. +2
    -0
      wp-admin/css/colors/modern/colors.min.css
  50. +14
    -0
      wp-admin/css/colors/modern/colors.scss
  51. +131
    -10
      wp-admin/css/colors/ocean/colors-rtl.css
  52. +1
    -1
      wp-admin/css/colors/ocean/colors-rtl.min.css
  53. +131
    -10
      wp-admin/css/colors/ocean/colors.css
  54. +1
    -1
      wp-admin/css/colors/ocean/colors.min.css
  55. +1
    -0
      wp-admin/css/colors/ocean/colors.scss
  56. +170
    -12
      wp-admin/css/colors/sunrise/colors-rtl.css
  57. +1
    -1
      wp-admin/css/colors/sunrise/colors-rtl.min.css
  58. +170
    -12
      wp-admin/css/colors/sunrise/colors.css
  59. +1
    -1
      wp-admin/css/colors/sunrise/colors.min.css
  60. +158
    -121
      wp-admin/css/common-rtl.css
  61. +2
    -2
      wp-admin/css/common-rtl.min.css
  62. +155
    -118
      wp-admin/css/common.css
  63. +2
    -2
      wp-admin/css/common.min.css
  64. +14
    -8
      wp-admin/css/customize-controls-rtl.css
  65. +1
    -1
      wp-admin/css/customize-controls-rtl.min.css
  66. +14
    -8
      wp-admin/css/customize-controls.css
  67. +1
    -1
      wp-admin/css/customize-controls.min.css
  68. +2
    -5
      wp-admin/css/customize-nav-menus-rtl.css
  69. +1
    -1
      wp-admin/css/customize-nav-menus-rtl.min.css
  70. +2
    -5
      wp-admin/css/customize-nav-menus.css
  71. +1
    -1
      wp-admin/css/customize-nav-menus.min.css
  72. +84
    -49
      wp-admin/css/dashboard-rtl.css
  73. +1
    -1
      wp-admin/css/dashboard-rtl.min.css
  74. +84
    -49
      wp-admin/css/dashboard.css
  75. +1
    -1
      wp-admin/css/dashboard.min.css
  76. +4
    -4
      wp-admin/css/deprecated-media-rtl.css
  77. +1
    -1
      wp-admin/css/deprecated-media-rtl.min.css
  78. +1
    -1
      wp-admin/css/deprecated-media.min.css
  79. +61
    -17
      wp-admin/css/edit-rtl.css
  80. +1
    -1
      wp-admin/css/edit-rtl.min.css
  81. +61
    -17
      wp-admin/css/edit.css
  82. +1
    -1
      wp-admin/css/edit.min.css
  83. +13
    -8
      wp-admin/css/forms-rtl.css
  84. +1
    -1
      wp-admin/css/forms-rtl.min.css
  85. +13
    -8
      wp-admin/css/forms.css
  86. +1
    -1
      wp-admin/css/forms.min.css
  87. +0
    -765
      wp-admin/css/ie-rtl.css
  88. +0
    -2
      wp-admin/css/ie-rtl.min.css
  89. +0
    -764
      wp-admin/css/ie.css
  90. +0
    -2
      wp-admin/css/ie.min.css
  91. +8
    -18
      wp-admin/css/install-rtl.css
  92. +1
    -1
      wp-admin/css/install-rtl.min.css
  93. +8
    -18
      wp-admin/css/install.css
  94. +1
    -1
      wp-admin/css/install.min.css
  95. +27
    -35
      wp-admin/css/list-tables-rtl.css
  96. +1
    -1
      wp-admin/css/list-tables-rtl.min.css
  97. +27
    -35
      wp-admin/css/list-tables.css
  98. +1
    -1
      wp-admin/css/list-tables.min.css
  99. +14
    -2
      wp-admin/css/login-rtl.css
  100. +1
    -1
      wp-admin/css/login-rtl.min.css

+ 1
- 1
readme.html View File

@ -57,7 +57,7 @@
<h3>Recommendations</h3>
<ul>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.3</strong> or higher.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.4</strong> or higher.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
<li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
<li><a href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a> support.</li>

+ 13
- 7
wp-activate.php View File

@ -57,7 +57,7 @@ if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->
} elseif ( is_wp_error( $result ) ) {
$error_code = $result->get_error_code();
if ( ! in_array( $error_code, $valid_error_codes ) ) {
if ( ! in_array( $error_code, $valid_error_codes, true ) ) {
status_header( 400 );
}
}
@ -117,6 +117,8 @@ add_action( 'wp_head', 'wpmu_activate_stylesheet' );
add_action( 'wp_head', 'wp_sensitive_page_meta' );
get_header( 'wp-activate' );
$blog_details = get_blog_details();
?>
<div id="signup-content" class="widecolumn">
@ -124,7 +126,7 @@ get_header( 'wp-activate' );
<?php if ( ! $key ) { ?>
<h2><?php _e( 'Activation Key Required' ); ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url( 'wp-activate.php' ); ?>">
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url( $blog_details->path . 'wp-activate.php' ); ?>">
<p>
<label for="key"><?php _e( 'Activation Key:' ); ?></label>
<br /><input type="text" name="key" id="key" value="" size="50" />
@ -136,7 +138,7 @@ get_header( 'wp-activate' );
<?php
} else {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes, true ) ) {
$signup = $result->get_error_data();
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
@ -146,7 +148,7 @@ get_header( 'wp-activate' );
printf(
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. 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 <a href="%4$s">reset your password</a>.' ),
network_site_url( 'wp-login.php', 'login' ),
network_site_url( $blog_details->path . 'wp-login.php', 'login' ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
@ -155,7 +157,7 @@ get_header( 'wp-activate' );
printf(
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. 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 <a href="%4$s">reset your password</a>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
sprintf( '<a href="http://%1$s%2$s">%1$s%2$s</a>', $signup->domain, $blog_details->path ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
@ -195,8 +197,12 @@ get_header( 'wp-activate' );
<?php else : ?>
<p class="view">
<?php
/* translators: 1: Login URL, 2: Network home URL. */
printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
printf(
/* translators: 1: Login URL, 2: Network home URL. */
__( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ),
network_site_url( $blog_details->path . 'wp-login.php', 'login' ),
network_home_url( $blog_details->path )
);
?>
</p>
<?php

+ 164
- 163
wp-admin/about.php View File

@ -19,6 +19,10 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="wrap about__container">
<div class="about__header">
<div class="about__header-text">
<?php _e( 'Speed. Search. Security.' ); ?>
</div>
<div class="about__header-title">
<p>
<?php _e( 'WordPress' ); ?>
@ -26,12 +30,6 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
</p>
</div>
<div class="about__header-text">
<p>
<?php _e( 'Building more with blocks, faster and easier.' ); ?>
</p>
</div>
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
@ -40,74 +38,8 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
</nav>
</div>
<div class="about__section is-feature has-accent-background-color">
<h1><?php _e( 'Say hello to more and better.' ); ?></h1>
<p><?php _e( 'More ways to make your pages come alive. With easier ways to get it all done and looking better than ever&mdash;and boosts in speed you can feel.' ); ?></p>
</div>
<hr />
<div class="about__section changelog">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
_n(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
23
),
'5.4.2',
number_format_i18n( 23 )
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.4.2' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
_n(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
11
),
'5.4.1',
number_format_i18n( 11 )
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.4.1' )
)
);
?>
</p>
</div>
</div>
<hr />
<div class="about__section has-2-columns has-subtle-background-color">
<h2 class="is-section-header">
<div class="about__section is-feature has-subtle-background-color">
<h1>
<?php
printf(
/* translators: %s: The current WordPress version number. */
@ -115,135 +47,203 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
$display_version
);
?>
</h2>
</h1>
<p>
<?php
printf(
/* translators: %s: The current WordPress version number. */
__( 'In WordPress %s, your site gets new power in three major areas: speed, search, and security.' ),
$display_version
);
?>
</p>
</div>
<hr />
<div class="about__section has-1-column">
<div class="column">
<p>
<?php _e( 'Every major release adds more to the block editor.' ); ?>
</p>
<p>
<?php _e( 'More ways to make posts and pages come alive with your best images.' ); ?>
<?php _e( 'More ways to bring your visitors in, and keep them engaged, with the richness of embedded media from the web&#8217;s top services.' ); ?>
</p>
<h2><?php _e( 'Speed' ); ?></h2>
<p><strong><?php _e( 'Posts and pages feel faster, thanks to lazy-loaded images.' ); ?></strong></p>
<p><?php _e( 'Images give your story a lot of impact, but they can sometimes make your site seem slow.' ); ?></p>
<p><?php _e( 'In WordPress 5.5, images wait to load until they’re just about to scroll into view. The technical term is ‘lazy loading.’' ); ?></p>
<p><?php _e( 'On mobile, lazy loading can also keep browsers from loading files meant for other devices. That can save your readers money on data — and help preserve battery life.' ); ?></p>
</div>
</div>
<div class="about__section has-1-column">
<div class="column">
<p>
<?php _e( 'More ways to make your vision real, and put blocks in the perfect place&mdash;even if a particular kind of block is new to you. More efficient processes.' ); ?>
</p>
<p>
<?php _e( 'And more speed everywhere, so as you build sections or galleries, or just type in a line of prose, you can feel how much faster your work flows.' ); ?>
</p>
<h2><?php _ex( 'Search', 'sitemap' ); ?></h2>
<p><strong><?php _e( 'Say hello to your new sitemap.' ); ?></strong></p>
<p><?php _e( 'WordPress sites work well with search engines. ' ); ?></p>
<p><?php _e( 'Now, by default, WordPress 5.5 includes an XML sitemap that helps search engines discover your most important pages from the very minute you go live.' ); ?></p>
<p><?php _e( 'So more people will find your site sooner, giving you more time to engage, retain and convert them to subscribers, customers or whatever fits your definition of success.' ); ?></p>
</div>
</div>
<hr />
<div class="about__section has-2-columns">
<div class="column is-edge-to-edge">
<div class="about__image aligncenter">
<img src="data:image/svg+xml;charset=utf8,%3Csvg width='500' height='500' viewbox='0 0 500 500' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23F3F4F5' d='M0 0h500v500H0z'/%3E%3Cpath d='M346.7 37.645s100.5-2.8 102.6 0c2.1 2.8 0 124.999 0 124.999l-106.9 2.8 4.3-127.8z' fill='%232CA8EB'/%3E%3Cpath d='M343.5 185.844s100.5-1.9 102.6 0c2.1 1.9 1.1 125.9 4.3 127.8 3.2 1.9-100.5 1.9-104.8 2.8-4.3.9-2.1-130.6-2.1-130.6z' fill='%237CAED2'/%3E%3Cpath d='M195.6 186.744s102.7 2.8 106.9 2.8c4.2 0 7.4 120.4 4.2 122.2-3.2 1.9-106.9 2.8-106.9 2.8s2.1-126.9-4.2-127.8z' fill='%2381A4D4'/%3E%3Cpath d='M152.8 192.344s2.1 124.1 4.3 126.9c2.1 2.7-109.1 1.8-109.1 1.8v-128.7h104.8z' fill='%235DC3D8'/%3E%3Cpath d='M152 464.544H56v-119.8l101-1.7s-8.9 118-5 121.5z' fill='%230574E2'/%3E%3Cpath d='M195 35.844h101.6s-8.6 119.4 0 125c8.6 5.6-101.6 3.7-101.6 3.7v-128.7z' fill='%23216BCE'/%3E%3Cpath d='M302.3 463.844s-102.9 2.8-105.1 0c-2.2-2.8 0-125 0-125l109.5-2.8-4.4 127.8z' fill='%231C99D1'/%3E%3Cpath d='M346.2 464.544s-2.1-124.1-4.3-126.9c-2.1-2.8 109.1-1.9 109.1-1.9v128.7H346.2v.1z' fill='%231B44DD'/%3E%3Cpath d='M50.2 35.844s100.5-1.9 102.6 0c2.1 1.9 1.1 125.9 4.3 127.8 3.2 1.9-100.5 1.9-104.8 2.8-4.3.9-2.1-130.6-2.1-130.6z' fill='%231B36BC'/%3E%3C/svg%3E" alt="" />
</div>
<div class="about__section has-2-columns has-accent-background-color is-wider-right">
<div class="column">
<h2><?php _e( 'Security' ); ?></h2>
<p><strong><?php _e( 'Auto-updates for Plugins and Themes' ); ?></strong></p>
<p><?php _e( 'Now you can set plugins and themes to update automatically — or not! — in the WordPress admin. So you always know your site is running the latest code available.' ); ?></p>
<p><?php _e( 'You can also turn auto-updates on or off for each plugin or theme you have installed — all on the same screens you’ve always used.' ); ?></p>
<p><strong><?php _e( 'Update by uploading ZIP files' ); ?></strong></p>
<p><?php _e( 'If updating plugins and themes manually is your thing, now that’s easier too — just upload a ZIP file.' ); ?></p>
</div>
<div class="column is-vertically-aligned-center">
<h2><?php _e( 'Two new blocks. And better blocks overall.' ); ?></h2>
<ul>
<li><?php _e( 'Two brand-new blocks: Social Icons and Buttons make adding interactive features fast and easy.' ); ?></li>
<li><?php _e( 'New ways with color: Gradients in the Buttons and Cover block, toolbar access to color options in Rich Text blocks, and for the first time, color options in the Group and Columns blocks.' ); ?></li>
<li><?php _e( 'Guess a whole lot less! Version 5.4 streamlines the whole process for placing and replacing multimedia in every block. Now it works the same way in almost every block!' ); ?></li>
<li><?php _e( 'And if you&#8217;ve ever thought your image in the Media+Text block should link to something else&mdash;perhaps a picture of a brochure should download that brochure as a document? Well, now it can.' ); ?></li>
</ul>
<div class="column about__image is-vertically-aligned-center">
<figure aria-labelledby="about-security" class="about__image">
<video controls poster="https://s.w.org/images/core/5.5/auto-updates-poster.png">
<source src="https://s.w.org/images/core/5.5/auto-updates.mp4" type="video/mp4" />
<source src="https://s.w.org/images/core/5.5/auto-updates.webm" type="video/webm" />
</video>
<figcaption id="about-security" class="screen-reader-text"><?php _e( 'Video: Installed plugin screen, which shows a new column, Automatic Updates. In this column are buttons that say "Enable auto-updates". When clicked, the auto-updates feature is turned on for that plugin, and the button switches to say "Disable auto-updates".' ); ?></figcaption>
</figure>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<h2><?php _e( 'Cleaner UI, clearer navigation—and easier tabbing!' ); ?></h2>
<ul>
<li><?php _e( 'Clearer block navigation with block breadcrumbs. And easier selection once you get there.' ); ?></li>
<li><?php _e( 'For when you need to navigate with the keyboard, better tabbing and focus. Plus, you can tab over to the sidebar of nearly any block.' ); ?></li>
<li><?php _e( 'Speed! 14% faster loading of the editor, 51% faster time-to-type!' ); ?></li>
<li><?php _e( 'Tips are gone. In their place, a Welcome Guide window you can bring up when you need it&mdash;and only when you need it&mdash;again and again.' ); ?></li>
<li><?php _e( 'Know at a glance whether you&#8217;re in a block&#8217;s Edit or Navigation mode. Or, if you have restricted vision, your screen reader will tell you which mode you&#8217;re in.' ); ?></li>
</ul>
<p><?php _e( 'Of course, if you want to work with the very latest tools and features, install the <a href="https://wordpress.org/plugins/gutenberg/">Gutenberg plugin</a>. You&#8217;ll get to be the first to use new and exciting features in the block editor, before anyone else has seen them!' ); ?></p>
</div>
<div class="column is-edge-to-edge">
<div class="about__image aligncenter">
<img src="data:image/svg+xml;charset=utf8,%3Csvg width='500' height='500' viewbox='0 0 500 500' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23F3F4F5' d='M0 0h500v500H0z'/%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M169.6 171.55l-.3 72.3 330.7-1v-72.6l-330.4 1.3z' fill='%230740B3'/%3E%3Cpath d='M291.2 97.85l-1.3-14.8-63.4-.7v76c0 3.6 176.7 4.1 273.5 4.1v-64.5H291.2v-.1z' fill='%230285D7'/%3E%3Cpath d='M500 27.75l-215.5-5.9 5.4 61.2 210.1 2.5v-57.8z' fill='%231730E5'/%3E%3Cpath d='M500 97.85v-12.3l-210.1-2.5 1.3 14.8H500z' fill='%230285D7'/%3E%3Cpath d='M500 97.85v-12.3l-210.1-2.5 1.3 14.8H500z' fill='%231730E5' style='mix-blend-mode:multiply'/%3E%3Cpath d='M255.2 379.75l-1-49.2-229.2.3-2 69.7 477-1.3v-24.3l-244.8 4.8z' fill='%230285D7'/%3E%3Cpath d='M500 424.35v-15l-430.8 1.2-4 51.5 134.6-.5v-34.4c.1-2.8 214.4-2.9 300.2-2.8z' fill='%230878FF'/%3E%3Cpath d='M500 290.05l-246.4 4.3.6 36.2 245.8-.3v-40.2z' fill='%23072CF0'/%3E%3Cpath d='M500 374.95v-44.7l-245.8.3 1 49.2 244.8-4.8z' fill='%230285D7'/%3E%3Cpath d='M500 374.95v-44.7l-245.8.3 1 49.2 244.8-4.8z' fill='%23072CF0' style='mix-blend-mode:multiply'/%3E%3Cpath d='M199.9 461.55v17.6l300.1-2.4v-16.3l-300.1 1.1z' fill='%230285D7'/%3E%3Cpath d='M500 424.35c-85.8-.1-300.1 0-300.1 2.8v34.4l300.1-1.1v-36.1z' fill='%230878FF'/%3E%3Cpath d='M500 424.35c-85.8-.1-300.1 0-300.1 2.8v34.4l300.1-1.1v-36.1z' fill='%230285D7' style='mix-blend-mode:multiply'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath transform='rotate(-90 23 479.15)' fill='%23fff' d='M23 479.15h457.3v477H23z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E" alt="">
</div>
<hr />
<div class="about__section has-subtle-background-color">
<div class="column">
<h2><?php _e( 'Highlights from the block editor' ); ?></h2>
<p><?php _e( 'Once again, the latest WordPress release packs a long list of exciting new features for the block editor. For example:' ); ?></p>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-edge-to-edge">
<div class="about__image aligncenter">
<img src="data:image/svg+xml;charset=utf8,%3Csvg width='500' height='500' viewbox='0 0 500 500' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23F3F4F5' d='M0 0h500v500H0z'/%3E%3Cpath d='M31.3 284.4c-2-.1 12.2-250.6 12.2-250.6s94.8 4.4 99.7 5.2c.3 21.8 4.1 250.1 4.1 250.1l-116-4.7z' fill='%231730E5'/%3E%3Cpath d='M346.8 467.4l-11.7-305.9 138.2 2.4-3 304.1-123.5-.6z' fill='%230840B3'/%3E%3Cpath d='M287.7 34.9c2.3 0 5.9 398.5 5.9 398.5s-109.6-2.2-115 .6c-5.4 2.8 10.6-400.5 10.6-400.5l98.5 1.4z' fill='%23018BDE'/%3E%3Cpath d='M372.3 138c32.585 0 59-26.415 59-59s-26.415-59-59-59-59 26.415-59 59 26.415 59 59 59z' fill='%23062EF7'/%3E%3Cpath d='M35.8 315c-12.8 0-24.9 2.9-35.8 8.1v148.7c10.8 5.2 22.9 8.1 35.8 8.1 45.6 0 82.5-36.9 82.5-82.5S81.3 315 35.8 315z' fill='%231C87C0'/%3E%3C/svg%3E" alt="" />
</div>
<div class="about__section has-2-columns has-subtle-background-color">
<div class="column about__image is-vertically-aligned-center">
<figure aria-labelledby="about-block-pattern" class="about__image">
<video controls poster="https://s.w.org/images/core/5.5/block-patterns-poster.png">
<source src="https://s.w.org/images/core/5.5/block-patterns.mp4" type="video/mp4" />
<source src="https://s.w.org/images/core/5.5/block-patterns.webm" type="video/webm" />
</video>
<figcaption id="about-block-pattern" class="screen-reader-text"><?php _e( 'Video: In the editor, the block inserter shows two tabs, Blocks and Patterns. The Patterns tab is selected. There are different block layouts in this tab. After scrolling through options including buttons and columns, a pattern called "Large header with a heading" is chosen. This adds a cover block, which is customized with a photo and the name of the WordPress 5.5 jazz musician.' ); ?></figcaption>
</figure>
<hr />
<figure aria-labelledby="about-image-editor" class="about__image">
<video controls poster="https://s.w.org/images/core/5.5/inline-image-editing-poster.png">
<source src="https://s.w.org/images/core/5.5/inline-image-editing.mp4" type="video/mp4" />
<source src="https://s.w.org/images/core/5.5/inline-image-editing-1.webm" type="video/webm" />
</video>
<figcaption id="about-image-editor" class="screen-reader-text"><?php _e( 'Video: An image is added with an image block. In the block toolbar, an icon called "Crop" is selected, which changes the toolbar to show image resizing tools. First, zoom is used to zoom into the center of the image. Next, aspect ratio is clicked. This shows a dropdown of common aspect ratios. Square is chosen, and the image is moved within the new square outline. The crop is completed by clicking "Apply."' ); ?></figcaption>
</figure>
</div>
<div class="column is-vertically-aligned-center">
<h2><?php _e( 'Your fundamental right: privacy' ); ?></h2>
<p><?php _e( '5.4 helps with a variety of privacy issues around the world. So when users and stakeholders ask about regulatory compliance, or how your team handles user data, the answers should be a lot easier to get right.' ); ?></p>
<p><?php _e( 'Take a look:' ); ?></p>
<ul>
<li><?php _e( 'Now personal data exports include users session information and users location data from the community events widget. Plus, a table of contents!' ); ?></li>
<li><?php _e( 'See progress as you process export and erasure requests through the privacy tools.' ); ?></li>
<li><?php _e( 'Plus, little enhancements throughout give the privacy tools a little cleaner look. Your eyes will thank you!' ); ?></li>
</ul>
<div class="column">
<h3><?php _e( 'Block patterns' ); ?></h3>
<p><?php _e( 'New block patterns make it simple and fun to create complex, beautiful layouts, using combinations of text and media that you can mix and match to fit your story.' ); ?></p>
<p><?php _e( 'You will also find block patterns in a wide variety of plugins and themes, with more added all the time. Pick any of them from a single place — just click and go!' ); ?></p>
<h3><?php _e( 'Inline image editing' ); ?></h3>
<p><?php _e( 'Crop, rotate, and zoom your photos right from the image block. If you spend a lot of time on images, this could save you hours!' ); ?></p>
<h3><?php _e( 'The New Block Directory' ); ?></h3>
<p><?php _e( 'Now it’s easier than ever to find the block you need. The new block directory is built right into the block editor, so you can install new block types to your site without ever leaving the editor.' ); ?></p>
<h3><?php _e( 'And so much more.' ); ?></h3>
<p><?php _e( 'The highlights above are a tiny fraction of the new block editor features you’ve just installed. Open the block editor and enjoy!' ); ?></p>
</div>
</div>
<hr />
<div class="about__section ">
<div class="column has-subtle-background-color">
<h2 class="is-section-header"><?php _e( 'Just for developers' ); ?></h2>
<div class="about__section has-1-column">
<div class="column">
<h2><?php _e( 'Accessibility' ); ?></h2>
<p><?php _e( 'Every release adds improvements to the accessible publishing experience, and that remains true for WordPress 5.5. ' ); ?></p>
<p><?php _e( 'Now you can copy links in media screens and modal dialogs with a button, instead of trying to highlight a line of text.' ); ?></p>
<p><?php _e( 'You can also move meta boxes with the keyboard, and edit images in WordPress with your assistive device, as it can read you the instructions in the image editor.' ); ?></p>
</div>
</div>
<hr class="is-small" />
<hr />
<div class="about__section">
<div class="about__image aligncenter">
<img src="data:image/svg+xml;charset=utf8,%3Csvg width='1000' height='500' viewbox='0 0 1000 500' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M761 360.917H428v66.8h333v-66.8z' fill='%230574E2'/%3E%3Cpath d='M921 399.801H592.2v99.7H921v-99.7z' fill='%231C99D1'/%3E%3Cpath d='M288.1 378.963c46.392 0 84-37.496 84-83.749 0-46.253-37.608-83.748-84-83.748s-84 37.495-84 83.748c0 46.253 37.608 83.749 84 83.749z' fill='%230F7DEA'/%3E%3Cpath d='M553.3 191.426H272.5v85.742h280.8v-85.742z' fill='%231730E5'/%3E%3Cpath d='M785 151.545H499.4v77.169H785v-77.169z' fill='%231C99D1'/%3E%3Cpath d='M777.3 284.247c50.258 0 91-40.62 91-90.728 0-50.107-40.742-90.727-91-90.727s-91 40.62-91 90.727c0 50.108 40.742 90.728 91 90.728z' fill='%231826D3'/%3E%3Cpath d='M635 33.898H413v101.695h222V33.898zM1000 303.091H708v76.769h292v-76.769zM366 102.692H0v66.799h366v-66.799z' fill='%230574E2'/%3E%3Cpath d='M275 24.925H96v93.719h179V24.925z' fill='%231C99D1'/%3E%3Cpath d='M861 0H573v66.8h288V0z' fill='%231730E5'/%3E%3Cpath d='M436 440.678c35.346 0 64-28.568 64-63.809 0-35.24-28.654-63.808-64-63.808-35.346 0-64 28.568-64 63.808 0 35.241 28.654 63.809 64 63.809z' fill='%23236FE8'/%3E%3Cpath d='M428 449.651H171.4V500H428v-50.349z' fill='%231C99D1'/%3E%3Cpath d='M318 404.786H77v63.908h241v-63.908z' fill='%231826D3'/%3E%3Cpath d='M818 258.225H600v73.281h218v-73.281zM613 117.647H456v93.719h157v-93.719zM96.1 198.604c18.833 0 34.1-15.221 34.1-33.998 0-18.776-15.267-33.998-34.1-33.998-18.833 0-34.1 15.222-34.1 33.998 0 18.777 15.267 33.998 34.1 33.998z' fill='%231C99D1'/%3E%3C/svg%3E" alt="">
<div class="about__section has-subtle-background-color has-2-columns">
<header class="is-section-header">
<h2><?php _e( 'For developers' ); ?></h2>
<p><?php _e( '5.5 also brings a big box of changes just for developers.' ); ?></p>
</header>
<div class="column">
<h3><?php _e( 'Server-side registered blocks in the REST API' ); ?></h3>
<p><?php _e( 'The addition of block types endpoints means that JavaScript apps (like the block editor) can retrieve definitions for any blocks registered on the server.' ); ?></p>
</div>
<div class="column">
<h3><?php _e( 'Dashicons' ); ?></h3>
<p><?php _e( 'The Dashicons library has received its final update in 5.5. It adds 39 block editor icons along with 26 others.' ); ?></p>
</div>
</div>
<hr class="is-small" />
<div class="about__section has-2-columns">
<div class="about__section has-subtle-background-color has-2-columns">
<div class="column">
<h3><?php _e( 'Add custom fields to menu items—natively' ); ?></h3>
<p>
<?php _e( 'Two new actions let you add custom fields to menu items&mdash;without a plugin and without writing custom walkers.' ); ?>
</p>
<h3><?php _e( 'Defining environments' ); ?></h3>
<p>
<?php
printf(
/* translators: %s: 'wp_nav_menu_item_custom_fields' action name. */
__( 'On the Menus admin screen, %s fires just before the move buttons of a nav menu item in the menu editor.' ),
'<code>wp_nav_menu_item_custom_fields</code>'
/* translators: %s: 'wp_get_environment_type' function name. */
__( 'WordPress now has a standardized way to define a site’s environment type (staging, production, etc). Retrieve that type with %s and execute only the appropriate code.' ),
'<code>wp_get_environment_type()</code>'
);
?>
</p>
</div>
<div class="column">
<h3><?php _e( 'Passing data to template files' ); ?></h3>
<p>
<?php
printf(
/* translators: %s: 'wp_nav_menu_item_custom_fields_customize_template' action name. */
__( 'In the Customizer, %s fires at the end of the menu-items form-fields template.' ),
'<code>wp_nav_menu_item_custom_fields_customize_template</code>'
/* translators: %1$s: 'get_header' function name, %2$s: 'get_template_part' function name, %3$s: '$args' variable name. */
__( 'The template loading functions (%1$s, %2$s, etc.) have a new %3$s argument. So now you can pass an entire array’s worth of data to those templates.' ),
'<code>get_header()</code>',
'<code>get_template_part()</code>',
'<code>$args</code>'
);
?>
</p>
<p>
<?php _e( 'Check your code and see where these new actions can replace your custom code, and if you&#8217;re concerned about duplication, add a check for the WordPress version.' ); ?>
</p>
</div>
</div>
<div class="about__section has-subtle-background-color">
<div class="column">
<h3><?php _e( 'Blocks! Simpler styling, new APIs and embeds' ); ?></h3>
<h3><?php _e( 'More changes for developers' ); ?></h3>
<ul>
<li><?php _e( '<strong>Radically</strong> simpler block styling. Negative margins and default padding are gone! Now you can style blocks the way you need them. And, a refactor got rid of four redundant wrapper divs.' ); ?></li>
<li><?php _e( 'If you build plugins, now you can register collections of your blocks by namespace across categories—a great way to get more brand visibility.' ); ?></li>
<li><?php _e( 'Let users do more with two new APIs: block variations and gradients.' ); ?></li>
<li><?php _e( 'In embeds, now the block editor supports TikTok—and CollegeHumor is gone.' ); ?></li>
<li><?php _e( 'The PHPMailer library just got a major update, going from version 5.2.27 to 6.1.6.' ); ?></li>
<li>
<?php
printf(
/* translators: %s: 'redirect_guess_404_permalink' function name. */
__( 'Now get more fine-grained control of %s.' ),
'<code>redirect_guess_404_permalink()</code>'
);
?>
</li>
<li>
<?php
printf(
/* translators: %s: 'wp_opcache_invalidate' function name. */
__( 'Sites that use PHP’s OPcache will see more reliable cache invalidation, thanks to the new %s function during updates (including to plugins and themes).' ),
'<code>wp_opcache_invalidate()</code>'
);
?>
</li>
<li><?php _e( 'Custom post types associated with the category taxonomy can now opt-in to supporting the default term.' ); ?></li>
<li>
<?php
printf(
/* translators: %s: 'register_taxonomy' function name. */
__( 'Default terms can now be specified for custom taxonomies in %s.' ),
'<code>register_taxonomy()</code>'
);
?>
</li>
<li>
<?php
printf(
/* translators: %s: 'register_meta' function name. */
__( 'The REST API now officially supports specifying default metadata values through %s.' ),
'<code>register_meta()</code>'
);
?>
</li>
<li><?php _e( 'You will find updated versions of these bundled libraries: SimplePie, Twemoji, Masonry, imagesLoaded, getID3, Moment.js, and clipboard.js.' ); ?></li>
</ul>
</div>
</div>
@ -252,12 +252,13 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="about__section">
<div class="column">
<h3><?php _e( 'Check the Field Guide for more!' ); ?></h3>
<p>
<?php
printf(
/* translators: %s: WordPress 5.4 Field Guide link. */
__( 'There&#8217;s lots more for developers to love in WordPress 5.4. To discover more and learn how to make these changes shine on your sites, themes, plugins and more, check the <a href="%s">WordPress 5.4 Field Guide</a>.' ),
'https://make.wordpress.org/core/2020/03/03/wordpress-5-4-field-guide/'
/* translators: %s: WordPress 5.5 Field Guide link. */
__( 'There’s a lot more for developers to love in WordPress 5.5. To discover more and learn how to make these changes shine on your sites, themes, plugins and more, check the <a href="%s">WordPress 5.5 Field Guide.</a>' ),
'https://make.wordpress.org/core/wordpress-5-5-field-guide/'
);
?>
</p>

+ 3
- 2
wp-admin/admin-ajax.php View File

@ -139,6 +139,7 @@ $core_actions_post = array(
'health-check-background-updates',
'health-check-loopback-requests',
'health-check-get-sizes',
'toggle-auto-updates',
);
// Deprecated.
@ -146,11 +147,11 @@ $core_actions_post_deprecated = array( 'wp-fullscreen-save-post', 'press-this-sa
$core_actions_post = array_merge( $core_actions_post, $core_actions_post_deprecated );
// Register core Ajax calls.
if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) ) {
if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get, true ) ) {
add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );
}
if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post ) ) {
if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post, true ) ) {
add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 );
}

+ 12
- 9
wp-admin/admin-header.php View File

@ -32,19 +32,19 @@ if ( empty( $current_screen ) ) {
}
get_admin_page_title();
$title = esc_html( strip_tags( $title ) );
$title = strip_tags( $title );
if ( is_network_admin() ) {
/* translators: Network admin screen title. %s: Network title. */
$admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
$admin_title = sprintf( __( 'Network Admin: %s' ), get_network()->site_name );
} elseif ( is_user_admin() ) {
/* translators: User dashboard screen title. %s: Network title. */
$admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
$admin_title = sprintf( __( 'User Dashboard: %s' ), get_network()->site_name );
} else {
$admin_title = get_bloginfo( 'name' );
}
if ( $admin_title == $title ) {
if ( $admin_title === $title ) {
/* translators: Admin screen title. %s: Admin screen name. */
$admin_title = sprintf( __( '%s &#8212; WordPress' ), $title );
} else {
@ -71,18 +71,17 @@ wp_user_settings();
_wp_admin_html_begin();
?>
<title><?php echo $admin_title; ?></title>
<title><?php echo esc_html( $admin_title ); ?></title>
<?php
wp_enqueue_style( 'colors' );
wp_enqueue_style( 'ie' );
wp_enqueue_script( 'utils' );
wp_enqueue_script( 'svg-painter' );
$admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
?>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(document).ready(func);else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
pagenow = '<?php echo $current_screen->id; ?>',
typenow = '<?php echo $current_screen->post_type; ?>',
@ -91,7 +90,6 @@ var ajaxurl = '',
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
isRtl = <?php echo (int) is_rtl(); ?>;
</script>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<?php
/**
@ -148,7 +146,7 @@ do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConven
*/
do_action( 'admin_head' );
if ( get_user_setting( 'mfold' ) == 'f' ) {
if ( 'f' === get_user_setting( 'mfold' ) ) {
$admin_body_class .= ' folded';
}
@ -200,6 +198,11 @@ if ( $current_screen->is_block_editor() ) {
}
}
// Print a CSS class to make PHP errors visible.
if ( error_get_last() && WP_DEBUG && WP_DEBUG_DISPLAY && ini_get( 'display_errors' ) ) {
$admin_body_class .= ' php-error';
}
?>
</head>
<?php

+ 11
- 4
wp-admin/admin.php View File

@ -36,6 +36,7 @@ require_once dirname( __DIR__ ) . '/wp-load.php';
nocache_headers();
if ( get_option( 'db_upgraded' ) ) {
flush_rewrite_rules();
update_option( 'db_upgraded', false );
@ -45,7 +46,11 @@ if ( get_option( 'db_upgraded' ) ) {
* @since 2.8.0
*/
do_action( 'after_db_upgrade' );
} elseif ( get_option( 'db_version' ) != $wp_db_version && empty( $_POST ) ) {
} elseif ( ! wp_doing_ajax() && empty( $_POST )
&& (int) get_option( 'db_version' ) !== $wp_db_version
) {
if ( ! is_multisite() ) {
wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
exit;
@ -257,7 +262,9 @@ if ( isset( $plugin_page ) ) {
wp_die( __( 'Invalid plugin page.' ) );
}
if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) ) && ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) ) {
if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) )
&& ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) )
) {
/* translators: %s: Admin page generated by a plugin. */
wp_die( sprintf( __( 'Cannot load %s.' ), htmlentities( $plugin_page ) ) );
}
@ -289,7 +296,7 @@ if ( isset( $plugin_page ) ) {
require_once ABSPATH . 'wp-admin/admin-footer.php';
exit();
exit;
} elseif ( isset( $_GET['import'] ) ) {
$importer = $_GET['import'];
@ -350,7 +357,7 @@ if ( isset( $plugin_page ) ) {
// Make sure rules are flushed.
flush_rewrite_rules( false );
exit();
exit;
} else {
/**
* Fires before a particular screen is loaded.

+ 6
- 5
wp-admin/async-upload.php View File

@ -42,12 +42,9 @@ if ( ! current_user_can( 'upload_files' ) ) {
if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) {
$id = intval( $_REQUEST['attachment_id'] );
$post = get_post( $id );
if ( 'attachment' != $post->post_type ) {
if ( 'attachment' !== $post->post_type ) {
wp_die( __( 'Invalid post type.' ) );
}
if ( ! current_user_can( 'edit_post', $id ) ) {
wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
}
switch ( $_REQUEST['fetch'] ) {
case 3:
@ -55,7 +52,11 @@ if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] )
if ( $thumb_url ) {
echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
}
echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
if ( current_user_can( 'edit_post', $id ) ) {
echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
} else {
echo '<span class="edit-attachment">' . _x( 'Success', 'media item' ) . '</span>';
}
// Title shouldn't ever be empty, but use filename just in case.
$file = get_attached_file( $post->ID );

+ 32
- 25
wp-admin/comment.php View File

@ -22,20 +22,30 @@ if ( isset( $_POST['deletecomment'] ) ) {
$action = 'deletecomment';
}
if ( 'cdc' == $action ) {
if ( 'cdc' === $action ) {
$action = 'delete';
} elseif ( 'mac' == $action ) {
} elseif ( 'mac' === $action ) {
$action = 'approve';
}
if ( isset( $_GET['dt'] ) ) {
if ( 'spam' == $_GET['dt'] ) {
if ( 'spam' === $_GET['dt'] ) {
$action = 'spam';
} elseif ( 'trash' == $_GET['dt'] ) {
} elseif ( 'trash' === $_GET['dt'] ) {
$action = 'trash';
}
}
$comment_id = absint( $_GET['c'] );
$comment = get_comment( $comment_id );
// Prevent actions on a comment associated with a trashed post.
if ( 'trash' === get_post_status( $comment->comment_post_ID ) ) {
wp_die(
__( 'You can&#8217;t edit this comment because the associated post is in the Trash. Please restore the post first, then try again.' )
);
}
switch ( $action ) {
case 'editcomment':
@ -60,9 +70,6 @@ switch ( $action ) {
wp_enqueue_script( 'comment' );
require_once ABSPATH . 'wp-admin/admin-header.php';
$comment_id = absint( $_GET['c'] );
$comment = get_comment( $comment_id );
if ( ! $comment ) {
comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'javascript:history.go(-1)' ) );
}
@ -71,7 +78,7 @@ switch ( $action ) {
comment_footer_die( __( 'Sorry, you are not allowed to edit this comment.' ) );
}
if ( 'trash' == $comment->comment_approved ) {
if ( 'trash' === $comment->comment_approved ) {
comment_footer_die( __( 'This comment is in the Trash. Please move it out of the Trash if you want to edit it.' ) );
}
@ -87,9 +94,6 @@ switch ( $action ) {
case 'spam':
$title = __( 'Moderate Comment' );
$comment_id = absint( $_GET['c'] );
$comment = get_comment( $comment_id );
if ( ! $comment ) {
wp_redirect( admin_url( 'edit-comments.php?error=1' ) );
die();
@ -101,7 +105,7 @@ switch ( $action ) {
}
// No need to re-approve/re-trash/re-spam a comment.
if ( str_replace( '1', 'approve', $comment->comment_approved ) == $action ) {
if ( str_replace( '1', 'approve', $comment->comment_approved ) === $action ) {
wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );
die();
}
@ -109,7 +113,7 @@ switch ( $action ) {
require_once ABSPATH . 'wp-admin/admin-header.php';
$formaction = $action . 'comment';
$nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
$nonce_action = ( 'approve' === $action ) ? 'approve-comment_' : 'delete-comment_';
$nonce_action .= $comment_id;
?>
@ -121,7 +125,7 @@ switch ( $action ) {
switch ( $action ) {
case 'spam':
$caution_msg = __( 'You are about to mark the following comment as spam:' );
$button = _x( 'Mark as Spam', 'comment' );
$button = _x( 'Mark as spam', 'comment' );
break;
case 'trash':
$caution_msg = __( 'You are about to move the following comment to the Trash:' );
@ -129,15 +133,15 @@ switch ( $action ) {
break;
case 'delete':
$caution_msg = __( 'You are about to delete the following comment:' );
$button = __( 'Permanently Delete Comment' );
$button = __( 'Permanently delete comment' );
break;
default:
$caution_msg = __( 'You are about to approve the following comment:' );
$button = __( 'Approve Comment' );
$button = __( 'Approve comment' );
break;
}
if ( '0' != $comment->comment_approved ) { // If not unapproved.
if ( '0' !== $comment->comment_approved ) { // If not unapproved.
$message = '';
switch ( $comment->comment_approved ) {
case '1':
@ -175,7 +179,7 @@ switch ( $action ) {
</tr>
<?php } ?>
<tr>
<th scope="row"><?php /* translators: Column name or table row header. */ _e( 'In Response To' ); ?></th>
<th scope="row"><?php /* translators: Column name or table row header. */ _e( 'In response to' ); ?></th>
<td>
<?php
$post_id = $comment->comment_post_ID;
@ -255,7 +259,7 @@ switch ( $action ) {
case 'unapprovecomment':
$comment_id = absint( $_REQUEST['c'] );
if ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) ) {
if ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ), true ) ) {
check_admin_referer( 'approve-comment_' . $comment_id );
} else {
check_admin_referer( 'delete-comment_' . $comment_id );
@ -271,11 +275,11 @@ switch ( $action ) {
comment_footer_die( __( 'Sorry, you are not allowed to edit comments on this post.' ) );
}
if ( '' != wp_get_referer() && ! $noredir && false === strpos( wp_get_referer(), 'comment.php' ) ) {
if ( wp_get_referer() && ! $noredir && false === strpos( wp_get_referer(), 'comment.php' ) ) {
$redir = wp_get_referer();
} elseif ( '' != wp_get_original_referer() && ! $noredir ) {
} elseif ( wp_get_original_referer() && ! $noredir ) {
$redir = wp_get_original_referer();
} elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) ) {
} elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ), true ) ) {
$redir = admin_url( 'edit-comments.php?p=' . absint( $comment->comment_post_ID ) );
} else {
$redir = admin_url( 'edit-comments.php' );
@ -335,7 +339,10 @@ switch ( $action ) {
check_admin_referer( 'update-comment_' . $comment_id );
edit_comment();
$updated = edit_comment();
if ( is_wp_error( $updated ) ) {
wp_die( $updated->get_error_message() );
}
$location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
@ -348,9 +355,9 @@ switch ( $action ) {
* @param int $comment_id The ID of the comment being edited.
*/
$location = apply_filters( 'comment_edit_redirect', $location, $comment_id );
wp_redirect( $location );
exit();
wp_redirect( $location );
exit;
default:
wp_die( __( 'Unknown action.' ) );

+ 4
- 10
wp-admin/credits.php View File

@ -21,6 +21,10 @@ $credits = wp_credits();
<div class="wrap about__container">
<div class="about__header">
<div class="about__header-text">
<?php _e( 'Speed. Search. Security.' ); ?>
</div>
<div class="about__header-title">
<p>
<?php _e( 'WordPress' ); ?>
@ -28,12 +32,6 @@ $credits = wp_credits();
</p>
</div>
<div class="about__header-text">
<p>
<?php _e( 'Building more with blocks, faster and easier.' ); ?>
</p>
</div>
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a>
@ -76,10 +74,6 @@ $credits = wp_credits();
<?php endif; ?>
</div>
<div class="about__image aligncenter">
<img src="data:image/svg+xml;charset=utf8,%3Csvg width='1000' height='300' viewbox='0 0 1000 300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23F3F4F5' d='M0 0h1000v300H0z'/%3E%3Cpath style='mix-blend-mode:multiply' d='M39.6 140.22l931.1 3.36.8 76.5-929.5 6.6-2.4-86.46z' fill='%23216DD2'/%3E%3Cpath style='mix-blend-mode:multiply' d='M963.7 275.14s-.9-59.58-1-64.14c-.1-4.2-932.3 1.74-932.3 1.74L29 268.48v8.4' fill='%237FCDE6'/%3E%3Cpath style='mix-blend-mode:multiply' d='M958 73.32L47.8 70.26l1.2 78.66 907.3 4.26 1.7-79.86z' fill='%23072CF0'/%3E%3Cpath style='mix-blend-mode:multiply' d='M34 91.32l910.4-2.16L939.2 21 33.3 23.82l.7 67.5z' fill='%230188D9'/%3E%3C/svg%3E" alt="" />
</div>
</div>
<?php

+ 101
- 70
wp-admin/css/about-rtl.css View File

@ -21,19 +21,20 @@
.about__container {
/* Section backgrounds */
--background: #f3f4f5;
--subtle-background: #bde7f0;
--background: #fff;
--subtle-background: #f2edd4;
/* Main text color */
--text: #32373c;
--text-light: #f3f4f5;
--text: #322d2b;
--text-light: #f2edd4;
/* Accent colors: used in header, on special classes. */
--accent-1: #ebcd3d; /* Accent background */
--accent-2: #bd7331;
--accent-3: #b04329;
/* Navigation colors. */
--nav-background: #216bce;
--nav-border: #1730e5;
--nav-color: #f3f4f5;
/* Reds, used as accents & in header. */
--accent-1: #1730e5;
--accent-2: #216bce;
--accent-3: #bde7f0;
--nav-background: var(--subtle-background);
--nav-border: var(--accent-1);
--nav-color: var(--accent-3);
--nav-current: var(--accent-3);
}
/*------------------------------------------------------------------------------
@ -98,21 +99,30 @@
}
.about__section {
background: #f3f4f5;
background: #fff;
background: var(--background);
clear: both;
}
.about__container .has-accent-background-color {
color: #f3f4f5;
color: var(--text-light);
background-color: #1730e5;
background-color: #ebcd3d;
background-color: var(--accent-1);
}
.about__container .has-transparent-background-color {
background-color: transparent;
}
.about__container .has-accent-color {
color: #b04329;
color: var(--accent-3);
}
.about__container .has-subtle-background-color {
background-color: #bde7f0;
background-color: #f2edd4;
background-color: var(--subtle-background);
color: #322d2b;
color: var(--text);
}
/* 1.1 - Layout */
@ -125,6 +135,10 @@
padding: 32px;
}
.about__section + .about__section .column {
padding-top: 0;
}
.about__section .column.is-edge-to-edge {
padding: 0;
}
@ -137,11 +151,20 @@
margin-bottom: 0;
}
.about__section .has-text-columns {
columns: 2;
column-gap: 64px;
}
.about__section .is-section-header {
margin-bottom: 0;
padding: 32px 32px 0;
}
.about__section .is-section-header p:last-child {
margin-bottom: 0;
}
/* Section header is alone in a container. */
.about__section .is-section-header:first-child:last-child {
padding: 0;
@ -159,6 +182,12 @@
margin-top: 1rem;
}
.about__section.has-1-column {
margin-right: auto;
margin-left: auto;
max-width: 36em;
}
.about__section.has-2-columns,
.about__section.has-3-columns,
.about__section.has-4-columns {
@ -266,6 +295,8 @@
}
@media screen and (max-width: 782px) {
.about__section.has-2-columns.is-wider-right,
.about__section.has-2-columns.is-wider-left,
.about__section.has-3-columns,
.about__section.has-4-columns {
display: block;
@ -290,7 +321,6 @@
.about__section.has-2-columns .column:nth-of-type(n) {
padding-top: 16px;
padding-bottom: 16px;
width: 100%;
}
.about__section.has-2-columns .is-edge-to-edge {
@ -330,14 +360,16 @@
}
.about__section a {
color: #1730e5;
color: var(--accent-1);
color: #b04329;
color: var(--accent-3);
text-decoration: underline;
}
.about__section a:hover,
.about__section a:active,
.about__section a:focus {
color: #bd7331;
color: var(--accent-2);
text-decoration: none;
}
@ -358,16 +390,12 @@
.about__container img {
margin: 0;
max-width: 100%;
vertical-align: middle;
}
.about__container .about__image {
display: -ms-grid;
display: grid;
align-items: center;
justify-content: center;
height: 100%;
overflow: hidden;
margin: 0;
}
.about__container .about__image img {
@ -376,6 +404,15 @@
height: auto;
}
.about__container .about__image .wp-video {
margin-right: auto;
margin-left: auto;
}
.about__container .about__image + h3 {
margin-top: 1.5em;
}
.about__container hr {
margin: 0;
height: 32px;
@ -412,32 +449,23 @@
/* 1.3 - Header */
.about__header {
padding-top: 8em;
margin-bottom: 32px;
background-color: #f3f4f5;
background-color: var(--background);
background-repeat: no-repeat;
background-position: top left;
background-size: contain;
background-image: url('https://s.w.org/images/core/5.4/header-diagonal.svg');
}
.rtl .about__header {
background-image: url('https://s.w.org/images/core/5.4/header-diagonal-rtl.svg');
}
.about__header > div {
display: flex;
}
.about__header > div > * {
align-self: flex-end;
background-color: #ebcd3d;
background-color: var(--accent-1);
color: #322d2b;
color: var(--text);
}
.about__header-title {
min-height: 24em;
max-height: 32em;
height: 80vh;
padding: 0 32px;
display: flex;
align-items: center;
justify-content: center;
height: 20vh;
max-height: 16em;
padding: 32px;
margin-bottom: 4em;
text-align: center;
}
.about__header-title p {
@ -446,20 +474,23 @@
font-size: 4em;
line-height: 1;
font-weight: 500;
color: #1730e5;
color: var(--accent-1);
}
.about__header-title p span {
display: inline-block;
color: #216bce;
color: var(--accent-2);
display: block;
font-size: 2em;
}
.about__header-text {
padding: 16px 32px 32px;
display: inline-block;
margin-right: -16px;
padding: 16px 48px;
font-size: 1.5em;
line-height: 1.4;
background: #b04329;
background: var(--accent-3);
color: #f2edd4;
color: var(--text-light);
}
.about__header-text p {
@ -467,12 +498,13 @@
}
.about__header-navigation {
clear: both;
padding-top: 0;
background: #216bce;
background: #f2edd4;
background: var(--nav-background);
color: #f3f4f5;
color: #b04329;
color: var(--nav-color);
border-bottom: 3px solid #1730e5;
border-bottom: 3px solid #ebcd3d;
border-bottom: 3px solid var(--nav-border);
}
@ -490,23 +522,27 @@
.about__header-navigation .nav-tab:hover,
.about__header-navigation .nav-tab:active {
background-color: #1730e5;
background-color: var(--accent-1);
background-color: #322d2b;
background-color: var(--text);
color: #f2edd4;
color: var(--text-light);
}
.about__header-navigation .nav-tab-active {
margin-bottom: -3px;
border-width: 0 0 6px;
border-color: #bde7f0;
border-color: var(--accent-3);
border-color: #b04329;
border-color: var(--nav-current);
}
.about__header-navigation .nav-tab-active:hover,
.about__header-navigation .nav-tab-active:active {
background-color: #1730e5;
background-color: var(--accent-1);
border-color: #bde7f0;
border-color: var(--accent-3);
background-color: #322d2b;
background-color: var(--text);
color: #f2edd4;
color: var(--text-light);
border-color: #b04329;
border-color: var(--nav-current);
}
@media screen and (max-width: 782px) {
@ -518,11 +554,6 @@
min-height: 0;
max-height: none;
height: auto;
/*
* 60% is a "magic" number to create a top offset approx-equal to the height of the background image,
* which scales to match the container width.
*/
padding-top: 60%;
}
.about__header-navigation .nav-tab {
@ -596,7 +627,7 @@
font-size: 1.4em;
font-weight: 600;
text-decoration: none;
color: #32373c;
color: #322d2b;
color: var(--text);
}

+ 1
- 1
wp-admin/css/about-rtl.min.css
File diff suppressed because it is too large
View File


+ 101
- 70
wp-admin/css/about.css View File

@ -20,19 +20,20 @@
.about__container {
/* Section backgrounds */
--background: #f3f4f5;
--subtle-background: #bde7f0;
--background: #fff;
--subtle-background: #f2edd4;
/* Main text color */
--text: #32373c;
--text-light: #f3f4f5;
--text: #322d2b;
--text-light: #f2edd4;
/* Accent colors: used in header, on special classes. */
--accent-1: #ebcd3d; /* Accent background */
--accent-2: #bd7331;
--accent-3: #b04329;
/* Navigation colors. */
--nav-background: #216bce;
--nav-border: #1730e5;
--nav-color: #f3f4f5;
/* Reds, used as accents & in header. */
--accent-1: #1730e5;
--accent-2: #216bce;
--accent-3: #bde7f0;
--nav-background: var(--subtle-background);
--nav-border: var(--accent-1);
--nav-color: var(--accent-3);
--nav-current: var(--accent-3);
}
/*------------------------------------------------------------------------------
@ -97,21 +98,30 @@
}
.about__section {
background: #f3f4f5;
background: #fff;
background: var(--background);
clear: both;
}
.about__container .has-accent-background-color {
color: #f3f4f5;
color: var(--text-light);
background-color: #1730e5;
background-color: #ebcd3d;
background-color: var(--accent-1);
}
.about__container .has-transparent-background-color {
background-color: transparent;
}
.about__container .has-accent-color {
color: #b04329;
color: var(--accent-3);
}
.about__container .has-subtle-background-color {
background-color: #bde7f0;
background-color: #f2edd4;
background-color: var(--subtle-background);
color: #322d2b;
color: var(--text);
}
/* 1.1 - Layout */
@ -124,6 +134,10 @@
padding: 32px;
}
.about__section + .about__section .column {
padding-top: 0;
}
.about__section .column.is-edge-to-edge {
padding: 0;
}
@ -136,11 +150,20 @@
margin-bottom: 0;
}
.about__section .has-text-columns {
columns: 2;
column-gap: 64px;
}
.about__section .is-section-header {
margin-bottom: 0;
padding: 32px 32px 0;
}
.about__section .is-section-header p:last-child {
margin-bottom: 0;
}
/* Section header is alone in a container. */
.about__section .is-section-header:first-child:last-child {
padding: 0;
@ -158,6 +181,12 @@
margin-top: 1rem;
}
.about__section.has-1-column {
margin-left: auto;
margin-right: auto;
max-width: 36em;
}
.about__section.has-2-columns,
.about__section.has-3-columns,
.about__section.has-4-columns {
@ -265,6 +294,8 @@
}
@media screen and (max-width: 782px) {
.about__section.has-2-columns.is-wider-right,
.about__section.has-2-columns.is-wider-left,
.about__section.has-3-columns,
.about__section.has-4-columns {
display: block;
@ -289,7 +320,6 @@
.about__section.has-2-columns .column:nth-of-type(n) {
padding-top: 16px;
padding-bottom: 16px;
width: 100%;
}
.about__section.has-2-columns .is-edge-to-edge {
@ -329,14 +359,16 @@
}
.about__section a {
color: #1730e5;
color: var(--accent-1);
color: #b04329;
color: var(--accent-3);
text-decoration: underline;
}
.about__section a:hover,
.about__section a:active,
.about__section a:focus {
color: #bd7331;