Commit Graph

6342 Commits

Author SHA1 Message Date
Gary Pendergast d36eda33f7 Coding Standards: Fix instances of `WordPress.PHP.NoSilencedErrors.Discouraged`.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.


git-svn-id: https://develop.svn.wordpress.org/trunk@45611 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 05:44:42 +00:00
Gary Pendergast dd8fa6dc05 Theme Editor: Hide the recommendation to create a child theme when editing a child theme.
Props mukesh27, davidbaumwald.
Fixes #44889.


git-svn-id: https://develop.svn.wordpress.org/trunk@45608 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-08 03:14:37 +00:00
Gary Pendergast 18ec05e23a Coding Standards: Fix all `WordPress.DB.PreparedSQLPlaceholders` issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45603 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:42:57 +00:00
Gary Pendergast 6acb0c6402 Coding Standards: Fix all `WordPress.WhiteSpace.PrecisionAlignment` issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45602 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:20:52 +00:00
Gary Pendergast 6b61c34ded Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45599 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 01:44:41 +00:00
Sergey Biryukov e083a928fc Text Changes: Use consistent question wording for plugin and theme deletion confirmations.
Props johnjamesjacoby, Presskopp.
Fixes #44878.

git-svn-id: https://develop.svn.wordpress.org/trunk@45597 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 09:55:13 +00:00
Gary Pendergast 9a1549767e Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in `wp-admin`.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 12:50:14 +00:00
Gary Pendergast ef5a9dfda6 Coding Standards: Fix/ignore the `WordPress.NamingConventions.ValidFunctionName` violations.
See #47632



git-svn-id: https://develop.svn.wordpress.org/trunk@45580 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 08:00:12 +00:00
Gary Pendergast d2c4198623 Multisite: Use `size_format()` in `display_space_usage()`.
Deleted code is the best code.

Fixes #28239.



git-svn-id: https://develop.svn.wordpress.org/trunk@45579 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 03:46:30 +00:00
Andrew Ozz ec44c57afa Editor: Fix undefined `$locked` var in edit-form-blocks.php when the `show_post_locked_dialog` filter is used to disable displaying of the dialog.
Props aprea.
Fixes #47604.

git-svn-id: https://develop.svn.wordpress.org/trunk@45564 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-25 15:02:34 +00:00
Andrea Fercia 725c77a13d Plugins: Fix the plugin details modal layout after [45520].
Props mukesh27, marybaum, audrasjb.
Fixes #47561.


git-svn-id: https://develop.svn.wordpress.org/trunk@45563 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-25 14:10:29 +00:00
Sergey Biryukov e9fc71bbbe Date/Time: Eliminate use of `date_default_timezone_set()` for determining DST status on General Options screen.
Time calculations should not need to rely on manipulating global PHP configuration state.

Props Rarst.
Fixes #46483.

git-svn-id: https://develop.svn.wordpress.org/trunk@45556 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 14:10:44 +00:00
Jonathan Desrosiers 52f5768db6 Help/About: Improve wording of PHP Error Protection section.
Props pedromendonca, garrett-eclipse.
See #47475.
Fixes #47538.

git-svn-id: https://develop.svn.wordpress.org/trunk@45551 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 09:51:31 +00:00
Sergey Biryukov 1f1cf751e5 Plugins: When validating plugin's WordPress and PHP requirements, check for `Requires at least` and `Requires PHP` headers in the plugin's main PHP file.
This allows for blocking plugin activation if it requires a higher version of PHP or WordPress, and does not have a `readme.txt` file.

If the headers are defined in both `readme.txt` and the main plugin file, precedence is given to the plugin file.

Props afragen, Otto42, Ipstenu.
Fixes #46938.

git-svn-id: https://develop.svn.wordpress.org/trunk@45546 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-18 03:23:53 +00:00
Andrew Ozz 5e26728387 Media: Ignore errors coming from `image_resize_dimensions()` when creating sub-sizes (for now). It returns `false` when the requested size is larger than the original image and should be skipped. This triggers new `WP_Error` in `WP_Image_Editor::resize()`.
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45543 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-16 01:32:16 +00:00
Sergey Biryukov 69fabdbd4d I18N: Merge duplicate strings in notifications displayed when a new user has been created or added to the site.
Props ramiy.
Fixes #35746.

git-svn-id: https://develop.svn.wordpress.org/trunk@45542 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-15 18:56:47 +00:00
Andrew Ozz 815e3ffbe6 After [45538]: fix another WPCS "strict comparison" fix.
Props birgire.
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45540 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-15 16:23:28 +00:00
Andrew Ozz cd86b07108 After [45538]: fix a WPCS fix and make couple of var names consistent.
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45539 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-15 01:31:07 +00:00
Andrew Ozz ca84ae5030 Save progress of intermediate image creation after upload. First run.
- Introduces `wp_get_missing_image_subsizes()` and `wp_update_image_subsizes()` to generate image sub-sizes that are missing or were not created after the upload.
- Adds a way to display errors that happened while creating sub-sizes.
- Introduces `wp_create_image_subsizes()` intended for use after an image was uploaded. It saves/updates the image metadata immediately after each sub-size is created. This fixes the (long standing) problem when some of the sub-size image files were created but there was a timeout or an error and the metadata was not saved. Until now such uploads were considered "failed" which usually resulted in the user trying to upload the same image again, creating even more "orphan" image files.

Note that the patch also includes some unrelated WPCS fixes.

Props mikeschroder, azaozz.
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45538 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-15 01:01:48 +00:00
Sergey Biryukov 7283555663 Administration: Adjust code for "Manage widgets or menus" item on "Welcome to WordPress" panel to avoid an extra space after [42343].
Props Presskopp, davidbaumwald.
Fixes #47536.

git-svn-id: https://develop.svn.wordpress.org/trunk@45536 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-14 00:28:54 +00:00
Andrew Ozz e153f957ad Fix displaying of the "An updated version of WordPress is available." notice when running the latest nightly build. Note that it is still displayed when running a local build or from `/src`.
Props afragen, audrasjb, SergeyBiryukov.
Fixes #45202.

git-svn-id: https://develop.svn.wordpress.org/trunk@45532 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 16:42:18 +00:00
Andrew Ozz f16752240c Add a Recovery Mode Exit button to the notice. This fixes it in responsive view.
Props desrosj, karmatosed, chetan200891, afercia, afragen, garrett-eclipse.
Fixes #47070.

git-svn-id: https://develop.svn.wordpress.org/trunk@45529 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 15:59:58 +00:00
Andrea Fercia 6551660d55 Accessibility: Improve focus management in the Media Views.
- keeps focus management only where necessary to avoid focus losses
- removes focus management where a specific user workflow was assumed
- makes the "Attachment Details" navigation buttons really disabled when there are no next or previous attachments
- adds inline comments to clarify all the usages of focus()

Fixes #43169.


git-svn-id: https://develop.svn.wordpress.org/trunk@45524 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-12 21:02:03 +00:00
Andrea Fercia 2b919ee051 Administration: Improve the horizontal centering of the Site Health tabs.
Props dkarfa, davidbaumwald, Clorith, tinkerbelly, afercia.
Fixes #46881.


git-svn-id: https://develop.svn.wordpress.org/trunk@45522 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-12 19:30:49 +00:00
Andrea Fercia 7bd553f13b Administration: Fix the responsive layout after changes to the Screen Options and Help buttons position.
Fixes #45094.


git-svn-id: https://develop.svn.wordpress.org/trunk@45520 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-12 19:20:13 +00:00
Andrew Ozz f3c91893a9 Privacy tools:
- Move the (remaining) privacy tools related functions from `wp-admin/includes/file.php` to `wp-admin/includes/privacy-tools.php`.
- Move the `WP_User_Request` class to a separate file.

See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45519 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-10 23:53:32 +00:00
Sergey Biryukov 1d9ac40038 I18N: Merge duplicate "authenticity could not be verified" strings, fix comma placement on About page.
Props pedromendonca, garrett-eclipse.
Fixes #47475.

git-svn-id: https://develop.svn.wordpress.org/trunk@45515 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-10 14:13:33 +00:00
Peter Wilson 66f7cee321 Site health: Introduce `view_site_health_checks` capability.
Introduces the faux primitive capability `view_site_health_checks` available to single site admins and multisite super-admin to view the site health page within the admin.

The capability is mapped to the `install_plugins` capability without being dependent on the file system being writable. This fixes a bug where the feature couldn't be used by sites unable to write to the file system or managed through version control.

The capability is granted on the `user_has_cap` filter.

Props birgire, Clorith, palmiak, peterwilsoncc, spacedmonkey.
Fixes #46957.



git-svn-id: https://develop.svn.wordpress.org/trunk@45507 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-10 07:41:12 +00:00
John Blackbourn 393960b182 I18N: Allow the length of automatically generated excerpts to be localized.
This introduces three new strings that can be used to control the maximum length of automatically generated excerpts for posts, comments, and draft post previews in the dashboard. Optionally combined with the existing word count type control this allows languages which include many multibyte characters to specify more appropriate maximum excerpt lengths.

Props miyauchi, birgire, johnbillion

Fixes #44541


git-svn-id: https://develop.svn.wordpress.org/trunk@45505 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-08 18:41:08 +00:00
Andrea Fercia c14ea1630f Accessibility: Improve the Screen Options and Help buttons order.
- makes the buttons visual order match the DOM order
- also, restores the focus style on the "hero" primary button after [34948]

Props vrimill, mukesh27 for reporting and testing.
Fixes #45094.


git-svn-id: https://develop.svn.wordpress.org/trunk@45503 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-08 16:30:15 +00:00
Andrea Fercia 7c04864ef5 Administration: Improve the Screen Options and Help buttons focus style after [45501].
Amends [45501].
See #46749.


git-svn-id: https://develop.svn.wordpress.org/trunk@45502 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-08 16:06:19 +00:00
Andrea Fercia dfb4b20cbd Administration: Remove extra border from the Screen Options and Help buttons.
The extra border was visible in the responsive view for smaller screens after [32844].

Props jitendrabanjara1991.
Fixes #46749.


git-svn-id: https://develop.svn.wordpress.org/trunk@45501 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-08 14:49:50 +00:00
Andrew Ozz 0af549fdf5 Privacy tools: remove some left-over code and fix inline comment.
See #43895.



git-svn-id: https://develop.svn.wordpress.org/trunk@45500 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-08 00:29:59 +00:00
Andrea Fercia 226dc75154 Accessibility: Improve accessibility of all the media views form controls.
- changes the media views form controls to have explicitly associated labels with for/id attributes
- adds a few missing labels / aria-labels
- improves a few existing labels / aria-labels
- improves semantics in a few places, by adding visually hidden headings, fieldset + legend elements, aria-describedby attributes
- improves the image custom size input fields and their labelling
- adds `role="status"` to the "saved" indicator so that status messages are announced to assistive technologies
- swaps the columns source order in the image details template, to make visual and DOM order match
- swaps the "Replace" and "Back" buttons source order in the Replace Image view, to make visual and DOM order match
- gallery settings: move checkbox label to the right: checkboxes are supposed to have labels on the right
- merge similar strings, unified to "Drop files to upload" (removed "Drop files here", and "Drop files anywhere to upload")
- makes the "upload-ui" consistent across the media views
- hides the IE 11 "X" `::-ms-clear` button in the Insert from URL field, as it conflicts with the uploading spinner
- adds comments to all the media templates to clarify their usage
- slightly increases vertical spacing between form fields in the media sidebar
- removes some CSS selectors introduced as backwards compatibility for WordPress pre-4.4
- removes some CSS still targeting Internet Explorer 7 and 8

Fixes #47141.
Fixes #47122.


git-svn-id: https://develop.svn.wordpress.org/trunk@45499 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-07 20:43:26 +00:00
Andrea Fercia f32683249d Fix the media player controls bar width in the media views.
Props vaishalipanchal, chetan200891.
Fixes #47457.


git-svn-id: https://develop.svn.wordpress.org/trunk@45497 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-07 13:28:37 +00:00
Sergey Biryukov 3ecc8d3f42 Media: Restore correct arrow direction in RTL in Attachment Details modal.
Reverts [29264]. As we now have a build task to replace dashicons for RTL, the CSS rules no longer worked as expected and had the opposite effect.

Props ramiy, SergeyBiryukov.
Fixes #46289.

git-svn-id: https://develop.svn.wordpress.org/trunk@45495 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-06 01:24:51 +00:00
Jonathan Desrosiers 383b620ced Privacy: Remove inline CSS within personal data request list tables.
The `.hidden` class can be used to show and hide UI elements instead.

Props birgire, pratikthink, garrett-eclipse.
Fixes #44839.

git-svn-id: https://develop.svn.wordpress.org/trunk@45490 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-04 23:39:31 +00:00
Sergey Biryukov d22572a5a5 I18N: Merge duplicate "Status" and "Info" strings on Site Health screens.
Props ramiy.
Fixes #47227.

git-svn-id: https://develop.svn.wordpress.org/trunk@45488 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-01 22:09:42 +00:00
Sergey Biryukov 9172b9c16b Upgrade/Install: Correct operator precedence for an error code in `WP_Ajax_Upgrader_Skin::error()`.
Props jrf.
Fixes #47441.

git-svn-id: https://develop.svn.wordpress.org/trunk@45487 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-31 14:13:09 +00:00
Sergey Biryukov 37e745c041 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/media.css`.
Props ianbelanger, mukesh27, pbiron, afercia.
Fixes #46530. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45484 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 16:44:02 +00:00
Sergey Biryukov 454cdf5f54 Media: Move tag cloud styles that accidentally ended up in Media section after the reorganization in [16136] to a more appropriate place.
Remove styles for `wp-admin/update-core.php` accidentally duplicated in Media section as part of the same reorganization.

See #46530.

git-svn-id: https://develop.svn.wordpress.org/trunk@45483 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 16:39:59 +00:00
Jonathan Desrosiers fea049171e Docs: Add missing function documentation for `list_plugin_updates()`.
Introduced in [9543].

Props priyankkpatel, mukesh27.
Fixes #47424.

git-svn-id: https://develop.svn.wordpress.org/trunk@45480 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 15:09:32 +00:00
Sergey Biryukov 0b50df57a7 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/revisions.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46517. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45468 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 12:15:21 +00:00
Sergey Biryukov efe514a8c2 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/list-tables.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46515. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45467 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 12:14:11 +00:00
Sergey Biryukov 2254e86861 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/login.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46514. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45466 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 12:08:53 +00:00
Sergey Biryukov ca40b4ef9f CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/install.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46513. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45465 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 11:52:20 +00:00
Sergey Biryukov e9f7b9a81d CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/forms.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46512. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45464 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-30 11:48:09 +00:00
Andrea Fercia 79e2b83b8f Administration: Improve the Site Health tables layout for small screens.
Props immeet94, jankimoradiya, desrosj, shashank3105, chetan200891, Clorith, hedgefield.	
Fixes #46960.


git-svn-id: https://develop.svn.wordpress.org/trunk@45463 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-29 18:21:45 +00:00
Sergey Biryukov 663c2f6562 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/edit.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46511. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45462 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-29 16:04:38 +00:00
Sergey Biryukov febf206326 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/dashboard.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46510. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45461 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-29 16:02:49 +00:00
Sergey Biryukov 84efe08557 CSS Coding Standards: Use unitless values for `line-height` in `wp-admin/css/customize-widgets.css`.
Props ianbelanger, pbiron, afercia.
Fixes #46509. See #44643.

git-svn-id: https://develop.svn.wordpress.org/trunk@45460 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-29 16:00:40 +00:00
Jonathan Desrosiers 1b4d29ab71 Administration: Add missing filter documentation for Site Health auto update tests.
Props johnbillion, mukesh27.
Fixes #47388.

git-svn-id: https://develop.svn.wordpress.org/trunk@45459 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-29 13:58:33 +00:00
Andrew Ozz 2d02bb13d1 Script loader: prevent sorting of the `load` array in the query string when passing the script handles to load-scripts.php and load-styles.php.
Fixes #45346 #26886.

git-svn-id: https://develop.svn.wordpress.org/trunk@45456 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-28 02:42:24 +00:00
Sergey Biryukov 6d523d5044 Docs: Add a comment about the reinstated `wp-admin/options-privacy.php`.
See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45454 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-27 03:02:33 +00:00
Sergey Biryukov 2208412015 Privacy: Remove reinstated `wp-admin/options-privacy.php` from `$_old_files`.
Fix WPCS violations in [45448].

See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45453 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-27 02:39:46 +00:00
Andrew Ozz d670b91335 Fix typo in [45451] and move the redirect to the proper location.
See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45452 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 23:20:56 +00:00
Andrew Ozz 2fb86e26e6 Privacy tools: restore `privacy.php` to its "proper" use to output the Privacy tab on the About screen, see [42814]. Then add the Privacy tab updates from freedoms.php.
See #43895.



git-svn-id: https://develop.svn.wordpress.org/trunk@45451 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 22:56:18 +00:00
John Blackbourn 41847b234e Docs: Improve documentation for some more variadic functions.
Fixes #37402


git-svn-id: https://develop.svn.wordpress.org/trunk@45450 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 22:47:23 +00:00
Andrew Ozz 9fcb362fa0 Privacy tools: Organize privacy functions into logical files and classes.
Props xkon, birgire, desrosj, garrett-eclipse, azaozz.
See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45448 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 20:49:04 +00:00
Sergey Biryukov b8e4a052a7 I18N: Merge duplicate "Add Comment" strings.
Props ramiy.
Fixes #47246.

git-svn-id: https://develop.svn.wordpress.org/trunk@45441 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 18:42:35 +00:00
Sergey Biryukov 3820ae932b I18N: Use consistent error messages when importing or exporting content.
Props ramiy.
Fixes #42269.

git-svn-id: https://develop.svn.wordpress.org/trunk@45440 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 18:08:55 +00:00
Sergey Biryukov e1cc160ba9 I18N: Merge duplicate "not allowed to manage options" strings.
Props ramiy.
Fixes #42271.

git-svn-id: https://develop.svn.wordpress.org/trunk@45439 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 15:59:37 +00:00
Sergey Biryukov 88f579b256 I18N: Merge duplicate "Loading..." strings.
Props ramiy.
Fixes #47248.

git-svn-id: https://develop.svn.wordpress.org/trunk@45438 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 15:45:57 +00:00
Sergey Biryukov 8bda02eec6 I18N: Merge similar strings in Edit Media help tabs.
Props ramiy.
Fixes #46919.

git-svn-id: https://develop.svn.wordpress.org/trunk@45437 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 15:37:11 +00:00
Sergey Biryukov b10cf79f01 I18N: Merge duplicate "Try Again" strings.
Props ramiy.
Fixes #47251.

git-svn-id: https://develop.svn.wordpress.org/trunk@45433 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 14:39:35 +00:00
Sergey Biryukov 2e32d4331f I18N: Remove unnecessary markup from plugin action messages, for consistency with the rest of the admin.
Props ramiy.
Fixes #47238.

git-svn-id: https://develop.svn.wordpress.org/trunk@45432 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 14:35:58 +00:00
Sergey Biryukov 85e517ca48 Administration: Merge similar "file does not exist" messages in plugin and theme editors.
Props ramiy.
Fixes #47249.

git-svn-id: https://develop.svn.wordpress.org/trunk@45431 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 12:34:09 +00:00
Sergey Biryukov 10855438ea Date/Time: Replace all instances of `date()` with `gmdate()`.
Use of `date()` in core depends on PHP timezone set to UTC and not changed by third party code (which cannot be guaranteed).

`gmdate()` is functionally equivalent, but is not affected by PHP timezone setting: it's always UTC, which is the exact behavior the core needs.

Props nielsdeblaauw, Rarst.
Fixes #46438. See #44491.

git-svn-id: https://develop.svn.wordpress.org/trunk@45424 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 00:11:37 +00:00
Andrea Fercia d013696652 Accessibility: Improve toggling the "Post locked" information visibility.
- effectively hides the "Post locked" information from assistive technologies
- when a post is locked, reveals the "Post locked" information without CSS animation
- the height CSS animation didn't work anyways after [24906]

See #24553.
Fixes #44946.


git-svn-id: https://develop.svn.wordpress.org/trunk@45417 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 17:14:29 +00:00
Andrea Fercia 12c154717b Accessibility: Improve settings tables and forms after [45403].
- adds `role="presentation"` to the edit comment table 
- removes a few pointless `<fieldset>` elements
- adds a few missing `<label>` elements
- adds the CSS class `class="td-full"` to table rows spanning to multiple cells
- adds explicit `scope="row"` attribute to the table headers in `options-permalink.php`: this table is better communicated as data table 
- uses consistent label association in the "Privacy Settings" page
- in the installation page "Set up your database connection": associates descriptions to their inout fields using `aria-describedby`
- improves the link to gravatar.com in the `user-edit.php` page

See #46899.
Fixes #47390.


git-svn-id: https://develop.svn.wordpress.org/trunk@45416 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 15:18:24 +00:00
Sergey Biryukov 56b2957c2e CSS Coding Standards: Update unitless values for `line-height` in `wp-admin/css/widgets.css` with more precise calculations.
Props ianbelanger.
Fixes #46531.

git-svn-id: https://develop.svn.wordpress.org/trunk@45415 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 14:43:29 +00:00
Sergey Biryukov 1752bc29a7 CSS Coding Standards: Update unitless values for `line-height` in `wp-admin/css/nav-menus.css` with more precise calculations.
Props ianbelanger.
Fixes #46516.

git-svn-id: https://develop.svn.wordpress.org/trunk@45414 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 14:41:55 +00:00
Sergey Biryukov 8081adfefa Editor: In `edit-form-blocks.php`, check the result of `wp_set_post_lock()`, which may return `false` and cause a warning when passed to `implode()`.
Props kakshak, aduth.
Fixes #47013.

git-svn-id: https://develop.svn.wordpress.org/trunk@45413 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 14:34:30 +00:00
Sergey Biryukov a6fa4b5491 General: Update support forum links.
There are a lot of places in Core that link to https://wordpress.org/support/ for the support forums, but that's now the URL for HelpHub. The new forums link is https://wordpress.org/support/forums/.

This is a follow-up to [45140], which changed the links in help tabs.

Props dilipbheda.
Fixes #47239. See #46790.

git-svn-id: https://develop.svn.wordpress.org/trunk@45412 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 14:23:27 +00:00
Andrea Fercia 57ebd24077 Accessibility: Fix the headings hierarchy in the legacy Custom Background and Custom Header pages.
Fixes #47386.


git-svn-id: https://develop.svn.wordpress.org/trunk@45411 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 13:31:59 +00:00
John Blackbourn 8226fe338f Users: Allow Super Admins to remove themselves from a site on a Multisite network.
Props Mista-Flo, birgire

Fixes #41439


git-svn-id: https://develop.svn.wordpress.org/trunk@45407 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 00:12:22 +00:00
Sergey Biryukov a3fbc75237 Accessibility: Make sure layout tables across the admin are correctly linearized.
Adds `role="presentation"` to the `<table>` elements used for layout purposes.

Ideally, HTML tables should be used for tabular data. When tables are used for layout purposes, it's important to remove any native semantics so that assistive technologies can correctly announce the table content in a linearized fashion.

Props greatislander, afercia.
Fixes #46899.

git-svn-id: https://develop.svn.wordpress.org/trunk@45403 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 21:55:21 +00:00
John Blackbourn a4d9f02eef I18N: Add a language icon next to language selectors.
This change means that users who can't read the site's current language can more easily identify controls that allow them to change either the site language or their own admin area language.

Props janak007, atlasmahesh, afercia, birgire, JoshuaWold

Fixes #43144


git-svn-id: https://develop.svn.wordpress.org/trunk@45402 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 20:42:06 +00:00
John Blackbourn 971b5daa74 Administration: Replace references to "articles" with "posts" for greater consistency of terminology.
Props angelagibson

Fixes #38517


git-svn-id: https://develop.svn.wordpress.org/trunk@45401 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 19:17:50 +00:00
Sergey Biryukov 630f4bc1ea I18N: Remove PHP function name from translatable string in `WP_Debug_Data`.
Props ramiy.
Fixes #47254.

git-svn-id: https://develop.svn.wordpress.org/trunk@45399 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 01:40:35 +00:00
Sergey Biryukov c725e9f0d8 Docs: Fix typos in DocBlocks and comments in `wp-admin/includes/file.php`.
Props mukesh27.
Fixes #47026.

git-svn-id: https://develop.svn.wordpress.org/trunk@45394 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-24 01:07:52 +00:00
Sergey Biryukov 60df42d187 Networks and Sites: Readjust tabs in `wp-admin/includes/network.php` for (more or less) consistent alignment.
See #47062.

git-svn-id: https://develop.svn.wordpress.org/trunk@45391 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-23 23:34:40 +00:00
Sergey Biryukov 4f51d3679c Networks and Sites: Remove extra whitespace in `.htaccess` rules on Network Setup page.
Props riddhiehta02 for initial patch, sebastienserre, masterforwordpress.
Fixes #47062.

git-svn-id: https://develop.svn.wordpress.org/trunk@45390 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-23 23:27:57 +00:00
John Blackbourn 2756e6a27f Administration: Don't apply italic formatting to code blocks in setting descriptions.
Props chetan200891

Fixes #42651


git-svn-id: https://develop.svn.wordpress.org/trunk@45389 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-23 23:13:51 +00:00
John Blackbourn 9b248694ac I18N: Use a complete translatable string for the "Delete My Site" email subject.
Props thrijith

Fixes #46855


git-svn-id: https://develop.svn.wordpress.org/trunk@45387 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-23 22:14:28 +00:00
Sergey Biryukov 70f0b32079 I18N: Capitalize "Privacy Policy Page" heading to merge two similar strings.
Props ramiy, garrett-eclipse.
Fixes #47250.

git-svn-id: https://develop.svn.wordpress.org/trunk@45384 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-23 21:10:56 +00:00
Sergey Biryukov e23ea906e2 I18N: Make punctuation in some `wp-admin` strings more consistent.
Props pedromendonca.
Fixes #47358.

git-svn-id: https://develop.svn.wordpress.org/trunk@45382 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-23 01:11:04 +00:00
Sergey Biryukov ff131f5e29 Upgrade/Install: As a follow-up to [45357], when linking to Update PHP support page in error messages, check if `wp_get_update_php_url()` and `wp_get_update_php_annotation()` exist.
`wp-admin/includes/update-core.php` runs in the context of the previous WordPress version. Any calls to newly introduced functions there need to be checked via `function_exists()`.

Reviewed by desrosj, earnjam, SergeyBiryukov.

Props dd32, imath.
Fixes #47323.

git-svn-id: https://develop.svn.wordpress.org/trunk@45365 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-20 14:28:03 +00:00
Sergey Biryukov 0205cf09f0 Upgrade/Install: Improve error messages displayed when WordPress update fails due to an incompatible PHP version by linking to the Update PHP support page.
Additionally, fix a regression in [44451] where the error message in `wp-admin/upgrade.php` was prepared, but never displayed.

Props afragen, netweb, hareesh-pillai, SergeyBiryukov.
Fixes #46937.

git-svn-id: https://develop.svn.wordpress.org/trunk@45357 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 18:10:55 +00:00
Sergey Biryukov ee8771923a Site Health: In PHP modules test description, move the space before the screen reader text out from the translatable string.
Props ocean90, tobifjellner.
Fixes #47161.

git-svn-id: https://develop.svn.wordpress.org/trunk@45346 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 11:49:52 +00:00
Alex Shiels 85a90cb244 Upgrade/Install: Don't run signature verify on slow 32-bit systems.
The sodium_compat library can be very slow for certain operations on 32-bit architectures, which can lead to web server timeouts while attempting to verify an update. This adds a runtime speed check to skip signature verification on systems that would otherwise time out. Includes simple unit tests.

Props dd32, paragoninitiativeenterprises.
See #47186.


git-svn-id: https://develop.svn.wordpress.org/trunk@45345 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 11:05:45 +00:00
Sergey Biryukov dc8c8dd878 Help/About: Restore placeholder for WordPress version in tagline on About, Credits, and Freedoms pages to include minor versions.
Props desrosj, mukesh27.
Fixes #46408.

git-svn-id: https://develop.svn.wordpress.org/trunk@45338 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 01:07:12 +00:00
Sergey Biryukov 040a58ff57 Site Health: Use correct singular string for plugin and theme version tests.
Props edocev, Presskopp.
Fixes #47264.

git-svn-id: https://develop.svn.wordpress.org/trunk@45336 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 00:59:20 +00:00
Sergey Biryukov 448234f966 I18N: Avoid using placeholders for link start and end tags in alt text description strings added in [45158].
Use an established pattern of moving additional link attributes out of the translatable string.

Props dimadin.
Fixes #47159.

git-svn-id: https://develop.svn.wordpress.org/trunk@45334 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 00:52:32 +00:00
Sergey Biryukov e6dcab7803 Site Health: In PHP modules test, ensure the description is translated as a whole sentence, not as separate string parts.
Props dimadin, SergeyBiryukov.
Fixes #47161.

git-svn-id: https://develop.svn.wordpress.org/trunk@45331 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 00:06:49 +00:00
Sergey Biryukov 0126a4bd2a Site Health: In HTTP requests test, when checking whether the `WP_HTTP_BLOCK_EXTERNAL` constant is defined, check its value as well.
Props chesio.
Fixes #47297.

git-svn-id: https://develop.svn.wordpress.org/trunk@45328 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-16 22:07:35 +00:00
Jonathan Desrosiers c18460698f Privacy: Prevent email field for personal data requests from overflowing.
Props anischarolia, ianbelanger, afercia.
Fixes #46961.

git-svn-id: https://develop.svn.wordpress.org/trunk@45326 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-16 20:44:41 +00:00
Jonathan Desrosiers cd511054a0 Menus: Fix alignment of menu actions on mobile.
In [41197], changes were made to improve the responsive view for the Menu Name field and Save buttons. This caused the Delete Menu button to be misaligned.

Props ianbelanger, audrasjb, afercia, mukesh27.
Fixes #47173.

git-svn-id: https://develop.svn.wordpress.org/trunk@45324 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-16 19:04:42 +00:00
Jonathan Desrosiers b7a79cf126 Site Health: Improve alignment and spacing for section headers.
This changes the CSS for Site Health headers to use flexbox, which helps ensure the text is vertically aligned center and consistently spaced in both the Status and Info tabs. It also fixes an issue where the loading spinner GIF was cut off on smaller screens (originally reported in #47203.

Props Presskopp, odminstudios, kjellr, afercia, desrosj, hedgefield, ianbelanger, xavortm.
Fixes #47063.

git-svn-id: https://develop.svn.wordpress.org/trunk@45322 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-16 18:29:47 +00:00
Jonathan Desrosiers 851cb8b8f2 Site Health: Improve vertical alignment of icons in test result descriptions.
This change removes redundant CSS properties for different health check statuses in favor of utilizing the `.dashicons` class already in Core to define them more consistently. This also fixes the vertical alignment issues.

Props chetan200891, Clorith, desrosj.
Fixes #46940.

git-svn-id: https://develop.svn.wordpress.org/trunk@45309 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-15 14:24:15 +00:00
Jonathan Desrosiers f10ea0702a Site Health: Link to the correct plugin update screen in multisite installs.
Props Clorith, sebastienserre, jeremyfelt, desrosj.
Fixes #47189.

git-svn-id: https://develop.svn.wordpress.org/trunk@45308 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-15 14:11:50 +00:00
Andrea Fercia cae0608a7f Accessibility: Improve the "skip links" position for medium and small screens.
Fixes #47065.


git-svn-id: https://develop.svn.wordpress.org/trunk@45301 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-09 21:10:20 +00:00
Andrea Fercia 2ee480e11c Accessibility: Add `aria-current` to the links in the `<nav>` elements introduced in [44905].
Also fixes a few translators comments and coding standards.

Props audrasjb.
Fixes #47106.


git-svn-id: https://develop.svn.wordpress.org/trunk@45300 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-09 20:57:06 +00:00
Jonathan Desrosiers 3da0d67f80 I18N: Combine similar strings with minor differences.
Props dimadin.
Fixes #47158.

git-svn-id: https://develop.svn.wordpress.org/trunk@45298 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-09 19:47:28 +00:00
Jonathan Desrosiers a72dd388f5 Administration: Prevent cards on the Tools page from overflowing on small screens.
Props anischarolia, mukesh27.
Fixes #46972.

git-svn-id: https://develop.svn.wordpress.org/trunk@45296 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-09 14:55:18 +00:00
Jonathan Desrosiers 3607546bad Help/About: Update the 5.2 tagline on Freedoms and Credits.
Props ocean90.
See #46901.

git-svn-id: https://develop.svn.wordpress.org/trunk@45292 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-07 19:59:17 +00:00
Jonathan Desrosiers 6289d9e304 Help/About: Final 5.2 about page updates.
Use final image URLs and fix a bug in IE11 where images were being cut off.

Props afercia, SergeyBiryukov, ianbelanger, desrosj, audrasjb.
See #46901.

git-svn-id: https://develop.svn.wordpress.org/trunk@45287 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-07 17:18:34 +00:00
Jonathan Desrosiers 994950ea8c Help/About: Polish the About page for 5.2.
- The About page now uses a CSS grid to layout its design, making the page’s structure more obvious and hopefully easier for contributors in the future.
- Removes some code that is no longer used (such as videos, mejs elements, etc.).
- Update images.
- Unnecessary HTML is removed from a string on the page. This was a regression.
- Only users with the correct capability should be instructed to check their site status.
- Fixes the placement of commas.

Reviewed by melchoyce, afercia, jeremyfelt, and desrosj.

Props ryelle, melchoyce, cathibosco1, man4toman, SergeyBiryukov, afercia, ramiy, kjellr, tellyworth, earnjam, andreamiddleton, marybaum.
See #46901.

git-svn-id: https://develop.svn.wordpress.org/trunk@45278 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-02 15:43:10 +00:00
Jonathan Desrosiers f33df7cde4 Help/About: Fix tab display issues.
This change restores About page tab heights and fixes bugs with the tab bottom border caused by [44905] and [45243].

Reviewed by SergeyBiryukov and desrosj.

Props ixkaito, ianbelanger, afercia, SergeyBiryukov.
See #46901.
Fixes #47075.

git-svn-id: https://develop.svn.wordpress.org/trunk@45276 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-02 10:36:02 +00:00
Jonathan Desrosiers 62645be17e Site Health: Disable recommendations that could be problematic on multisite installs.
When viewing Site Health for a multisite install, there are a few recommendations that are not appropriate and could have negative implications for other sites on the install if the administrator follows the advice provided.

For example, Site Health recommends that inactive plugins and themes for a site should be removed. On a single site install, this is a great recommendation. However, on a multisite install, inactive plugins and themes for one site should not be removed because they could be active for other sites on the network.

This change also disables the `test_wp_version_check_attached()` test for multisite. This test checks for the presence of the `wp_version_check()` function on the `wp_version_check` hook, which is not present for every site on multisite.

Reviewed by jeremyfelt and desrosj.

Props iandunn, Clorith, azaozz, jeremyfelt.
Fixes #47084.

git-svn-id: https://develop.svn.wordpress.org/trunk@45275 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-01 18:07:46 +00:00
Aaron Jorbin a8942b4a17 Admin: Add some additional clarity to some about page links
It's important for links to have enough information in them in order to be clearly actionable. Destination and purpose should be clear. For example, `debug` isn't nearly as useful as `learn how to debug issues`.

This was signed off on by chanthaboune and jorbin.

Props afercia.
See: #46901.



git-svn-id: https://develop.svn.wordpress.org/trunk@45274 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-30 17:30:27 +00:00
Gary Pendergast 3477102cec Admin: Add the text for the WordPress 5.2 About page.
This changes includes placeholder images for now, they'll be replaced by the final images before final release.

Props chanthaboune, melchoyce, karmatosed, pento, marybaum, birgire, earnjam, andreamiddleton.
See #46901.



git-svn-id: https://develop.svn.wordpress.org/trunk@45271 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-26 00:56:57 +00:00
Sergey Biryukov 4f4f253821 Docs: Use 3-digit, x.x.x style semantic versioning for `@since 5.2.0` entries in `wp-admin/includes/file.php`.
See #46543.

git-svn-id: https://develop.svn.wordpress.org/trunk@45266 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-24 23:35:50 +00:00
Alex Shiels 1343858467 Upgrade/install: fix verification bugs and scale back signature checks.
This fixes several bugs in the signature verification code:
Disables signature checks on certain incompatible PHP versions that cause math errors when opcache is enabled;
Prevents a spurious URL and subsequent error when downloading a zip file with query arguments;
Prevents errors triggered by third-party upgrade scripts as per #46615;
Disables signature tests for Plugins, Themes, and Translations, leaving only core updates.

At the 5.2 release the API servers will only provide signatures for core update packages, which is why messages are suppressed for plugins and other package types. Signatures for those other items will become available later.

Props dd32.
See #39309, #46615



git-svn-id: https://develop.svn.wordpress.org/trunk@45262 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-24 07:43:29 +00:00
Andrew Ozz e13ef071ff Site Health: Fix count of inactive themes and the recommendation to remove them when the default theme is active or is a parent of the active child theme.
Props sudhiryadav, ianbelanger, mukesh27, azaozz.
Fixes #46900.

git-svn-id: https://develop.svn.wordpress.org/trunk@45260 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-23 21:36:02 +00:00
Andrew Ozz 14fc4634a2 Site Health: Allow some HTML (inline tags only) in the section descriptions. Add some more docs about expected formatting of the gathered data.
Props kraftbj, jeherve, mukesh27, audrasjb, azaozz.
Fixes #46878.

git-svn-id: https://develop.svn.wordpress.org/trunk@45259 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-23 21:04:19 +00:00
Sergey Biryukov f7dba2af72 Networks and Sites: Use correct escaping function for classes added via ` ms_user_list_site_class` filter.
Props david.binda.
Fixes #46990. See #41146.

git-svn-id: https://develop.svn.wordpress.org/trunk@45252 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-19 13:50:32 +00:00
Dominik Schilling 1eb665b20c Site Health: Fix debug data with nested fields for copying.
* Use `$debug_data` instead of `$field['value']` to retrieve the debug data.
* Rename inner variables to avoid overriding the output variable.

Props Clorith, ocean90.
See #46573.

git-svn-id: https://develop.svn.wordpress.org/trunk@45246 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 16:25:05 +00:00
Dominik Schilling eda377ba9e Site Health: Provide context for tab headings to be able to distinguish them from existing strings.
See #46573.

git-svn-id: https://develop.svn.wordpress.org/trunk@45245 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 16:05:17 +00:00
Gary Pendergast b074b74489 CSS: Remove the units from `line-height` properties in `common.css`.
Props ianbelanger, talldanwp.
Fixes #46493.



git-svn-id: https://develop.svn.wordpress.org/trunk@45243 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 06:01:56 +00:00
Andrew Ozz 288116c9ff Site Health info tab: Remove the "Directories and Sizes" section on Multisite installations. Most of the info shown there doesn't apply for multisite.
Props xkon, desrosj, azaozz.

git-svn-id: https://develop.svn.wordpress.org/trunk@45239 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 00:33:03 +00:00
Andrew Ozz 01719cb6b6 Site health info tab: replace "Not calculated" with "Loading..." in the "Directories and Sizes" section (that's an existing string and wouldn't cause problems for translators).
See #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45237 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 21:25:05 +00:00
Sergey Biryukov 60fd53ef96 Site Health: Allow any callable added via `site_status_tests` filter to return test results for direct tests.
Async tests still need to be a string for the AJAX action.

Props kraftbj.
Fixes #46836.

git-svn-id: https://develop.svn.wordpress.org/trunk@45234 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 14:34:12 +00:00
Sergey Biryukov 4206fe3e05 Docs: Remove `@global` tag for `$wpdb` from `wp-admin/install.php` and `wp-admin/upgrade.php`.
Per the documentation standards, the `@global` tag is meant to list PHP globals used within functions or methods.

The code in question uses the variable in global namespace, but does not explicitly declare it.

Props jayupadhyay01, dswebsme.
Fixes #46602.

git-svn-id: https://develop.svn.wordpress.org/trunk@45233 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 14:06:55 +00:00
Sergey Biryukov da32612242 Docs: Correct spelling in various comments and DocBlocks, per the conventions in Core Contributor Handbook.
Props man4toman, samanehmirrajabi.
Fixes #45857.

git-svn-id: https://develop.svn.wordpress.org/trunk@45232 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 13:26:00 +00:00
Sergey Biryukov 691258f1f4 Site Health: Group `WP_DEBUG`-related constants together.
Props tmatsuur.
Fixes #46955.

git-svn-id: https://develop.svn.wordpress.org/trunk@45230 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 11:59:13 +00:00
Andrea Fercia e1022a6184 Site Health: Improve the accordions styles for small screens.
Also, changes the hex color values to lowercase.

Props subrataemfluence, man4toman, garrett-eclipse, chetan200891, mukesh27, melchoyce, karmatosed, Clorith.
Fixes #46949.


git-svn-id: https://develop.svn.wordpress.org/trunk@45229 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 10:59:12 +00:00
Andrea Fercia 2bf547ff53 Site Health: Remove title attribute from the directory sizes spinner.
Amends [45176].
See #46707.


git-svn-id: https://develop.svn.wordpress.org/trunk@45228 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 10:08:06 +00:00
Sergey Biryukov 0152c18cd2 Docs: Improve documentation for various `WP_Filesystem_Base` methods and extending classes.
Props jaydeep-rami, man4toman, SaeedFard, mukesh27, mohadeseghasemi, ebrahimzadeh, juiiee8487, SergeyBiryukov.
Fixes #42227, #46806, #46840. See #46543.

git-svn-id: https://develop.svn.wordpress.org/trunk@45226 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 04:12:27 +00:00
Jonathan Desrosiers d575d70fe9 Administration: Improve the accuracy of `is_block_editor()`.
Currently, there are a number of scenarios where `is_block_editor()` (and `WP_Screen::is_block_editor`) would incorrectly indicate block editor support at different points of the loading process. Most notably, checking `is_block_editor` when hooking into the `current_screen` action will always result in `false`, even when the block editor is being loaded. This is because `is_block_editor` is not set to `true` until `edit-form-blocks.php` is included.

This change adds logic to `WP_Screen` to ensure the accuracy of `is_block_editor` on block editor pages earlier in the load process.

While edit screens will now be accurate 100% of the time from `current_screen` on, there are still a few edge cases where `is_block_editor` could contain an incorrect value when creating a new post.

Because a `WP_Post` object is a required parameter for the `replace_editor` filter and `use_block_editor_for_post()` function, `WP_Screen` will fall back to the value returned by `use_block_editor_for_post_type()` for the post being created. To eliminate these edge cases, the `use_block_editor_for_post_type` filter can be used to return the appropriate boolean value to indicate support.

Props Chouby, desrosj, aduth, johnbillion.
Fixes #46195.

git-svn-id: https://develop.svn.wordpress.org/trunk@45224 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 01:55:21 +00:00
Sergey Biryukov dfeea03a58 Site Health: Remove reference to an undefined variable in `WP_Site_Health_Auto_Updates::test_constants()`.
Props diddledan.
Fixes #46952.

git-svn-id: https://develop.svn.wordpress.org/trunk@45223 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 01:09:30 +00:00
Sergey Biryukov 260ee7308d Docs: Fix typo in `WP_Site_Health_Auto_Updates::test_constants()` description.
See #46543.

git-svn-id: https://develop.svn.wordpress.org/trunk@45222 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 00:59:54 +00:00
Sergey Biryukov 3feb1f171a PHPCS: Fix WPCS violations in [45220].
See #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45221 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 00:44:12 +00:00
Andrew Ozz e85b26d14c Site health, info tab:
- Change `recurse_dirsize()` to accept an array of excluded paths.
- Change so we don't calculate the sizes of dirs in wp-content twice.
- Add the size in bytes to the "debug" into.
- Add a custom DOM event after the dir sizes request is done. Can be used by plugins to "daisy chain" more requests.
- Move "WordPress directory location" and "WordPress directory size" to the top in the "Directories and Sizes" section.
- Move "Theme directory location" to the "Active Theme" section.
- Fix labels capitalization.

Props xkon, afercia, Clorith, azaozz.
Fixes #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45220 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 23:01:45 +00:00
Adam Silverstein 70f16b6bf4 Media: move `get_available_post_mime_types` to `wp-includes/post.php` making it more generally available.
Address an issue since r44947 where calling `wp_enqueue_media` on the front-end would result in a PHP fatal.

Props david.binda.
Fixes #46795.


git-svn-id: https://develop.svn.wordpress.org/trunk@45219 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 20:29:42 +00:00
Andrea Fercia f969e1dfd7 Administration: Improve the Site Health "Passed tests" button style for small screens.
Props chetan200891.
Fixes #46939.


git-svn-id: https://develop.svn.wordpress.org/trunk@45217 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 16:22:41 +00:00
Sergey Biryukov c295378ecd Export: Remove extra whitespace from `<title>`, `<content:encoded>`, and `<excerpt:encoded>` elements in WXR files.
Props sgastard, juliarrr, aristath, SergeyBiryukov.
Fixes #46575.

git-svn-id: https://develop.svn.wordpress.org/trunk@45216 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 15:56:48 +00:00
Sergey Biryukov b66077a1aa I18N: Fix typo in a translator comment.
See #46920.

git-svn-id: https://develop.svn.wordpress.org/trunk@45207 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 23:55:52 +00:00
John Blackbourn 8b1ecf68d9 I18N: Improvements to and additions of translator comments for various email subject strings.
Props ramiy

Fixes #46920


git-svn-id: https://develop.svn.wordpress.org/trunk@45204 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 22:38:59 +00:00
Mel Choyce 1442389a75 Administration: Update chevron color in Site Health.
Props afercia.
Fixes #46934. See #46730.


git-svn-id: https://develop.svn.wordpress.org/trunk@45202 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 18:55:34 +00:00
Andrea Fercia 94af7683fe Administration: Add a chevron icon to the Site Health "Passed tests" button.
The chevron icon helps clarify what the button does.

Props garrett-eclipse, Clorith, xkon, melchoyce.
Fixes #46730.


git-svn-id: https://develop.svn.wordpress.org/trunk@45201 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 18:00:57 +00:00
Andrea Fercia 3eb83ade1e Administration: Provide translatable strings for the Site Health comment status report.
Props ocean90.
Fixes #46909.


git-svn-id: https://develop.svn.wordpress.org/trunk@45200 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 15:07:36 +00:00
Andrea Fercia 9f8366994b Site Health: Add missing translator comments.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45199 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-15 14:38:26 +00:00
Andrea Fercia 92909607d6 Site health: Improve jQuery selectors so that they don't depend on a specific markup.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45198 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-14 14:29:03 +00:00
Sergey Biryukov d52d60c809 Site Health: Merge duplicate "utf8mb4 requires a newer client library" strings.
Props ramiy.
Fixes #46917.

git-svn-id: https://develop.svn.wordpress.org/trunk@45196 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:17:16 +00:00
Sergey Biryukov 7d54ac58cc Site Health: Merge duplicate "Error" strings.
Props ramiy.
Fixes #46915.

git-svn-id: https://develop.svn.wordpress.org/trunk@45195 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:11:46 +00:00
Sergey Biryukov 68ac2e4998 Users: Merge duplicate "Download failed" strings.
Props ramiy.
Fixes #46914.

git-svn-id: https://develop.svn.wordpress.org/trunk@45194 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:07:35 +00:00
Sergey Biryukov 35498b090e Site Health: Merge duplicate "Latest version" strings.
Props ramiy.
Fixes #46913.

git-svn-id: https://develop.svn.wordpress.org/trunk@45193 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 18:03:23 +00:00
Sergey Biryukov b9b33979a0 Site Health: Merge duplicate "Learn more about updating PHP" strings.
Props ramiy.
Fixes #46912.

git-svn-id: https://develop.svn.wordpress.org/trunk@45192 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 17:58:12 +00:00
Sergey Biryukov 30caafae40 Bootstrap/Load: Remove duplicate leading slashes on inclusion of various files under `ABSPATH`.
Props dmsnell, birgire, szepe.viktor.
Fixes #46327.

git-svn-id: https://develop.svn.wordpress.org/trunk@45190 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-13 04:45:05 +00:00