Commit Graph

41592 Commits

Author SHA1 Message Date
Sergey Biryukov
bb526f5087 Script Loader: Add the $group parameter to WP_Dependencies::do_item().
Previously, the method was called with two parameters in `::do_items()`, while the method signature only included one parameter.

Technically, this was not an issue as `WP_Dependencies::do_item()` is a placeholder meant to be overwritten when extending the class. When handling scripts, `WP_Dependencies` is extended with `WP_Scripts`, and the `$group` parameter was only used in `WP_Scripts::do_item()`, which does expect a second argument.

However, officially adding the parameter to `WP_Dependencies::do_item()` signature prevents code misunderstanding and avoids a warning in PHP code inspection tools.

Props kaggdesign, soulseekah, azaozz, SergeyBiryukov.
Fixes #43627.

git-svn-id: https://develop.svn.wordpress.org/trunk@47769 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 16:25:09 +00:00
Sergey Biryukov
97a336a03c Site Health: Do not trigger the fatal error handler while updates are being installed.
Triggering the error handler during updates may cause false positives. For example, updates may temporarily "fail" while files are moved around, but work fine once completed. Sending emails about temporary failures would just be confusing to the recipient.

Props Clorith, airamerica.
Fixes #48964.

git-svn-id: https://develop.svn.wordpress.org/trunk@47768 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 14:36:47 +00:00
Jake Spurlock
8e621da4ff Block Editor: Update _all_ of the block editor packages following the 5.4.1 release.
This is an extension of [47619] and [47765].

Fixes #50094.
Props aduth, peterwilsoncc, whyisjake, ocean90, and afercia.



git-svn-id: https://develop.svn.wordpress.org/trunk@47766 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 23:54:26 +00:00
Jake Spurlock
21b05b3677 Block Editor: Update WordPress Packages following the 5.4.1 release.
This bumps @wordpress/block-library 2.14.7 ➡️ 2.14.8

Fixes #50094.
Props aduth, peterwilsoncc, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47765 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 23:37:45 +00:00
Jake Spurlock
0a8365be5a Code standards: Drop a newline in the customizer to comply with WordPress Coding Standards
Extends [47763] and #46829.


git-svn-id: https://develop.svn.wordpress.org/trunk@47764 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 21:58:12 +00:00
Jake Spurlock
8338f44306 Menus: Denote the special pages in the Customizer menu editor.
The special pages here are the pages that are used for the Privacy Policy, Home, and the Posts page.

Fixes #46829.
Props garrett-eclipse, audrasjb.


git-svn-id: https://develop.svn.wordpress.org/trunk@47763 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 21:15:49 +00:00
Sergey Biryukov
b19c56b736 Site Health: Display the original PHP memory limit on Site Health Info screen.
This ensures that if the limit has been modified for admin screens by `wp_raise_memory_limit()`, the original value is displayed along with the current value.

Props Clorith, espiat, zodiac1978, SergeyBiryukov.
Fixes #49329.

git-svn-id: https://develop.svn.wordpress.org/trunk@47762 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 18:56:44 +00:00
Sergey Biryukov
0206900cff Canonical: Only redirect non-existing page requests to the post permalink if the post is found.
Follow-up to [47760].

See #45337, #40773, #28081, #11694.

git-svn-id: https://develop.svn.wordpress.org/trunk@47761 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 10:47:05 +00:00
Sergey Biryukov
de14ea86bf Canonical: Redirect paged requests for a static page assigned as the "Posts page".
This avoids displaying duplicate content of the home page under different URLs with appended page numbers.

This change only affects the `<!--nextpage-->` pagination (`page` query variable) and not the regular multiple posts pagination (`paged` query variable).

The posts page does not support the `<!--nextpage-->` pagination, so requests for invalid page numbers should be redirected to the page permalink, applying the logic previously implemented for single posts or pages.

Follow-up to [34492], [47727].

Props jeremyfelt, sachit.tandukar, SergeyBiryukov.
Fixes #45337. See #40773, #28081, #11694.

git-svn-id: https://develop.svn.wordpress.org/trunk@47760 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 10:40:06 +00:00
Sergey Biryukov
54c8470bd6 Coding Standards: Fix WPCS issues in wp-includes/canonical.php.
Reformat long conditions and dense code blocks for better readability.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47759 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 09:03:11 +00:00
Timothy Jacobs
8153d15f09 REST API: Support more JSON Schemas when filtering a response by context.
The array type, multi-types, and the additional properties keyword are now supported. Additionally, the filter recurses to an infinite depth.

Fixes #48819.


git-svn-id: https://develop.svn.wordpress.org/trunk@47758 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 02:44:44 +00:00
Timothy Jacobs
9a903f7e73 Tests: Update wp-api-generated.js.
[47755] and [47756] caused a schema change, so the wp-api-generated.js file needs to be updated.


git-svn-id: https://develop.svn.wordpress.org/trunk@47757 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 00:26:52 +00:00
Timothy Jacobs
5460e0df1e REST API: Accept POST requests in the block renderer endpoint.
Rendering a block is idempotent, so a GET is the most natural request method. However, the maximum length of URLs prevented blocks with large attributes from being rendered.

Props ryankienstra.
Fixes #49680.


git-svn-id: https://develop.svn.wordpress.org/trunk@47756 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 22:56:01 +00:00
Timothy Jacobs
6ab90a209d REST API: Validate that the oembed url parameter is a string.
This prevents a PHP warning from being issued by esc_url_raw when a non-string value is provided.

Props dd32.
Fixes #49991.


git-svn-id: https://develop.svn.wordpress.org/trunk@47755 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 22:40:53 +00:00
John Blackbourn
7d24075a26 Docs: Misc docblock corrections and improvements.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@47754 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 19:36:06 +00:00
Timothy Jacobs
ef05acdfaa REST API: Support the uuid JSON Schema format.
This accepts a uuid of any version. A future commit could add support for restricting uuids to a specific version.

Props johnwatkins0.
Fixes #50053.


git-svn-id: https://develop.svn.wordpress.org/trunk@47753 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 19:18:40 +00:00
John Blackbourn
d8371d2134 Build/Test Tools: Further enhancements to the local development environment readme.
Props desrosj, donmhico

See #50058

git-svn-id: https://develop.svn.wordpress.org/trunk@47752 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 14:41:03 +00:00
Andrea Fercia
6e181e8823 File Editor: Remove CSS exceptions for the "Select plugin/theme to edit" and documentation "Look Up" buttons.
Buttons should use the default buttons styles, no exceptions.

Props passoniate, garethgillman.
See #49197.
Fixes #49353.


git-svn-id: https://develop.svn.wordpress.org/trunk@47751 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 14:19:51 +00:00
Andrea Fercia
8f1d4525c2 Upload: Improve file input and button alignment in plugin/theme upload form.
Resets flexbox on smaller screens. Improves vertical alignment on large screens.
Follow-up to [47599] and [47271].

Props mukesh27, DarkoG.
See #48859, #49914.
Fixes #49951.


git-svn-id: https://develop.svn.wordpress.org/trunk@47750 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 13:34:26 +00:00
Sergey Biryukov
5dbed96333 Docs: Further update inline documentation for the wpdb class per the documentation standards.
Restore some previous edits from [46696], [47060], [47122], [47230] that were accidentally reverted in [47740].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47749 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 11:43:14 +00:00
John Blackbourn
84772cc608 Media: Ensure a consistent structure for the array returned by wp_get_attachment_image_src().
The array returned by this function previously included a fourth element only when an intermediate image size was used. This change ensures a consistent structure in the returned array regardless of the function's internal behaviour.

Props wido, joemcgill, johnbillion

Fixes #46113

git-svn-id: https://develop.svn.wordpress.org/trunk@47748 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 22:55:17 +00:00
John Blackbourn
4889e7a8d2 Menus: Allow empty taxonomy terms to be surfaced when searching for items.
This brings the behaviour inline with that of browsing terms or using the All Items tab, which correctly shows empty terms.

Props birgire, audrasjb

Fixes #45298

git-svn-id: https://develop.svn.wordpress.org/trunk@47747 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 22:34:50 +00:00
John Blackbourn
1510f69d69 Upgrade/Install: Unlink the logo on the installation and config setup screens.
This allows for a natural tab order during installation, without negatively impacting users who use the keyboard for navigation, those who use a screen reader, or those who use neither.

Props lwill, afercia, audrasjb.

Fixes #47759

git-svn-id: https://develop.svn.wordpress.org/trunk@47746 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 21:44:48 +00:00
John Blackbourn
8eab1eb9a9 Administration: Reduce the chance that a PHP error message that occurs before the admin menu gets output is covered by the admin menu.
Props EmpireOfLight, afercia, Mte90, audrasjb, sunnyratilal

Fixes #35155

git-svn-id: https://develop.svn.wordpress.org/trunk@47745 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 20:59:31 +00:00
John Blackbourn
d250cbcfee Build/Test Tools: Add information regarding the default credentials for the local development environment to the project readme.
Props bookdude13

Fixes #49273

git-svn-id: https://develop.svn.wordpress.org/trunk@47744 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 20:17:38 +00:00
John Blackbourn
b9f6cf083a Build/Test Tools: Add more comprehensive instructions to the readme for the local development environment.
See #50058

git-svn-id: https://develop.svn.wordpress.org/trunk@47743 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 19:14:24 +00:00
John Blackbourn
578956abf6 Build/Test Tools: Exclude plugins and themes within src.
Just like the `build` directory, `src` can include plugins and themes which shouldn't be linted by PHPCS.

Fixes #49781

git-svn-id: https://develop.svn.wordpress.org/trunk@47742 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 18:15:30 +00:00
John Blackbourn
09e61958b3 Build/Test Tools: Remove unnecessary formatting before linting on Travis CI.
Fixes #49722

git-svn-id: https://develop.svn.wordpress.org/trunk@47741 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 17:44:11 +00:00
John Blackbourn
c570d4409f Docs: Update inline documentation for the wpdb class.
Props theMikeD

Fixes #49477

git-svn-id: https://develop.svn.wordpress.org/trunk@47740 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 17:23:28 +00:00
Dominik Schilling
c09e2d21a7 Users: Don't reset user language preference on user update.
Props johnbillion.
Fixes #38665.

git-svn-id: https://develop.svn.wordpress.org/trunk@47739 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 16:27:34 +00:00
Sergey Biryukov
b7a8094d32 Query: Simplify the logic in WP::handle_404() to allow for easier modifications.
See #45337.

git-svn-id: https://develop.svn.wordpress.org/trunk@47738 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 08:46:39 +00:00
Jonathan Desrosiers
7e0a63f8c5 General: More PHP compatibility adjustments.
In this round:
- Removed references to `safe_mode` in `class-php3.php`. This was removed in PHP 5.4.
- Add inline exclude comments for compatibility checks in getID3.

Follow up of [47735-47736].

See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47737 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 20:10:58 +00:00
Jonathan Desrosiers
627b93f54d General: Fix typo within phpcs:ignore inline comment.
Follow up of [47735].

See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47736 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 19:34:05 +00:00
Jonathan Desrosiers
8e2de8212b General: Fix various issues flagged by the PHPCompatibilityWP PHPCS ruleset.
As part of the continued effort to improve PHP compatibility, the following improvments are being made:

- Removing deprecated PHP `safe_mode` checks not found in bundled external libraries.
- Change the remaining `while` loops using `each()` to `foreach` loops.
- Prevent false positives from being flagged for the `sodium_compat` library being caused by loading this in a non-standard way.
- Add inline comments to not flag deprecated PHP directives in the getID3 library.

Props desrosj, earnjam, dryanpress.
See #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@47735 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 19:05:04 +00:00
Sergey Biryukov
05423578d7 Taxonomy: Restore (un-deprecate) the tag_row_actions filter.
The filter provides a simple way for plugin authors to add actions generically for all taxonomy list tables without looping through each taxonomy individually.

Props joemcgill, delowardev.
Fixes #49808.

git-svn-id: https://develop.svn.wordpress.org/trunk@47734 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 16:43:46 +00:00
Jonathan Desrosiers
d12ad5050b External Libraries: Update the SimplePie library to the latest version (1.5.5).
This brings SimplePie in sync with the most up to date version, 1.5.5.

This update brings many bug fixes, small enhancements, and PHP compatibility fixes for newer versions of PHP.

For a full list of changes, see https://github.com/simplepie/simplepie/blob/master/CHANGELOG.md#155-may-1-2020.

Props dshanske, slushman, etruel, wpshades, dmenard, desrosj, hareesh-pillai, stevenkword, jrf, Ipstenu, johnbillion.
Fixes #36669.

git-svn-id: https://develop.svn.wordpress.org/trunk@47733 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-01 14:24:42 +00:00
Jonathan Desrosiers
aef50f979d Build/Test Tools: Introduce a command for restarting the local Docker environment.
This change introduces the `env:restart` command for easier restarting of the local Docker environment.

Props desrosj, ianbelanger.
Fixes #50039.


git-svn-id: https://develop.svn.wordpress.org/trunk@47730 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 20:20:18 +00:00
Jonathan Desrosiers
13d382f1ff Reverting [47728].
Unprops desrosj.
See #50039.

git-svn-id: https://develop.svn.wordpress.org/trunk@47729 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 20:16:00 +00:00
Jonathan Desrosiers
29563e5721 -username=desrosj
git-svn-id: https://develop.svn.wordpress.org/trunk@47728 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 19:53:02 +00:00
Sergey Biryukov
af596bcc5b Canonical: Redirect paged requests for non-paginated posts to the post permalink.
This avoids displaying duplicate content of the same post under different URLs and ensures the canonical URL is correct.

Previously, requests for invalid page numbers were only redirected to the post permalink if the post was actually paginated using the `<!--nextpage-->` marker.

Follow-up to [34492].

Props jeremyfelt, prografika, sachit.tandukar, subrataemfluence, hronak, ekatherine, henry.wright, chesio, dd32, SergeyBiryukov.
Fixes #40773. See #45337, #28081, #11694.

git-svn-id: https://develop.svn.wordpress.org/trunk@47727 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-30 12:03:11 +00:00
Sergey Biryukov
be8b8baec9 Help/About: Revert [47699] from trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@47706 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:41:12 +00:00
whyisjake
d27a3718d5 Update the about page for WordPress 5.4.1
git-svn-id: https://develop.svn.wordpress.org/trunk@47699 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:35:02 +00:00
Ian Belanger
8ba39ba9f6 Bundled Themes: Twenty Twenty image caption is not aligned center when image is, on the front-end.
Fixes the image caption alignment issue by adding `text-align: center;` to `.wp-block-image .aligncenter figcaption`.

Props markusthiel, SergeyBiryukov, garethgillman.
Fixes #49320.

git-svn-id: https://develop.svn.wordpress.org/trunk@47689 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 18:17:11 +00:00
Sergey Biryukov
c61e42db64 Coding Standards: Fix WPCS issues in tests/formatting/SanitizeFileName.php.
Follow-up to [47638].

git-svn-id: https://develop.svn.wordpress.org/trunk@47664 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 17:23:30 +00:00
Sergey Biryukov
514f7c4cc9 Docs: Correct @since versions, remove duplicate comment.
Follow-up to [47633].

git-svn-id: https://develop.svn.wordpress.org/trunk@47663 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 17:23:21 +00:00
Jake Spurlock
74d6f9613b Formatting: Expand sanitize_file_name to have better support for utf8 characters.
Props: xknown, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@47638 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:38:43 +00:00
Jake Spurlock
935ab39e8e Cache API: Ensure proper escaping around the stats method in the cache API.
Props: nickdaugherty, batmoo, whyisjake, westi.


git-svn-id: https://develop.svn.wordpress.org/trunk@47637 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:34:55 +00:00
Jake Spurlock
ec05c8b897 Block Editor: Coding standards, properly escape class names.
Props: aduth, noisysocks, pento, talldanwp, jorgefilipecosta, whyisjake, ellatrix, ehti.


git-svn-id: https://develop.svn.wordpress.org/trunk@47636 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:32:19 +00:00
Jake Spurlock
8e11facb67 Query: Ensure that only a single post can be returned on date/time based queries.
Props: sstoqnov, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@47635 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:26:56 +00:00
Jake Spurlock
4354d1fc5c User: Invalidate user_activation_key on password update.
Props: sstoqnov, sergeybiryukov.



git-svn-id: https://develop.svn.wordpress.org/trunk@47634 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-29 15:23:37 +00:00