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.
Built from https://develop.svn.wordpress.org/trunk@50682
git-svn-id: http://core.svn.wordpress.org/trunk@50291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50670
git-svn-id: http://core.svn.wordpress.org/trunk@50282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50659
git-svn-id: http://core.svn.wordpress.org/trunk@50271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50653
git-svn-id: http://core.svn.wordpress.org/trunk@50265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[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.
Built from https://develop.svn.wordpress.org/trunk@50641
git-svn-id: http://core.svn.wordpress.org/trunk@50253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50633
git-svn-id: http://core.svn.wordpress.org/trunk@50245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50631
git-svn-id: http://core.svn.wordpress.org/trunk@50243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50620
git-svn-id: http://core.svn.wordpress.org/trunk@50233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50615
git-svn-id: http://core.svn.wordpress.org/trunk@50228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50614
git-svn-id: http://core.svn.wordpress.org/trunk@50227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50613
git-svn-id: http://core.svn.wordpress.org/trunk@50226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50612
git-svn-id: http://core.svn.wordpress.org/trunk@50225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Because the changes in Twenty Twelve did not impact site look or functionality, version 3.4 of Twenty Twelve was not released in coordination with WordPress 5.7.
This reverts the portion of [50508] relevant to Twenty Twelve, changing the version back to 3.3 so that version 3.4 is not skipped accidentally when there are changes that should be released.
See #52704.
Built from https://develop.svn.wordpress.org/trunk@50596
git-svn-id: http://core.svn.wordpress.org/trunk@50209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since [50441-50442] switched the test workflows to run from `src` instead of `build`, code coverage reporting has stopped working. This was caused by the code coverage configuration continuing to reference `build`. This corrects the configuration so coverage reporting can resume.
This change also introduces the `workflow_dispatch` event to the workflow, which will allow committers to manually run the workflow when desired. For example, to confirm changes to the test suite do not break reporting.
This also adds the `phpunit.xml.dist` and `tests/phpunit/multisite.xml` files to the `paths` list. Since these files are responsible for configuring the test suite and code coverage reporting, any changes to them should verify that no problems were introduced.
Props jrf, johnbillion.
Fixes#52786. See #51734.
Built from https://develop.svn.wordpress.org/trunk@50592
git-svn-id: http://core.svn.wordpress.org/trunk@50205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On TravisCI, old branches still receiving security updates were tested on a regular basis. This ensured tests continued to pass as time passed even if updates were not made to these branches.
On GitHub Actions, there is no interface to configure this (TravisCI had a UI), but there is a `schedule` event that can trigger workflow runs on cron that can be used to accomplish the same thing.
This introduces a workflow file that runs twice a month (on the 1st and 15th) to verify the tests within older branches.
Because the `schedule` event only runs within the primary branch, the appropriate workflows in each old branch will be triggered manually through the `workflow_dispatch` trigger using the GitHub REST API. `workflow_dispatch` will need to be added to all workflows in all old branches in order for the event to dispatch successfully.
Fixes#52653.
Built from https://develop.svn.wordpress.org/trunk@50590
git-svn-id: http://core.svn.wordpress.org/trunk@50203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In the wrapper function `wp_getimagesize()` check if the second parameter was passed before sending it to the PHP function `getimagesize()`.
The PHP function has a different execution path depending on the number of parameters passed, this ensures the wrapper function follows the appropriate path.
Follow up to [50552].
Props azaozz, hellofromtonya, Mista-Flo, peterwilsoncc, rinatkhaziev, RogerTheriault, SergeyBiryukov, terriann, whyisjake.
Fixes#52826.
Built from https://develop.svn.wordpress.org/trunk@50586
git-svn-id: http://core.svn.wordpress.org/trunk@50199 1a063a9b-81f0-0310-95a4-ce76da25c4cd