The purpose of `tests/e2e/specs/gutenberg-plugin.test.js` is to ensure that running the Gutenberg plugin (stable version) on a WordPress `trunk` install doesn't produce any fatals.
The test was introduced in [54913], i.e. it has been around since WP 6.2. It makes sense to have it present on older branches, as the Gutenberg plugin not only supports `trunk`, but also the current stable version of WordPress (i.e. currently 6.5), and one version below (6.4). However, it is not expected to work on any earlier versions beyond that; in practice, it has produced errors on some of those.
This changeset checks the REST API response from the plugin activation request. If it returns an error with error code `plugin_wp_incompatible`, it skips the test.
Props jorbin, johnbillion, swissspidy.
Fixes#60971.
git-svn-id: https://develop.svn.wordpress.org/trunk@58046 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Follow-up to [41047].
Props costdev.
See #60706.
git-svn-id: https://develop.svn.wordpress.org/trunk@58044 602fd350-edb4-49c9-b593-d223f7449a82
Two `@since` PHPDoc fields, and the version argument to one `_deprecated_argument()` incorrectly stated 6.5.1 as the relevant WordPress version where a change was introduced.
This changeset fixes them by setting them to 6.5.3 instead.
Follow-up to [57919].
See #60754.
git-svn-id: https://develop.svn.wordpress.org/trunk@58042 602fd350-edb4-49c9-b593-d223f7449a82
Since [60428] the Tag Processor has been misidentifying single-character
funky comments. It has been asserting that the full token-length for a
funky comment must be at least three characters after the opening (e.g.
`</1>`), but it has been starting to look for the closing `>` after
those same three characters. This means that it has been skipping the
actual close of these funky comments and swallowing up the next syntax
until it finds a `>`, often consuming the next tag in the process.
This patch fixes the detector and restores finding the following token.
Developed in https://github.com/WordPress/wordpress-develop/pull/6412
Discussed in https://core.trac.wordpress.org/ticket/60170
Follow-up to [60428].
Fixes#60170.
Props dmsnell, gziolo, jonsurrell.
git-svn-id: https://develop.svn.wordpress.org/trunk@58040 602fd350-edb4-49c9-b593-d223f7449a82
All assertions in PHPUnit have a `$message` parameter. Setting this parameter allows to distinguish which assertion is failing when a test runs multiple assertions, making debugging of the tests easier.
This optional parameter is now added for `WP_Test_REST_TestCase::assertErrorResponse()`.
Follow-up to [34928], [51478].
Props mykolashlyakhtun, antonvlasenko, swissspidy, SergeyBiryukov.
Fixes#60426.
git-svn-id: https://develop.svn.wordpress.org/trunk@58039 602fd350-edb4-49c9-b593-d223f7449a82
This changesets replaces the "Edit Site" link with "Site Editor" to avoid duplicate link anchors on multisite admin toolbar. The remaining "Edit site" link takes the user to the site editing screen in the network admin area (`network/site-info.php`) while the new "Site Editor" link takes the user to the site editor (`site-editor.php`).
Follow-up to [52158]. See GB27135.
Props johnbillion, sabernhardt, audrasjb, johnjamesjacoby, pratiklondhe.
Fixes#60977.
git-svn-id: https://develop.svn.wordpress.org/trunk@58035 602fd350-edb4-49c9-b593-d223f7449a82
This allows inserting of own blocks into header since the release of the Block Hooks API, specifically after the navigation block.
Props tomjcafferkey, poena, shailu25.
Fixes#60723.
git-svn-id: https://develop.svn.wordpress.org/trunk@58034 602fd350-edb4-49c9-b593-d223f7449a82
This changesets adds a check for `$size_array` values to prevent a potential division by zero.
Follow-up to [57294].
Props jdekhtiar.
Fixes#61054.
See #59352.
git-svn-id: https://develop.svn.wordpress.org/trunk@58033 602fd350-edb4-49c9-b593-d223f7449a82
There were several instances of typo corrections in block patterns. This removes the last sentence for a simpler resolution.
Props sabernhardt.
Fixes#61004.
git-svn-id: https://develop.svn.wordpress.org/trunk@58031 602fd350-edb4-49c9-b593-d223f7449a82
Removes output of base rules for flow and constrained layout types on themes without theme.json.
Props evanltd, poena, isabel_brison, andrewserong, oandregal.
See #60981.
git-svn-id: https://develop.svn.wordpress.org/trunk@58028 602fd350-edb4-49c9-b593-d223f7449a82
This extends the benefits of persistent caching added in [56978] for block theme patterns to sites that are not using a persistent object cache. By default, these caches expire using the value of the `WP_Theme::cache_expiration` property. The transient cache TTL can be overridden using the newly introduced `wp_theme_files_cache_ttl` filter.
Props thekt12, joemcgill, flixos90, peterwilsoncc, spacedmonkey.
See #59600, #59719.
git-svn-id: https://develop.svn.wordpress.org/trunk@58025 602fd350-edb4-49c9-b593-d223f7449a82
This prevents a fatal error if an array is passed instead.
Follow-up to [2876], [4969], [7524], [8701], [25701], [31417], [49109].
Props TimoTijhof.
Fixes#59373.
git-svn-id: https://develop.svn.wordpress.org/trunk@58023 602fd350-edb4-49c9-b593-d223f7449a82
Adds a missing string and some additional validation of paths in the upgrader class.
Follow up to [56992].
Props costdev, jipmoors, karlijnbok, swissspidy, afragen, mukesh27.
Fixes#59712.
git-svn-id: https://develop.svn.wordpress.org/trunk@58022 602fd350-edb4-49c9-b593-d223f7449a82
Remove `target="_blank"` from two links to developer resources on adding the personal data eraser to plugins in the Help info for the privacy screens. Also rectifies differences between the export and erase text for consistency and changes the order of paragraphs.
Props sabernhardt, joedolson.
Fixes#60097.
git-svn-id: https://develop.svn.wordpress.org/trunk@58021 602fd350-edb4-49c9-b593-d223f7449a82
This matches the type expected by the `setcookie()` function for the `$domain` parameter, and resolves a fatal error if `strict_types` is enabled.
Reference: [https://www.php.net/setcookie PHP Manual: setcookie()].
Follow-up to [2725], [6434], [12732], [13062].
Props kmvan, rajinsharwar, jrf, desrosj, Cybr, nicolefurlan, oglekler, hellofromTonya, kirasong, chaion07, mukesh27.
Fixes#46550.
git-svn-id: https://develop.svn.wordpress.org/trunk@58011 602fd350-edb4-49c9-b593-d223f7449a82
In this patch, the test suite from html5lib validates the tree-construction
steps in the HTML Processor to ensure that they are behaving according to the
HTML specification. This suite of tests is also used by the servo project to
test its html5ever package.
A new test module in the HTML API transforms HTML Processor output to match
the expected tree shape from the external tests. For cases where there are
tests validating behaviors of unsupported HTML tags and constructs, the tests
are marked as skipped. As the HTML API continues to expand its own support,
the number of skipped tests will automatically shrink down towards zero.
Additional tests are skipped through the `SKIP_TEST` array in the test runner.
Fixes#60227.
See #58517.
Props azaozz, costdev, dmsnell, hellofromtonya, jonsurrell, jorbin, swisspidy.
git-svn-id: https://develop.svn.wordpress.org/trunk@58010 602fd350-edb4-49c9-b593-d223f7449a82
In PHP 8.4, declaring function or method parameters with a default value of `null` is deprecated if the type is not nullable.
PHP applications are recommended to ''explicitly'' declare the type as nullable. All type declarations that have a default value of `null`, but without declaring `null` in the type declaration, will emit a deprecation notice:
{{{
function test( array $value = null ) {}
}}}
`Deprecated: Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead`
**Recommended Changes**
Change the implicit nullable type declaration to a nullable type declaration, available since PHP 7.1:
{{{#!diff
- function test( string $test = null ) {}
+ function test( ?string $test = null ) {}
}}}
This commit updates the affected instances in core to use a nullable type declaration.
References:
* [https://wiki.php.net/rfc/deprecate-implicitly-nullable-types PHP RFC: Deprecate implicitly nullable parameter types]
* [https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated PHP.Watch: PHP 8.4: Implicitly nullable parameter declarations deprecated]
Follow-up to [28731], [50552], [57337], [57985].
Props ayeshrajans, jrf, audrasjb, jorbin.
Fixes#60786.
git-svn-id: https://develop.svn.wordpress.org/trunk@58009 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the issue where negative values aren't allows in older versions of IE. There is more discussion in another ticket on a wider approach, but for now the decision to commit this was made as an interim solution.
Props mukesh27, SergeyBiryukov, sabernhardt, poena.
Fixes#46771.
git-svn-id: https://develop.svn.wordpress.org/trunk@58005 602fd350-edb4-49c9-b593-d223f7449a82
Now that the Blocks Hooks API is released in 6.4, you might want to insert blocks into header of the theme after the Navigation block. This wraps to allow this.
Props tomjcafferkey, poena, shailu25.
Fixes#60724.
git-svn-id: https://develop.svn.wordpress.org/trunk@58004 602fd350-edb4-49c9-b593-d223f7449a82
This prevents a fatal error on PHP 8 and brings consistency with the other bundled themes.
Follow-up to [47886].
Props josephscott, sabernhardt, poena, nirav7707, devsahadat.
Fixes#60800.
git-svn-id: https://develop.svn.wordpress.org/trunk@57991 602fd350-edb4-49c9-b593-d223f7449a82
While technically only `null`, `WP_User`, or `WP_Error` should be returned from the `authenticate` filter, a plugin might return boolean `false` instead, which would trigger the `authentication_failed` error prior to [57882].
This commit aims to preserve that behavior in case `false` is returned.
Follow-up to [57882].
Props johnbillion.
See #60700.
git-svn-id: https://develop.svn.wordpress.org/trunk@57990 602fd350-edb4-49c9-b593-d223f7449a82
The pullquote block was not showing increase in sizes within the editor. This solves that and allows you to see the change both in the editor and front.
Props nidhidhandhukiya, huzaifaalmesbah.
Fixes#59800.
git-svn-id: https://develop.svn.wordpress.org/trunk@57989 602fd350-edb4-49c9-b593-d223f7449a82
Stop enqueueing polyfills such as `wp-polyfill-inert` (for the `inert` attribute) and `regenerator-runtime` (for generator functions), as they are no longer needed, considering the WordPress project's [https://make.wordpress.org/core/handbook/best-practices/browser-support/ browser support policy].
In addition to that, `wp-polyfill` (essentially `core-js`) is no longer enqueued as a dependency of `react`. This was added in [43903] to ensure compatibility with IE 11, which is no longer supported by WordPress. Developers requiring `wp-polyfill` need to manually add it as a dependency for their scripts.
Props swissspidy, flixos90, adamsilverstein, youknowriad, gziolo.
Fixes#60962.
git-svn-id: https://develop.svn.wordpress.org/trunk@57981 602fd350-edb4-49c9-b593-d223f7449a82
Skip outputting layout rules that reference content and wide sizes CSS variables, if no layout sizes exist in the current `theme.json`.
Props andrewserong.
Fixes#60936.
git-svn-id: https://develop.svn.wordpress.org/trunk@57948 602fd350-edb4-49c9-b593-d223f7449a82
Creating the Home Business pattern was needed to show it on the template replacement flows, but there's no need to use it in the template, and the minor code repetition is better than having to do a an extra pattern replacement.
Follow-up to [https://github.com/WordPress/twentytwentyfour/pull/486 PR #486].
Props onemaggie, youknowriad, poena, afercia.
Fixes#60620.
git-svn-id: https://develop.svn.wordpress.org/trunk@57945 602fd350-edb4-49c9-b593-d223f7449a82
Currently, in blocks themes it's possible to use the ${type}_template_hierarchy filter to alter the template hierarchy. However, those filters are not taken into consideration by the Choose a pattern popup screen that appears when creating a new template in the Site Editor, causing a mismatch between the editor and the frontend.
Props aljullu, mukesh27, ntsekouras, jorgefilipecosta, gziolo.
Fixes#60846.
git-svn-id: https://develop.svn.wordpress.org/trunk@57944 602fd350-edb4-49c9-b593-d223f7449a82
Include the asset version of JavaScript and CSS files when generating the ETag for concatenated assets in `load-scripts.php` and `load-styles.php`. This ensures the ETag is updated as script versions change (for example editor package updates) rather than only when the WordPress version changes.
The `W\` prefix is added to the generated ETag to allow for CDNs and proxy servers modifying the script to add or improve the compression algorithm.
Props azaozz, dav4, ironprogrammer, johnbillion, kkmuffme, monzuralam, peterwilsoncc, sergeybiryukov.
Fixes#58433.
git-svn-id: https://develop.svn.wordpress.org/trunk@57943 602fd350-edb4-49c9-b593-d223f7449a82
The value of `start` is not fully supported by Opera Mini which has 1.01% usage. There is no material change in functionality with this change.
Follow-up to [55919].
Props davidbaumwald, sabernhardt, khokansardar, devsahadat.
Fixes#60876.
git-svn-id: https://develop.svn.wordpress.org/trunk@57933 602fd350-edb4-49c9-b593-d223f7449a82
There was a small typo which was in a string context only visible to translators for the testimonial pattern. This fixes that.
Props shailu25, SergeyBiryukov.
Fixes#60924.
git-svn-id: https://develop.svn.wordpress.org/trunk@57932 602fd350-edb4-49c9-b593-d223f7449a82