* Expands the capabilities of `wp_filter_content_tags()` to add the attribute to iframe tags if enabled.
* Modifies the default behavior of `wp_lazy_loading_enabled()` so that it returns `true` for `iframe` tags.
* Introduces a `wp_iframe_tag_add_loading_attr()` function.
* Introduces a `wp_iframe_tag_add_loading_attr` filter.
Like for images, the attribute is only added to iframes which have both `width` and `height` specified (see related #50367).
Props azaozz, flixos90, westonruter.
Fixes#50756.
git-svn-id: https://develop.svn.wordpress.org/trunk@49808 602fd350-edb4-49c9-b593-d223f7449a82
Canonical functions should be used instead of aliases, because aliases can be deprecated or removed withough much notice. See r49193.
Props SergeyBiryukov.
See #51056.
git-svn-id: https://develop.svn.wordpress.org/trunk@49805 602fd350-edb4-49c9-b593-d223f7449a82
When SimplePie parses HTTP headers, it combines multiple values for the same header into a comma-separated string. `WP_SimplePie_File` overrides the parsing, but was leaving them as an array instead.
That lead to a fatal error in PHP 8, because other parts of the codebase ended up passing an array to a function that expected a string.
Props david.binda, litemotiv, inc2734, NicolasKulka, hellofromTonya, mbabker, skithund, SergeyBiryukov, desrosj, timothyblynjacobs.
Fixes#51056. See #51956.
git-svn-id: https://develop.svn.wordpress.org/trunk@49803 602fd350-edb4-49c9-b593-d223f7449a82
Twenty Twenty-One uses PostCSS to convert the custom properties for Internet Explorer. Without a config file, the postcss command does nothing, causing issues in IE. This brings back the config from GitHub, which replaces all custom properties with the default values.
Props t-p, poena.
Fixes#52040.
git-svn-id: https://develop.svn.wordpress.org/trunk@49800 602fd350-edb4-49c9-b593-d223f7449a82
Make both instances of the link translatable, for consistency.
Props engahmeds3ed, justinahinon.
Fixes#52010.
git-svn-id: https://develop.svn.wordpress.org/trunk@49798 602fd350-edb4-49c9-b593-d223f7449a82
In PHPUnit 3.6.x, `exclude` and `file` paths were required to be relative to the checkout root. This changed in PHPUnit 4 when the path requirements were changed require them to be relative to the configuration file.
Since PHPUnit 3.6.x is only used to test on PHP 5.2 in older branches and is no longer supported, these can be safely removed from the configuration file.
See #51802.
git-svn-id: https://develop.svn.wordpress.org/trunk@49796 602fd350-edb4-49c9-b593-d223f7449a82
The block patterns were added in #51099, but the images were not included in the commit. This adds the images to the expected folder.
Props transl8or, mukesh27.
Fixes#51996.
git-svn-id: https://develop.svn.wordpress.org/trunk@49793 602fd350-edb4-49c9-b593-d223f7449a82
The test reporter uses the hidden `.svn` or `.git` directories to determine which changeset to send to WordPress.org along with the test report.
Because the GitHub Action workflow builds and prepares WordPress in a preceding job to share with each test job, the `.git` directory is missing (it is purposefully not included to limit artifact size).
This re-establishes the directory as a checkout of the `wordpress-develop` repository so that test results can be reported correctly.
See #50401.
git-svn-id: https://develop.svn.wordpress.org/trunk@49786 602fd350-edb4-49c9-b593-d223f7449a82
In the current state, the workflows run regardless of the repository context. This results many needless workflow runs that waste resources.
Workflow runs for private repositories are not free (accounts have a finite allotment of minutes for private repositories). This becomes problematic in private repositories that also mirror the WordPress develop repository, as any workflow runs will draw from a user’s or organization’s allotted action minutes.
Without blanket disabling the workflow manually for all event triggers, or modifying the workflow files in the forked/mirrored repository, there is no way to tune when the workflows run.
This change introduces a conditional statement into all GitHub Action workflows that prevents them from running on forked/mirrored repositories that are not `wordpress-develop`, except when a pull request is being submitted to that repository.
The exception to this is the Welcome workflow that posts a helpful message to first time contributors to `wordpress-develop`. This message is specific to this repository, so should only run when a PR is submitted to that repository.
See #50401.
git-svn-id: https://develop.svn.wordpress.org/trunk@49781 602fd350-edb4-49c9-b593-d223f7449a82
These updates result from running `npm install`.
Also, update the version of `grunt-patch-wordpress` in the lock file from `3.0.0` to `3.0.1`.
See #51801.
git-svn-id: https://develop.svn.wordpress.org/trunk@49780 602fd350-edb4-49c9-b593-d223f7449a82
Appveyor was added to Core in [44594] to ensure that NPM and the WordPress build tools continue to work correctly on Windows systems as changes are made. Using an additional service for this was required at the time, TravisCI did not support testing on Windows.
[49162] introduced a GitHub Action workflow that performed the same testing. Since all automated testing is moving to GitHub Actions, using Appveyor is no longer necessary, and it’s preferable to have all automated testing in one location as much as possible.
Props ayeshrajans.
Fixes#51968.
git-svn-id: https://develop.svn.wordpress.org/trunk@49779 602fd350-edb4-49c9-b593-d223f7449a82
Whether App Passwords are being used is a global featurel, not a per-network feature. This fixes issues on Multi Network installs if App Passwords are used on a different network from where they were created.
Props spacedmonkey.
Fixes#51939.
See [49752].
git-svn-id: https://develop.svn.wordpress.org/trunk@49764 602fd350-edb4-49c9-b593-d223f7449a82
The `main` element must not appear as a descendant of the `section` element. Correct markup is the first requirement to make user agents and assistive technologies work properly.
Changes the `<section>` element that was wrapping the `<main>` element to a `<div>`.
Follow-up to [45942] for Twenty Nineteen.
Props albertomake, poena.
Fixes#51944.
}}}
git-svn-id: https://develop.svn.wordpress.org/trunk@49759 602fd350-edb4-49c9-b593-d223f7449a82
Application Passwords uses Basic Authentication to transfer authentication details. If the site is already using Basic Auth, for instance to implement a private staging environment, then the REST API will treat this as an authentication attempt and would end up generating an error for any REST API request.
Now, Application Password authentication will only be attempted if Application Passwords is in use by a site. This is flagged by setting an option whenever an Application Password is created. An upgrade routine is added to set this option if any App Passwords already exist.
Lastly, creating an Application Password will be prevented if the site appears to already be using Basic Authentication.
Props chexwarrior, georgestephanis, adamsilverstein, helen, Clorith, marybaum, TimothyBlynJacobs.
Fixes#51939.
git-svn-id: https://develop.svn.wordpress.org/trunk@49752 602fd350-edb4-49c9-b593-d223f7449a82
This avoids an error on PHP 8 caused by calling `wp_imagecreatetruecolor()` with inputs that aren't numeric, or are less than 0.
Props hellofromtonya, Boniu91, metalandcoffee, SergeyBiryukov.
Fixes#51937.
git-svn-id: https://develop.svn.wordpress.org/trunk@49751 602fd350-edb4-49c9-b593-d223f7449a82
Additionally, rename the variables holding the results of `ANALYZE TABLE` and `OPTIMIZE TABLE` requests, for clarity.
Props mehrshaddarzi.
Fixes#51932.
git-svn-id: https://develop.svn.wordpress.org/trunk@49750 602fd350-edb4-49c9-b593-d223f7449a82
The `date_i18n` function is now used when formatting the dates in PHP instead of `gmdate` which doesn't handle localization properly.
Additionally, we now use a translation to get the date format to use instead of pulling from the `date_format` option which is only supposed to affect the front-end.
Lastly, when passing the date format to the Backbone JS template, we now use `wp_json_encode()` to format the value for JavaScript. This ensures that backslashes are properly preserved which are used by some locales to escape date formatting control characters.
Props pedromendonca, TimothyBlynJacobs, ocean90, hellofromtonya, SergeyBiryukov, antpb.
Fixes#51918.
See [35811].
git-svn-id: https://develop.svn.wordpress.org/trunk@49746 602fd350-edb4-49c9-b593-d223f7449a82
r49212 greatly improved the performance of `get_dirsize()`, but also changed the structure of the data stored in the `dirsize_cache` transient. It stored relative paths instead of absolute ones, and also removed the unnecessary `size` array.
That difference in data structures led to a fatal error in the following environment:
* PHP 8
* Multisite
* A custom `WP_CONTENT_DIR` which is not a child of WP's `ABSPATH` folder (e.g., [https://roots.io/bedrock/ Bedrock])
* The `upload_space_check_disabled` option set to `0`
After upgrading to WP 5.6, the `dirsize_cache` transient still had data in the old format. When `wp-admin.php/index.php` was visited, `get_space_used()` received an `array` instead of an `int`, and tried to divide it by another `int`. PHP 7 would silently cast the arguments to match data types, but [https://wiki.php.net/rfc/arithmetic_operator_type_checks PHP 8 throws a fatal error]:
`Uncaught TypeError: Unsupported operand types: array / int`
`recurse_dirsize()` was using `ABSPATH` to convert the absolute paths to relative ones, but some upload locations are not located under `ABSPATH`. In those cases, `$directory` and `$cache_path` were identical, and that triggered the early return of the old `array`, instead of the expected `int`.
In order to avoid that, this commit restores the absolute paths, but without the `size` array. It also adds a type check when returning cached values. Using absolute paths without `size` has the result of overwriting the old data, so that it matches the new format. The type check and upgrade routine are additional safety measures.
Props peterwilsoncc, janthiel, helen, hellofromtonya, francina, pbiron.
Fixes#51913. See #19879.
git-svn-id: https://develop.svn.wordpress.org/trunk@49744 602fd350-edb4-49c9-b593-d223f7449a82
Previously we returned a `WP_Error` instance saying that the password was not found which is inaccurate.
Props dlh.
Fixes#51922.
git-svn-id: https://develop.svn.wordpress.org/trunk@49739 602fd350-edb4-49c9-b593-d223f7449a82
@wordpress/components: 11.1.2 -> 11.1.3
This fixes an accessibility regression with VoiceOver not announcing the input label or an existing selection in the parent page dropdown under "Page Attributes" in the sidebar.
See https://github.com/WordPress/gutenberg/pull/27431 for more details.
Props isabel_brison, sarahricker, alexstine, kevin940726, talldanwp.
Fixes#51923.
git-svn-id: https://develop.svn.wordpress.org/trunk@49737 602fd350-edb4-49c9-b593-d223f7449a82
This brings some consistency with the same check in `core_upgrade_preamble()` and avoids a PHP warning if `$cur->version` is not set.
Additionally, remove the check for `$cur->url` property, unused since [8595].
Follow-up to [49708], [49709].
Props pbiron, afragen, audrasjb.
Fixes#51892.
git-svn-id: https://develop.svn.wordpress.org/trunk@49736 602fd350-edb4-49c9-b593-d223f7449a82