Commit Graph

39998 Commits

Author SHA1 Message Date
Peter Wilson
183b4b6212 Cron API: Prevent caching of WP Cron requests.
Add `Cache-Control` and `Expires` HTTP headers to prevent caching of requests to WP Cron on systems supporting fastcgi_finish_request(). 

The fastcgi_finish_request() call prevents the setting of further HTTP headers by caching plugins subsequently loaded.

Props kingkero.
Fixes 47396.



git-svn-id: https://develop.svn.wordpress.org/trunk@45560 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-22 11:12:58 +00:00
Peter Wilson
e37aff4320 Code is Poetry: CS Fixes required in wp-cron.php.
See #47396, #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@45559 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-22 11:11:26 +00:00
Anton Timmermans
a912ef9642 Docs: Improve JSDoc for admin/edit-comments.js.
Props manuelaugustin, diedeexterkate, thulshof, Xyfi, ireneyoast.
Fixes #47581.


git-svn-id: https://develop.svn.wordpress.org/trunk@45558 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 14:44:30 +00:00
Adam Silverstein
0dc3295e29 Themes: improve search by trimming search string.
Fix an issue where searching installed themes for an empty string resulted in matching all themes.

Props afercia, desrosj, hesyifei, evalarumbe.
Fixes #39041.


git-svn-id: https://develop.svn.wordpress.org/trunk@45557 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 14:14:59 +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
Sergey Biryukov
e283457e45 Date/Time: Add more supported formats to wp_maybe_decline_date().
Props SergeyBiryukov, Rarst.
Fixes #37411.

git-svn-id: https://develop.svn.wordpress.org/trunk@45555 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 13:46:20 +00:00
Jonathan Desrosiers
97b90a454c XML-RPC: Merge similar translation strings.
Props ramiy.
Fixes #47039.

git-svn-id: https://develop.svn.wordpress.org/trunk@45554 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 12:52:52 +00:00
Anton Timmermans
7a9af3a4ed Comments: Open comment quick edit on double click.
In [42767] the quick edit button changed from a link to a button. This caused the jQuery code that selects on a link to no longer work. This commit restores the previous behavior.

Fixes #47572.
See #43382, #38677.


git-svn-id: https://develop.svn.wordpress.org/trunk@45553 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 10:05:03 +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
Sergey Biryukov
44bd6e5615 Bootstrap/Load: Set expiration of the recovery mode cookie to the same amount of time for which the token in it is valid: a week by default.
Props david.binda, TimothyBlynJacobs.
Fixes #47480.

git-svn-id: https://develop.svn.wordpress.org/trunk@45545 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-17 19:16:16 +00:00
Sergey Biryukov
2a039d481e Bootstrap/Load: Return a 403 error code when the recovery mode cookie is invalid or expired, or the exit recovery mode nonce check failed.
Props david.binda, spacedmonkey.
Fixes #47479.

git-svn-id: https://develop.svn.wordpress.org/trunk@45544 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-17 18:36:28 +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
31d865271b Media: fix support for arrays for the crop setting for registered image sub-sizes in wp_get_registered_image_subsizes().
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45541 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-15 17:16:27 +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
8e7a6b298d Menus: Set better default for $args parameter in Walker_Nav_Menu methods, to match the documented parameter type.
Props trasweb.
Fixes #47524.

git-svn-id: https://develop.svn.wordpress.org/trunk@45537 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-14 11:25:45 +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
Jonathan Desrosiers
8e8402092a Docs: Fix typos in Services_JSON DocBlocks.
Props mukesh27.
Fixes #47401.

git-svn-id: https://develop.svn.wordpress.org/trunk@45535 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 19:18:55 +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
Andrea Fercia
5eb394329a Accessibility: Handle one more case of focus loss when switching view in the Media Views.
See #43169.


git-svn-id: https://develop.svn.wordpress.org/trunk@45531 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 16:21:49 +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
Jonathan Desrosiers
2d4887f4c7 Customize: Remove “Update” link for themes on multisite installs.
In [38887], installing themes in the Customizer was disabled for multisite installs. However, an update link continues to be displayed when a theme update is available. Clicking the link causes a JavaScript error.

This removes that update link because updates cannot actually be performed in the Customizer in this situation.

Props desrosj, earnjam, mukesh27, audrasjb, garrett-eclipse.
Fixes #46997.

git-svn-id: https://develop.svn.wordpress.org/trunk@45527 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 15:30:37 +00:00
Andrea Fercia
2ce0519f60 Media: Make sure the bottom media toolbar content is fully visible with Internet Explorer 11.
Props mspatovaliyski.
Fixes #47502.


git-svn-id: https://develop.svn.wordpress.org/trunk@45526 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 14:11:57 +00:00
Weston Ruter
8625ca01ec Bundled Theme: Fix malformed Google Font URL for Twenty Twelve due to double-encoding of +
Amends [45485].
Fixes #47282.


git-svn-id: https://develop.svn.wordpress.org/trunk@45525 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-12 23:32:44 +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
Andrea Fercia
0ddaeb1ad2 Accessibility: Fix the order of the Previous, Next, and Close buttons in the Attachment Details modal.
Making the visual and DOM order match benefits keyboard users who navigate documents sequentially and expect the focus order to be consistent with the sequential reading order.

Fixes #47458.


git-svn-id: https://develop.svn.wordpress.org/trunk@45506 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-09 15:47:43 +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
johnbillion
ea0a34c649 HTTP API: Ensure the http_api_debug hook is fired for all responses.
This means that logging and debugging functionality can access the error code and error message for erroneous responses under all conditions. The hook is not fired when a request is short-circuited with the `pre_http_request` filter, because this filter itself can be used in that situation.

Fixes #25747


git-svn-id: https://develop.svn.wordpress.org/trunk@45504 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-08 17:09:02 +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
ffe40885a1 Regenerate the REST API fixtures after [45443].
See #38517.


git-svn-id: https://develop.svn.wordpress.org/trunk@45498 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-07 20:23:46 +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
3f43833d5b Docs: Fix typo in comment_class() DocBlock.
Props mbabker.
Fixes #47499.

git-svn-id: https://develop.svn.wordpress.org/trunk@45496 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-06 23:51:24 +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
Sergey Biryukov
f6bd90f2ef I18N: Merge duplicate "Original" strings used in the same context (referring to image size).
Props mukesh27.
Fixes #47486.

git-svn-id: https://develop.svn.wordpress.org/trunk@45494 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-05 15:22:22 +00:00
Sergey Biryukov
62385fdd00 I18N: Correct encoding for wp-includes/widgets/class-wp-widget-calendar.php, accidentally saved in ANSI instead of UTF-8.
See #47485.

git-svn-id: https://develop.svn.wordpress.org/trunk@45493 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-05 15:08:42 +00:00
Sergey Biryukov
3fc93cbbb6 I18N: Merge duplicate "A calendar of your site’s posts" strings used in the Calendar widget and the Calendar block in the editor.
Props jorgefilipecosta, ramiy.
Fixes #47485.

git-svn-id: https://develop.svn.wordpress.org/trunk@45492 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-05 15:02:56 +00:00
Sergey Biryukov
21b3d9031a Posts, Post Types: Switch the order of arguments for implode() in the_meta() to match the function notation.
Props loyaltymanufaktur.
Fixes #47481.

git-svn-id: https://develop.svn.wordpress.org/trunk@45491 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-05 00:15:06 +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