43621 Commits

Author SHA1 Message Date
Dominik Schilling
87fc38e588 Build/Test Tools: Remove remaining Travis CI references.
* Remove `travis:` tasks in Gruntfile.js.
* Remove status badge in README.md that comes from Travis CI via shields.io.
* Remove Travis CI related skipping in the `WP_UnitTestCase_Base::skipOnAutomatedBranches()` test method and related Docker environment variables.

Props johnbillion, SergeyBiryukov, ocean90.
See #52161.
Fixes #52666.

git-svn-id: https://develop.svn.wordpress.org/trunk@50697 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-10 12:05:50 +00:00
Sergey Biryukov
b394d5a7cf Coding Standards: Give a variable in wp-admin/themes.php a more meaningful name.
Follow-up to [20029].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50696 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-10 11:59:19 +00:00
Rachel Baker
a7d053801d REST API: Move the rest_jsonp_enabled filter before setting the Content-Type header.
Fixes an issue where if JSONP was disabled the `Content-Type` HTTP header was still set to `application/javascript`.  

Props dd32, TimothyBlynJacobs.
Fixes #52691.

git-svn-id: https://develop.svn.wordpress.org/trunk@50695 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-09 21:26:07 +00:00
Sergey Biryukov
234c2b52cc Themes: Remove unused code fragment from wp-admin/themes.php.
Follow-up to [25666], [26141].

Props mukesh27, rkradadiya.
Fixes #53005.

git-svn-id: https://develop.svn.wordpress.org/trunk@50694 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-09 11:47:46 +00:00
Sergey Biryukov
c00ba50d59 Editor: Use a consistent way to retrieve post ID on Edit Post screens.
Props mukesh27, ravipatel, davidbaumwald.
Fixes #52995.

git-svn-id: https://develop.svn.wordpress.org/trunk@50693 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-09 11:29:58 +00:00
Sergey Biryukov
4e5569ddd3 Coding Standards: Remove unnecessary unset() calls in WP_Importer methods.
Variables created within the scope of a function are discarded automatically when PHP leaves the scope of the function, i.e. on `return`, so doing a call to `unset()` straight before a `return` statement is redundant.

Props jrf, ravipatel, rachelbaker, mukesh27.
Fixes #52996.

git-svn-id: https://develop.svn.wordpress.org/trunk@50692 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-08 11:10:16 +00:00
Sergey Biryukov
ab3dbadec4 Coding Standards: Use strict comparison in wp-admin/includes/dashboard.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50689 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 18:32:01 +00:00
Kelly Choyce-Dwan
d198f25c13 Accessibility: Administration: Update various background colors for increased contrast.
This ensures that contrast between text color and background meets the WCAG 2.0 AA recommended value. The following locations were changed:

- Network List Tables: Use lighter background colors for site status indicator.
- Nav Menus: Use a lighter background color for invalid menu items.
- Pointers: Use a darker background for pointer header.
- Themes: Use darker background on filter button hover.
- Customizer: Use darker background for selected widget.

Follow-up to [50025], [50571].
Props kebbet, melchoyce, peterwilsoncc.
Fixes #52760.



git-svn-id: https://develop.svn.wordpress.org/trunk@50687 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 16:36:16 +00:00
Greg Ziółkowski
0a00e3d522 Editor: Ensure @wordpress/inteface package is listed as a dependency
Discovered when backporting changes for WordPress 5.7.1 release.

See #52991.




git-svn-id: https://develop.svn.wordpress.org/trunk@50686 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 11:37:35 +00:00
Greg Ziółkowski
d71ed075e4 Build Tools: Update development dependencies from WP packages
This patch updates only development dependencies for WordPress packages to align better with the Gutenberg plugin.

See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50685 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 11:13:04 +00:00
Peter Wilson
feab4b3d51 Build tools: Revert package-lock.json change in [50682].
See #52768.


git-svn-id: https://develop.svn.wordpress.org/trunk@50683 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 01:32:21 +00:00
Peter Wilson
260f13ab57 Media: Do not lazy load hidden images or embeds.
Improve the check for sourceless or dimensionless media when determining if the lazy loading attribute should be added to iframes and images. Never include the lazy loading attribute on embeds of WordPress posts as the iframe is initially hidden.

Including `loading="lazy"` on initially hidden iframes and images can prevent the media from loading in some browsers.

Props adamsilverstein, fabianpimminger, flixos90, johnbillion, jonkastonka, joyously, peterwilsoncc, SergeyBiryukov, SirStuey, swissspidy.
Fixes #52768.



git-svn-id: https://develop.svn.wordpress.org/trunk@50682 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 00:59:18 +00:00
Sergey Biryukov
924343c8fc Login and Registration: Check if $_GET['login'] is set before using it in wp-login.php.
This avoids an "Undefined index" PHP notice displayed as part of password reset process if `$_GET['key']` is set, but `$_GET['login']` is not.

Props satrancali.
Fixes #52980.

git-svn-id: https://develop.svn.wordpress.org/trunk@50677 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 18:37:06 +00:00
Jonathan Desrosiers
4286a87407 Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.
The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every `push` event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Fixes #52983.

git-svn-id: https://develop.svn.wordpress.org/trunk@50670 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 15:12:19 +00:00
Jonathan Desrosiers
715c5db575 Bundled Themes: Update the “Tested up to” value.
“Tested up to” is not displayed on the theme directory or within the WordPress dashboard, but should be updated to be accurate for anyone reading the theme’s source code.

Follow up to [50508].

Fixes #52859.

git-svn-id: https://develop.svn.wordpress.org/trunk@50669 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:41:35 +00:00
Jonathan Desrosiers
aac005ccdf Build/Test Tools: Update some dependencies.
This updates `elliptic` to version `6.5.4` through `npm audit fix`.

`uglify-js` is also updated to version `3.13.3`, and `grunt-contrib-uglify` to version `5.0.1`.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50668 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:29:06 +00:00
Jonathan Desrosiers
57db16646b Twenty Twenty-One: Rebuild IE specific editor stylesheet.
This was not updated to include the changes from [50493].

Fixes #52981. See #52702.

git-svn-id: https://develop.svn.wordpress.org/trunk@50667 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:10:17 +00:00
Jonathan Desrosiers
5a49965d1b Build/Test Tools: Update dependencies in default themes.
This updates several dependencies in the Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One default themes.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50666 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:05:30 +00:00
Sergey Biryukov
6b8d5df24e Coding Standards: Use strict comparison in wp-admin/includes/credits.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50665 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 13:45:47 +00:00
Sergey Biryukov
4ca1ee8c0e Coding Standards: Use strict comparison in wp-admin/includes/comment.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50664 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 13:43:56 +00:00
Peter Wilson
02e9222e2e Options, Meta APIs: Update default color scheme swatch to match CSS changes.
Update the default/fresh theme color swatch displayed on user profile pages to match CSS changes made during the 5.7 release cycle.

Props audrasjb, desrosj, ninetyninew, ryelle.
Fixes #52750.



git-svn-id: https://develop.svn.wordpress.org/trunk@50663 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 05:42:50 +00:00
Peter Wilson
c4eddfdfed Site Health: Reduce false reports of HTTPS failures.
Reduce severity of failing HTTPS tests from critical to warning. Stop reporting failures if the site is being accessed over HTTPS but `wp_is_https_supported()` indicates a lack of support.

Props annalamprou, AnotherDave, ayeshrajans, bobbingwide, Clorith, dragongate, eatsleepcode, gab81, geoffrey1963, Ipstenu, k3nsai, mmuyskens, nicegamer7, peterwilsoncc, pwallner, SergeyBiryukov, TimothyBlynJacobs, Toru.
Fixes #52783.


git-svn-id: https://develop.svn.wordpress.org/trunk@50659 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 03:22:08 +00:00
Sergey Biryukov
868081ff3a Coding Standards: Give some variables in WP_Importer a more meaningful name.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50658 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-05 10:48:11 +00:00
Sergey Biryukov
b0f74b74a5 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-filesystem-*.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50657 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-05 10:36:17 +00:00
Sergey Biryukov
906d5cd908 Coding Standards: Move some translator comments to the correct place.
Follow-up to [46273], [50060], [50117].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50654 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-04 18:28:59 +00:00
Sergey Biryukov
19ae5a9809 REST API: Correct enum validation for numeric values.
When validating `enum` values as `integer` or `number`, consider a number with a zero fractional part to be equivalent to an integer of the same value.

In `rest_are_values_equal()`, when comparing two values of type `int` or `float` (in any combination), first cast both of them to `float` and then compare.

This matches some test cases from the official JSON Schema test suite.

Follow-up to [50010].

Props yakimun, stefanjoebstl, TimothyBlynJacobs, rachelbaker.
Fixes #52932.

git-svn-id: https://develop.svn.wordpress.org/trunk@50653 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-04 18:05:10 +00:00
Sergey Biryukov
0f4d1d674c Coding Standards: Use strict comparison in wp-admin/includes/class-core-upgrader.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50652 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-04 16:47:48 +00:00
Sergey Biryukov
9c0944fa85 Build/Test Tools: Rename some Grunt tasks to use hyphens instead of camelCase.
This makes the task names more consistent with other tasks.

Follow-up to [41043], [48096], [50650].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50651 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-03 12:44:38 +00:00
David Baumwald
44a066fa57 External Libraries: Update Underscore to version 1.12.1.
Full set of changes at https://github.com/jashkenas/underscore/compare/1.8.3...1.12.1.  
The new version includes a `sourceMappingURL` that causes a build failure, so this change 
also introduces a task to remove this from the source during the build.

Props mukesh27, hareesh-pillai, desrosj, SergeyBiryukov, TimoTijhof.
Fixes #45785.

git-svn-id: https://develop.svn.wordpress.org/trunk@50650 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-02 19:40:43 +00:00
Jonathan Desrosiers
2d8ba7b566 Build/Test Tools: Prevent the workflow for testing old branches from running on forks.
This adds a conditional statement to ensure the workflow that tests old branches only runs on the official `wordpress-develop` mirror. This prevents it from running on forks and private mirrors.

See #52653.

git-svn-id: https://develop.svn.wordpress.org/trunk@50648 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-02 16:20:24 +00:00
David Baumwald
57a7ad689b Editor: Update the default writing prompt to match the block editor.
Recently merged, https://github.com/WordPress/gutenberg/pull/29611, changed the default writing prompt text.  WordPress core offers the `write_your_story` filter with a default value using the same text.  This change updates the default text to match the recent change in the block editor.

Props Joen, SergeyBiryukov.
Fixes #52948.

git-svn-id: https://develop.svn.wordpress.org/trunk@50647 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-02 16:06:37 +00:00
David Baumwald
3bb06ce10b Docs: Clarify return results for a non-existing ID in metadata functions.
[48658] documented that various metadata functions return false for an invalid ID. However, that does not clarify what an invalid ID is: a non-numeric, zero, or negative value. This change adds the clarification in all relevant metadata function docblocks.

Props icopydoc, SergeyBiryukov, davidkryzaniak, audrasjb.
Fixes #51797.

git-svn-id: https://develop.svn.wordpress.org/trunk@50641 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-02 15:47:34 +00:00
Sergey Biryukov
e80e9c4acb KSES: Add object-position to the list of safe CSS properties.
This resolves an issue with the Cover block, where the `object-position` property is removed from the content when a non-admin user saves the post, leading to block recovery loop.

Props Mamaduka, aristath.
Fixes #52961.

git-svn-id: https://develop.svn.wordpress.org/trunk@50634 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-02 12:39:57 +00:00
David Baumwald
a58e7e7ca8 Build/Test Tools: Cleanup link-manager.zip after REST API tests are finished.
Introduced in [48242], the `link-manager` plugin is copied from `DIR_TESTDATA/plugins` to `DIR_TESTDATA` during the REST API unit tests, but was not cleaned up afterward.  This created a "dirty" local working copy.  This change `unlink`s the copied plugin from `DIR_TESTDATA` after unit tests are completed.

Props johnbillion, TimothyBlynJacobs, desrosj, rachelbaker.
Fixes #52579.

git-svn-id: https://develop.svn.wordpress.org/trunk@50633 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-01 20:39:56 +00:00
David Baumwald
22e2fce903 Coding Standards: Remove some extra whitespace in get_item_schema.
Introduced in [50527].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50632 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-01 15:52:35 +00:00
David Baumwald
4cb15f9e78 Coding Standards: Removing unnecessary parentheses from require_once in wp-admin/options-privacy.php.
In [47198], parentheses were removed from `include` and `require` statements, as they are language constructs, not function calls.  However, [50161] introduced a new `require_once` instance in `wp-admin/options-privacy.php`.  This change removes the unnecessary parentheses.

See #53627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50631 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-01 15:34:32 +00:00
Sergey Biryukov
58f6acdd33 Editor: Consolidate enqueueing block editor assets in wp-includes/default-filters.php.
Follow-up to [44157], [46111], [48537], [50620].

See #52920.

git-svn-id: https://develop.svn.wordpress.org/trunk@50629 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-01 11:44:54 +00:00
Dominik Schilling
2a58c2a56b External Libraries: Upgrade PHPMailer from 6.3.0 to 6.4.0.
6.4.0 reverts a change that made the `mail()` and sendmail transports set the envelope sender if one isn't explicitly provided, as it was causing problems in specific PHP/server configurations.

Release post: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.4.0
Changelog: https://github.com/PHPMailer/PHPMailer/compare/v6.3.0...v6.4.0

Props Synchro, tigertech, ayeshrajans, galbaras, audrasjb, SergeyBiryukov, desrosj, ocean90.
Fixes #52822.

git-svn-id: https://develop.svn.wordpress.org/trunk@50628 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-31 21:28:10 +00:00
Aaron Jorbin
dbb719f8b4 Build/Test & External Libraries : Fix jQuery deprecation.
jQuery.isArray is deprecated. Array.isArray is safe and used in other parts of the code base.

See: #51812


git-svn-id: https://develop.svn.wordpress.org/trunk@50627 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-31 20:27:06 +00:00
Sergey Biryukov
f7d5b2bca6 Docs: Document the import_id parameter of wp_insert_post().
Follow-up to [9100].

Props donmhico.
Fixes #52943.

git-svn-id: https://develop.svn.wordpress.org/trunk@50621 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-31 13:03:54 +00:00
Greg Ziółkowski
0df28171ed Editor: Enqueue assets for format library for the block editor
Ensures that `wp-format-library` assets are always loaded for the block editor. Otherwise, they have to be loaded individually for every screen that needs it. It's similar to how `wp-block-directory` assets are handled.

Props ellatrix.
See #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50620 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-31 05:50:50 +00:00
Jonathan Desrosiers
234c477159 External Libraries: Update polyfill versions in the script loader.
Follow up to [50615, 50617].

See #52854.

git-svn-id: https://develop.svn.wordpress.org/trunk@50619 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 17:55:05 +00:00
Sergey Biryukov
4a8aefaf72 Coding Standards: Remove some extra whitespace in _wp_translate_postdata().
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50618 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 15:17:05 +00:00
Jonathan Desrosiers
ac322e8d70 External Libraries: Update the path to polyfill-library files in Webpack.
Follow up to [50615].

Props gziolo.
Fixes #52854.

git-svn-id: https://develop.svn.wordpress.org/trunk@50617 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 14:47:04 +00:00
Sergey Biryukov
722ce44ead Docs: Add documentation for the ::setup_export_contents_test method used in personal data export tests.
Follow-up to [50613].

Props hellofromTonya.
See #51423.

git-svn-id: https://develop.svn.wordpress.org/trunk@50616 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 14:22:48 +00:00
Jonathan Desrosiers
04ff8f4561 External Libraries: Update several polyfill libraries.
This updates the following polyfill libraries:

- `formdata-polyfill` from `3.0.13` to `3.0.20`.
- `objectFitPolyfill` from `2.3.4` to `2.3.5`.
- `polyfill-library` from `3.42.0` to `3.104.0`.

Props gziolo, desrosj.
Fixes #52854.

git-svn-id: https://develop.svn.wordpress.org/trunk@50615 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 14:14:57 +00:00
David Baumwald
32e8cd1c2d Docs: Fix indentation for wp_term_query->construct method parameters.
The `fields` and `orderby` properties in `WP_Term_Query` are arrays and each accepts a variety of keys.  To properly indent each key in the docblock, a `*` should be used, not `-`.

Props whyisjake, audrasjb, SergeyBiryukov.
Fixes #52839.

git-svn-id: https://develop.svn.wordpress.org/trunk@50614 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-29 21:33:32 +00:00
Sergey Biryukov
1dafd53d20 Code Modernization: Check if the _export_data_grouped post meta is an array when generating a personal data export file.
This avoids a fatal error on PHP 8 in `wp_privacy_generate_personal_data_export_file()` if the `_export_data_grouped` post meta exists but is not an array.

Additionally, refactor unit tests for the function to:
* Reduce redundant code
* Switch to data provider
* Test on the full HTML output instead of select pieces of the output
* Expand unhappy path coverage

Follow-up to [43012], [44786], [47146], [47278].

Props hellofromTonya, jrf, xknown.
See #51423.

git-svn-id: https://develop.svn.wordpress.org/trunk@50613 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-29 19:35:36 +00:00
Sergey Biryukov
74162c8c39 Build/Test Tools: Remove explicit puppeteer dependency.
This was added in [48177] to fix an issue where Puppeteer was not being installed correctly as a dependency of `@wordpress/wp-scripts`. This has been fixed, so this explicit dependency can be removed.

Props isabel_brison, desrosj, SergeyBiryukov.
Fixes #52843.

git-svn-id: https://develop.svn.wordpress.org/trunk@50612 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-29 18:05:47 +00:00
Sergey Biryukov
6b8b57dfbb Login and Registration: Add the "Error:" prefix to some password reset messages.
This makes the messages more consistent with other error messages related to authentication and registration.

Follow-up to [50589].

Props dd32.
Fixes #52914.

git-svn-id: https://develop.svn.wordpress.org/trunk@50611 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-28 10:22:10 +00:00