It was found that Template Part blocks were broken in the Site Editor, showing the `Template part has been deleted or is unavailable` message, due to a missing `theme` attribute.
This bug seems to have been introduced by [56896], whose goal was to only inject that attribute into the markup returned by the templates and patterns REST API endpoints but not on the frontend, in order to improve performance. It has been demonstrated locally that reverting that changeset fixes the bug.
Reverts [56896].
Props mmcalister, swisspidy, thelovelist, hellofromTonya, pbiron, Pauthake015, richtabor, nicolefurlan, huzaifaalmesbah, annezazu, kafleg, aegkr, sunitarai, shresthaaman, andraganescu, onemaggie, gziolo.
Fixes#59629.
Built from https://develop.svn.wordpress.org/trunk@56960
git-svn-id: http://core.svn.wordpress.org/trunk@56471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Reverts [56451] to avoid the following issues:
* missing the default `font-size` for anyone who does not use the size control.
* unintentional reduction in citation's `line-height` down to the `--pullquote--line-height` value (1.3 instead of 1.6).
With 6.4 RC1 happening shortly, this revert is necessary to avoid shipping this issues in the release, while giving the time needed to resolve in the next cycle.
Follow-up to [56451].
Props sabernhardt, nicolefurlan.
See #57854.
Built from https://develop.svn.wordpress.org/trunk@56959
git-svn-id: http://core.svn.wordpress.org/trunk@56470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds a global environment variable to the Test old branches workflow to make the supported version more clear and easier to update in the future. This will also make it easier to reference in more places as this workflow grows.
See #58867.
Built from https://develop.svn.wordpress.org/trunk@56955
git-svn-id: http://core.svn.wordpress.org/trunk@56466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `PUPPETEER_SKIP_DOWNLOAD` environment variable is used to prevent Puppeteer from automatically downloading browser binaries.
It was removed in [56926] due to the migration to Playwright. However, because of the QUnit tests, Puppeteer is actually still a dependency.
Until those tests change, we have to keep this environment variable to prevent unnecessary downloads on CI.
Props SergeyBiryukov.
Fixes#59517.
Built from https://develop.svn.wordpress.org/trunk@56954
git-svn-id: http://core.svn.wordpress.org/trunk@56465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When applying updates to HTML, one step was left out in [56941] which updated the position of the end of the current tag. This made it possible to create bookmarks with null or earlier end positions than their start position. This in turn broke the Directive Processor in Gutenberg during the backport of changes from Core into Gutenberg.
In this commit, after applying updates, the HTML document is now scanned fully to the end of the current tag, updating the internal pointer to its end, so that nothing else will be broken or misaligned.
Follow-up to [56941].
Props dmsnell.
Fixes#59643.
Built from https://develop.svn.wordpress.org/trunk@56953
git-svn-id: http://core.svn.wordpress.org/trunk@56464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The required version was previously set to two different values:
* 4.7 in the theme's `functions.php` file.
* 4.9.6 in theme headers, because of the `the_privacy_policy_link()` function usage in `footer.php`.
However, as `the_privacy_policy_link()` call is wrapped in a `function_exists()` check, it does not affect the requirements in practice.
This commit aims to correct the discrepancy by updating theme headers to match the actual required WP version.
Follow-up to [43808], [43892].
Props poena, kafleg, felipeelia, audrasjb, huzaifaalmesbah, shailu25, nicolefurlan, oglekler.
Fixes#59557.
Built from https://develop.svn.wordpress.org/trunk@56952
git-svn-id: http://core.svn.wordpress.org/trunk@56463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Resyncing changes for TT4 into Core.
Changes include:
* Reformatted all the patterns for readability.
* Bugfixes in the markup and improvements on the string translation functions.
* Renaming of some patterns, making them consistent with the content they show and whether they are simple patterns, full-page patterns or patterns meant to replace templates.
Follow-up to [56813], [56764], [56716].
Props richtabor, onemaggie, luminuu, shailu25, dunhakdis, shivashankerbhatta, dajeema, enodekciw, kafleg, viralsampat, glendaviesnz, beafialho, webmandesign, huzaifaalmesbah, gregfuller, benharri.
Fixes#59640.
Built from https://develop.svn.wordpress.org/trunk@56951
git-svn-id: http://core.svn.wordpress.org/trunk@56462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Also includes updates to the contribute, credits, freedom and privacy pages.
Props luminuu, rmartinezduque, estelaris, jorbin, mukesh27, cbringmann, richtabor, annezazu, nudge, ohia, acirujano, elmastudio, cathibosco1, sereedmedia, markoserb, joen. (Also someone named Allison who I am going to guess is Taylor Alison Swift but has no avatar so I will never know)
Built from https://develop.svn.wordpress.org/trunk@56950
git-svn-id: http://core.svn.wordpress.org/trunk@56461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent the saving of invalid timezone string in to the database on the options pages. If an invalid timezone is submitted it is ignored and the setting remains unchanged.
This prevents a warning or fatal (depending on the PHP version) from being thrown by an invalid timezone setting on the Settings > General page.
Props ankit-k-gupta, costdev, huzaifaalmesbah, mrinal013, nicolefurlan, oglekler.
Fixes#58814.
Built from https://develop.svn.wordpress.org/trunk@56949
git-svn-id: http://core.svn.wordpress.org/trunk@56460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This reverts changes from [56648], [56681], [56717], [56762], [56788], [56797], and [56814] to restore the behavior for `update_option()` and `update_network_option()` to their prior state as of 6.3.X due to the discovery of various backwards compatibility issues found late in the 6.4 release cycle.
Props mukesh27, costdev, flixos90, spacedmonkey, snicco, jrf, joemcgill.
See #22192, #59360.
Built from https://develop.svn.wordpress.org/trunk@56946
git-svn-id: http://core.svn.wordpress.org/trunk@56457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The npm packages needed a second part to the update for 6.4 RC1.
Props isabel_brison, andrewserong, jsnajdr, wildworks, joen, mciampini, tyxla, youknowriad, ramonopoly, spacedmonkey, dmsnell, mikachan, kishanjasani, czapla, siobhyb, darerodz, luisherranz
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56945
git-svn-id: http://core.svn.wordpress.org/trunk@56456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`grunt-contrib-qunit` was upgraded from version `7.0.1` to `8.0.1` in [56647]. However, this update causes a strange failure when running the build script for the Gutenberg plugin when checked out within a `wordpress-develop` checkout.
This reverts the related change in [56647] and downgrades the dependency back to `7.0.1` until the exact reason for the failure is narrowed down.
Props afercia, kevin940726, antonvlasenko, desrosj.
See #59634, #58863.
Built from https://develop.svn.wordpress.org/trunk@56944
git-svn-id: http://core.svn.wordpress.org/trunk@56455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After modifying tags in the HTML API, the Tag Processor backs up to before the tag being modified and then re-parses its attributes. This saves on the code complexity involved in applying updates, which have already been transformed to “lexical updates” by the time they are applied.
In order to do that, `::get_updated_html()` called `::next_tag()` to reuse its logic. However, as a public method, subclasses may change the behavior of that method, and the HTML Processor does just this. It maintains an HTML stack of open elements and when the Tag Processor calls this method to re-scan a tag and its attributes, it leads to a broken stack.
This commit replaces the call to `::next_tag()` with a more appropriate reapplication of its internal parsing logic to rescan the tag name and its attributes. Given the limited nature of what's occurring in `::get_updated_html()`, this should bring with it certain guarantees that no HTML structure is being changed (that structure will only be changed by subclasses like the HTML Processor).
Follow-up to [56274], [56702].
Props dmsnell, zieladam, nicolefurlan.
Fixes#59607.
Built from https://develop.svn.wordpress.org/trunk@56941
git-svn-id: http://core.svn.wordpress.org/trunk@56452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Within the details block, style the `summary` element using the default display, `list-item`, this ensures the toggle icon appears indicating the summary can be expanded or contracted.
Props ankit-k-gupta, nicolefurlan, poena, sabernhardt.
Fixes#58915.
Built from https://develop.svn.wordpress.org/trunk@56940
git-svn-id: http://core.svn.wordpress.org/trunk@56451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, a trailing slash was appended to the link returned from `get_pagenum_link()`. If the permalink structure didn't contain a trailing slash, this link could fail.
This change removes trailing slashes and only appends one if the site is set for adding trailing slashes.
This adds a new test file for the accompanying tests, `tests/phpunit/tests/link/getPagenumLink.php`, and moves an existing test for `get_pagenum_link()` to the same file.
Props davemad-davenet, darkfate, Nazgul, scribu, nacin, obenland, chriscct7, jesin, matthewppelsheimer, audrasjb, petitphp, mukesh27, oglekler, mai21, webtechpooja, tejwanihemant, nicolefurlan, hellofromTonya, costdev.
Fixes#2877.
Built from https://develop.svn.wordpress.org/trunk@56939
git-svn-id: http://core.svn.wordpress.org/trunk@56450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Core uses 3 known, named, dynamic properties on the `WP_Text_Diff_Renderer_Table` class:
* `_title`
* `_title_left`
* `_title_right`
When reviewing revisions (within the admin UI), `wp_text_diff()` passes the arguments (without the leading `_`) to a new instance, which raised deprecation notices (see [56354]).
Note: the parent class adds the leading `_` to each of these properties (see [7747]).
The deprecation notices are resolved by declaring each of these known, named, dynamic properties on the class, per the #56034 mitigation strategy. These new properties are not initialized to retain their previous `null` behavior.
Follow-up to [56354], [23506], [7747].
Props wildworks, antonvlasenko, hellofromTonya, ironprogrammer, kafleg, mukesh27, nicolefurlan, presskopp, sabernhardt.
Fixes#59431.
See #58898, #56034.
Built from https://develop.svn.wordpress.org/trunk@56938
git-svn-id: http://core.svn.wordpress.org/trunk@56449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When an admin sends a password reset link to a user (from the Users UI screen), the "finished" UI message:
>Password reset link sent.
is displayed on "finished" and no longer displayed on error.
**What is the change?**
Previously, the conditional (for incrementing the reset counter) checked for a truthy return from `retrieve_password()`. But `retrieve_password()` always returns a truthy state: `true` (meaning "finished") or an instance of `WP_Error`. Thus, checking for a truthy meant the "finished" message was sent on both "finished" and error/failed.
This fix checks for `retrieve_password()` returning `true` to indicate "finished".
**What is displayed on error?**
If `retrieve_password()` returns an instance of `WP_Error`, the following UI message is shown:
>Password reset links sent to 0 users.
The UI messages were not modified by this changeset.
Follow-up to [50129].
Props letraceursnork, prashantbhivsane, audrasjb, costdev, dilipbheda, hareesh-pillai, hellofromTonya, ironprogrammer, huzaifaalmesbah, marybaum, nicolefurlan, oglekler, petitphp, SergeyBiryukov.
Fixes#58407.
Built from https://develop.svn.wordpress.org/trunk@56937
git-svn-id: http://core.svn.wordpress.org/trunk@56448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Instead of displaying the color names, two of the default colors displayed the color code, which was only intended to show when the user has enabled the custom color option in the Customizer.
The reason is that the default value for the option is `false`, and this value is changed to the string `'custom'` if the color option is enabled, and the string `'default'` if the custom color is enabled and then reset to default colors.
This commit adjusts the logic for displaying the color name, to make sure that the string value `'default'` is not compared with `false`, by adding the default value as a parameter to `get_theme_mod( 'primary_color' )`.
Follow-up to [45964].
Props poena, mukesh27, ugyensupport, shailu25, anveshika, harshgajipara, nicolefurlan, syamraj24, balub, vivekawsm.
Fixes#59566.
Built from https://develop.svn.wordpress.org/trunk@56935
git-svn-id: http://core.svn.wordpress.org/trunk@56446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This prevents a performance regression when a blocking script is enqueued in the footer which depends on a delayed script in the `head` (with `async` or `defer`). In order to preserve the execution order, a delayed dependency must fall back to blocking when there is a blocking dependent. But since it was originally delayed (and thus executes similarly to a footer script), it does not need to be in the head and can be moved to the footer. This prevents blocking the critical rendering path.
Props adamsilverstein, westonruter, flixos90.
Fixes#59599.
See #12009.
Built from https://develop.svn.wordpress.org/trunk@56933
git-svn-id: http://core.svn.wordpress.org/trunk@56444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Introduce `wp_enqueue_block_template_skip_link()` to replace `the_block_template_skip_link()`. Add to `wp_enqueue_scripts` action instead of `wp_footer`.
* Keep inline script for skip link in footer.
* Restore original `the_block_template_skip_link()` from 6.3 and move to `deprecated.php`.
* Preserve back-compat for unhooking skip-link by removing `the_block_template_skip_link` from `wp_footer` action.
Follow-up to [56682] and [56687].
Props sabernhardt, plugindevs, westonruter, spacedmonkey.
Fixes#59505.
See #58775.
See #58664.
Built from https://develop.svn.wordpress.org/trunk@56932
git-svn-id: http://core.svn.wordpress.org/trunk@56443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The filter was initially introduced for file replication purposes. Since the returned value is not always used directly, some instances were later converted to an action as part of removing unused variables, and the hook was documented as an action while still being called as a filter in other instances.
This commit aims to correct the discrepancy between the code and the documentation.
Follow-up to [4673], [4817], [4818], [6363], [6551], [13041], [25821], [33154], [33280].
Props Howdy_McGee, nicolefurlan, johnbillion, mhshujon, SergeyBiryukov.
Fixes#57775.
Built from https://develop.svn.wordpress.org/trunk@56929
git-svn-id: http://core.svn.wordpress.org/trunk@56440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As per the migration plan shared last year, this migrates all browser-based tests in WordPress core to use Playwright.
This includes end-to-end, performance, and visual regression tests.
Props swissspidy, mamaduka, kevin940726, bartkalisz, desrosj, adamsilverstein.
Fixes#59517.
Built from https://develop.svn.wordpress.org/trunk@56926
git-svn-id: http://core.svn.wordpress.org/trunk@56437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Move the cache of post parent IDs from the dedicated group `post_parents` to `posts`. This maintains backward compatibility for clearing all post object related data by calling `wp_cache_flush_group( 'posts' )`.
Post parent IDs are now cached with with the prefix `post_parent:` in the `posts` group.
Follow up to [56763].
Props spacedmonkey, joemcgill, peterwilsoncc.
See #59188.
Built from https://develop.svn.wordpress.org/trunk@56925
git-svn-id: http://core.svn.wordpress.org/trunk@56436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Having the patterns registry inject the `theme` attribute into all Template Part blocks inside every pattern was found to negatively impact performance. It turns out that it's only required for the editor (i.e. in the REST API) but not on the frontend; there, it's instead possible to fall back to the currently active theme.
The latter change was made to the Pattern and Template Part blocks in https://github.com/WordPress/gutenberg/pull/55217, which was sync'ed to Core in [56849]. Consequently, this changeset removes `theme` attribute insertion from the frontend.
Props flixos90, gziolo, dmsnell, hellofromtonya.
Fixes#59583.
Built from https://develop.svn.wordpress.org/trunk@56896
git-svn-id: http://core.svn.wordpress.org/trunk@56407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
At screen widths of at least 768px (tablet size), Twenty Nineteen should have a `max-width` and side margins for content in the post editor.
This commit applies that style to the new `.block-editor-iframe__body` class, resolving an issue where full-width blocks had a horizontal scrollbar in the editor iframe.
Props sabernhardt, smit08, nidhidhandhukiya, mukesh27, darshitrajyaguru97, oglekler, poena, shailu25, nicolefurlan.
Fixes#59449.
Built from https://develop.svn.wordpress.org/trunk@56832
git-svn-id: http://core.svn.wordpress.org/trunk@56344 1a063a9b-81f0-0310-95a4-ce76da25c4cd