Follow up to [59224]. Add CSS to cover usage of the do_accordion_section() function when used in extender contexts outside of the existing WordPress core usage.
Reviewed-by joemcgill, jorbin.
Merges [59772] to 6.7 brnch.
Props mboynes, jorbin, joemcgill, joedolson.
Fixes#62907.
Built from https://develop.svn.wordpress.org/branches/6.7@59779
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Syncs Editor packages for WordPress 6.7.2 RC1. Includes the following PRs:
- PostTitle: exit early when post type doesn't support titles WordPress/gutenberg#67086
- Patterns: receive intermediate responses while unbound request is resolving WordPress/gutenberg#66713WordPress/gutenberg#67244
- Fix: Show Meta Boxes at the bottom of the screen regardless of the current rendering mode WordPress/gutenberg#66508
- [6.7] Zoom in/out to correct location WordPress/gutenberg#66618
- Composite: Restore Hover and Typeahead functionality - Backport to 6.7.2 WordPress/gutenberg#67258
- Interactivity API: fix property modification backport to 6.7.2 WordPress/gutenberg#67259
- Fix unexpected unlock control in block toolbar in non-default editing mode WordPress/gutenberg#67121
- [WP 6.7] Fix meta boxes saving when they’re not present WordPress/gutenberg#67503
- iAPI: Fix the logic path that merges plain objects - Backport to 6.7.2 WordPress/gutenberg#68713
- e2e:fix WP Editor Meta Boxes test WordPress/gutenberg#68886
- Keep meta boxes unsplit from content in device preview https://github.com/WordPress/gutenberg/pull/68902s
- useFocusReturn: Get active element within the iframe when restoring focus WordPress/gutenberg#68060 WordPress/gutenberg#68200
Reviewed-by audrasjb.
Props 0mirka00, ajlende, cbravobernal, czapla, danielpost, darerodz, dpcalhoun, ellatrix, fabiankaegy, get_dave, gziolo, im3dabasia1, jameskoster, jeryj, jonsurrell, jorbin, jsnajdr, mamaduka, mayanktripathi32, mcsf, mt8biz, ndiego, parthvataliya, presstoke, santosguillamot, sathyapulse, tropicalista, tyxla, wildworks, youknowriad.
Fixes#62889.
Built from https://develop.svn.wordpress.org/branches/6.7@59762
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix an issue introduced in [59134] that prevented manual entry of a page number in the pagination input field from navigating pages. Requiring validation of the bulk actions input also impacted other inputs nested in the same form.
Also fixes a pre-existing bug where it was not possible to navigate to page 1 using the input field.
Reviewed by jorbin.
Merges [59727] and [59746] to the 6.7 branch.
Props ffffelix, im3dabasia1, apermo, rishavdutta, joedolson, swissspidy, jorbin, joedolson, tobiasbg, mamaduka.
Fixes#62534.
Built from https://develop.svn.wordpress.org/branches/6.7@59759
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [59224], customizer accordion item HTML structure was changed to include a button element as the interactive control. However, some themes inject custom markup for panel headings.
Fix controls.js to handle both the new markup and the old markup, which is relatively common in themes.
Reviewed by jorbin.
Merges [59555] to the 6.7 branch.
Props paullb, desrosj, sabernhardt, joedolson, jorbin.
Fixes#62494.
Built from https://develop.svn.wordpress.org/branches/6.7@59758
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Break out logic from the next_token() method into a private method which may call itself recursively. This allows for subclasses to override the next_token() method and be assured that each call to next_token() corresponds with the consumption of one single token. This also parallels how WP_HTML_Tag_Processor::next_token() wraps a private base_class_next_token() method.
Reviewed by jonsurrell.
Merges [59285], [59364], and [59747] to 6.7 branch.
Props westonruter, jonsurrell, dmsnell, jorbin.
Built from https://develop.svn.wordpress.org/branches/6.7@59757
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On some instances of Windows, the assertions seem to find additional nodes. As this test is just about verifying that the handlers get called, not about testing the functionality of the handlers, we can adjust the assertion to look for a minimum number of nodes rather than exact number.
Follow-up to [59062].
Reviewed by desrosj.
Merges [59739] to the 6.7 branch.
Props yogeshbhutkar, hellofromTonya, SergeyBiryukov, coquardcyr, jrf, benniledl, desrosj, jorbin.
Fixes#62110. See #62061.
Built from https://develop.svn.wordpress.org/branches/6.7@59745
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ignore the `format` parameter introduced in WordPress 6.7 for post types that do not support post formats. This protects against a fatal error being thrown in later version of PHP or a warning in earlier versions of PHP.
Follow up to r59115.
Reviewed by jorbin.
Merges [59544] to the 6.7 branch.
Props dd32, sergeybiryukov, yogeshbhutkar.
Fixes#62646.
See #62014.
Built from https://develop.svn.wordpress.org/branches/6.7@59744
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Custom post types may contain underscores, however block template registration has been using a regular expression that disallows underscores. Since the block template name for certain templates is directly associated with which post type it applies to, this regular expression was causing unexpected failures. This changeset adjusts the regular expression to allow block template names with underscore characters, effectively allowing block templates to be registered for any custom post type.
Reviewed by jorbin.
Merges [59742] to the 6.7 branch.
Props alexandrebuffet, ankitkumarshah, gaambo, jorbin, karthickmurugan, oglekler, poena, sukhendu2002.
Fixes#62523.
Built from https://develop.svn.wordpress.org/branches/6.7@59743
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In 6.7, [58775] changed the way react and react-dom are bundled in Core. This commit resulted in some changes to the built files that are distributed in WordPress even though the actual version of the libraries remained the same. The result can be a blank white screen when trying to edit a post when those two script files are heavily cached.
This uses `.1` as the appendage to prevent issues with third party code expecting the version number in the form `/^[\d\.]+$/`.
Updates include tests in `Tests_Dependencies_Scripts::test_vendor_script_versions_registered_manually` to include the modified version used for cache busting.
Reviewed by jorbin.
Merges [59536] and [59540] to 6.7 branch.
Props levskipg, get_dave, smerriman, jdnd, juanwp22, seanlanglands, robertstaddon, azaozz, peterwilsoncc, desrosj.
Fixes#62422.
Built from https://develop.svn.wordpress.org/branches/6.7@59741
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset allows for block metadata collections to be registered for almost any source, such as MU plugins, themes, or custom directories with e.g. symlinked plugins or symlinked themes. Prior to the change, block metadata collections could only be registered for plugins and WordPress Core.
There are still safeguards in place to prevent registration of collections in locations that would cause conflicts. For example, it is not possible to register a collection for the entire wp-content/plugins directory or the entire wp-content/themes directory, since such a collection would conflict with any specific plugin's or theme's collection. In case developers would like to enable this safeguard for their own custom directories, they can use the new wp_allowed_block_metadata_collection_roots filter.
Reviewed by jorbin.
Merges [59730] to the 6.7 branch.
Props assassinateur, bowedk, desrosj, dougwollison, flixos90, glynnquelch, gziolo, jorbin, mreishus, swissspidy.
Fixes#62140.
Built from https://develop.svn.wordpress.org/branches/6.7@59731
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the HTML Processor seeks to an earlier place, it returns the the beginning of the document and proceeds forward until it reaches the appropriate location. This requires resetting internal state so that the processor can correctly proceed from the beginning of the document.
The seeking reset logic was not adapted to account for the full processor (i.e. when created via WP_HTML_Processor::create_full_parser()). This change updates the seek logic to account for the full and fragment parsers as well as other state that has been introduced in the interim and should be reset.
Reviewed by westonruter, jorbin.
Merges [59391] to the 6.7 branch.
Props jonsurrell, dmsnell, westonruter, mi5t4n, bernhard-reiter.
Fixes#62290.
Built from https://develop.svn.wordpress.org/branches/6.7@59721
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates `@playwright/test` to the latest version, currently `1.49.1`.
In older branches using Playwright, the E2E and Performance workflows have recently started failing. This is due to changes in the GitHub Actions runner images. Updating Playwright ensures more modern dependency trees are used when installing browsers for testing and fixes the issue.
Merges [59682] to the 6.7 branch.
Props swissspidy.
See #62843.
Built from https://develop.svn.wordpress.org/branches/6.7@59683
git-svn-id: http://core.svn.wordpress.org/branches/6.7@59026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On some screen sizes and languages, the "See everything new" button expands out of the content area. This change allows the button to wrap at all screen sizes, and updates the style of this button for wrapped text.
Reviewed by SergeyBiryukov.
Merges [59580] to the 6.7 branch.
Props franciscabusas22, sabernhardt, yogeshbhutka, sainathpoojary, im3dabasia1, audrasjb.
Fixes#62380.
Built from https://develop.svn.wordpress.org/branches/6.7@59581
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Each theme’s theme.json schema version should be pinned to the version that was valid at the time it was released. This means all JSON files in the theme should be pinned to the appropriate schema version, not just theme.json.
Reviewed by jorbin.
Merges [59448] and [59451] to the 6.7 branch.
Props im3dabasia1, poena, mukesh27, desrosj.
Fixes#62455.
Built from https://develop.svn.wordpress.org/branches/6.7@59546
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove CSS that could occasionally trigger the accordion buttons to be 100% the height of the accordion container.
Reviewed by jorbin.
Merges [59510] to the 6.7 branch.
Props dhewercorus, im3dabasia1, sabernhardt, rvoigt, ghinamt, vishy-moghan, frankbiganski, redkite, joedolson.
Fixes#62491.
Built from https://develop.svn.wordpress.org/branches/6.7@59539
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes a missing "D" in the character list used by strspn to find tag openers, causing tags starting with D to be skipped by the tag processor in some circumstances.
Follow-up to [58613].
Reviewed by desrosj.
Merges [59464] to the 6.7 branch.
Props jonsurrell, santosguillamot, wongjn, cbravobernal.
Fixes#62522.
Built from https://develop.svn.wordpress.org/branches/6.7@59537
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The HTML API `::next_tag` method now performs case-insensitive matching when searching for tags by name. For example, searching for 'DIV' will match both '<div>' and '<DIV>' tags.
Reviewed by desrosj.
Merges [59422] to the 6.7 branch.
Props jonsurrell, dmsnell, czapla.
Fixes#62427.
Built from https://develop.svn.wordpress.org/branches/6.7@59535
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensure that the `$context` arg passed from `update_ignored_hooked_blocks_postmeta` to `apply_block_hooks_to_content` (and from there, to filters such as `hooked_block_types` and `hooked_block`) has the correct type (`WP_Post`).
Filters hooked to `hooked_block_types` etc can typically include checks that conditionally insert a hooked block depending on `$context`. Prior to this changeset, a check like `if ( $context instanceof WP_Post )` would incorrectly fail, as `$context` would be a `stdClass` instance rather han a `WP_Post`. As a consequence, a hooked block inside of a Navigation post object that was modified by the user would not be marked as ignored by `update_ignored_hooked_blocks_postmeta`, and thus be erroneosly re-inserted by the Block Hooks algorithm.
Reviewed by cbravobernal.
Merges [59482] to the 6.7 branch.
Props bernhard-reiter.
Fixes#62639.
Built from https://develop.svn.wordpress.org/branches/6.7@59487
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Based on the user agent stylesheet rules outlined in https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size, images that have `sizes=auto` while applying `width: auto` or `width: fit-content` would be constrained to only 300px width.
This changeset overrides said user agent stylesheet rule with a much larger constraint, to avoid the problem.
Additionally, it introduces a filter `wp_img_tag_add_auto_sizes` which can be used to opt out of the functionality, as an additional measure.
Reviewed by desrosj, joemcgill.
Merges [59415] to the 6.7 branch.
Props joemcgill, flixos90, dooperweb, SirLouen, azaozz, mukesh27, apermo.
Fixes#62413.
See #61847, #62345.
Built from https://develop.svn.wordpress.org/branches/6.7@59435
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improvements were made in 6.7 to ensure that salts stored in the database were primed more efficiently.
The logic added to accomplish this suffered from an edge case where array indexes were unexpectedly missing when `wp_salt()` was called recursively.
Follow up to [58837].
Reviewed by davidbaumwald.
Merges [59427] to the 6.7 branch.
Props juliobox, ankitkumarshah, dilipbheda, johnbillion, joemcgill, desrosj.
Fixes#62424.
Built from https://develop.svn.wordpress.org/branches/6.7@59434
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When `load_*_textdomain()` functions are called after WordPress has already attempted just-in-time loading of translations, nothing happens.
This updates the related logic to retry translation loading when a custom path is set to ensure all translations are available.
Additionally, this also fixes cases where an `en_US.mo` file is provided with non-English strings to override the default language.
Follow up to [59157].
Reviewed by SergeyBiryukov.
Merges [59430] to the 6.7 branch.
Props swissspidy, peterwilsoncc, desrosj, apermo, sergeybiryukov, wildworks, tigriweb, twvania, looswebstudio, stimul, audrasjb, finntown, bluantinoo, timwhitlock, albigdd.
See #62337.
Built from https://develop.svn.wordpress.org/branches/6.7@59433
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes:
* Moving the comments directly above `wp.i18n._x()` so that they can be picked up properly.
* Simplifying the context to avoid unnecessarily translating the string twice for the same use case.
* Using the established translator comments format for consistency.
Follow-up to [59428].
Reviewed by SergeyBiryukov, desrosj.
Merges [59431 to the 6.7 branch.
Fixes#62402.
Built from https://develop.svn.wordpress.org/branches/6.7@59432
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [59138], the login screens were updated to change the `h1` heading from the logo to screen-reader hidden text. Along with that HTML change, we changed the CSS selectors from `.login h1` to `.login .wp-login-logo`. This unnecessary change increased specificity and broke the CSS selectors used by a wide variety of plugins to replace the login logo.
Commit reverts the change in selector back to using the `.login h1` pattern.
Reviewed by joedolson, desrosj.
Merges [59424] to the 6.7 branch.
Props leecollings, sabernhardt, im3dabasia1, roytanck, sailpete, joedolson.
Fixes#62410.
Built from https://develop.svn.wordpress.org/branches/6.7@59429
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Wrap three untranslatable strings in nav menus in JS translation functions.
Follow up to [59265].
Reviewed by desrosj, joedolson.
Merges 59426 to the 6.7 branch.
Props juliemoynat, swissspidy, yogeshbhutkar, sergeybiryukov, desrosj, tobifjellner, audrasjb, joedolson.
Fixes#62402.
Built from https://develop.svn.wordpress.org/branches/6.7@59428
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Support for uploading AVIF was added in [57524]. A new block of conditional logic was added determine which function should be used to create the new image file that resulted in these expensive functions being run twice.
This combines the two conditional logic to ensure the appropriate function is only run once regardless of format.
Reviewed by adamsilverstein.
Merges [59413] to the 6.7 branch.
Props adamsilverstein, glynnquelch.
Fixes#62331.
Built from https://develop.svn.wordpress.org/branches/6.7@59423
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adjust some CSS characteristics in the customizer accordions to avoid a slight horizontal scroll, allow the chevron icon to be part of the clickable control surface, and resolve a pre-existing padding issue allowing overflow on accordion headings.
Follow up to [59224].
Reviewed by desrosj, joedolson.
Merges [59409] to the 6.7 branch.
Props laurelfulford, wildworks, domainsupport, sabernhardt, rcreators, desrosj, sainathpoojary.
Fixes#62313, #62335.
Built from https://develop.svn.wordpress.org/branches/6.7@59420
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Changeset [59399] fixed missing DOCTYPEs in normalized HTML output. It missed an edge case where public and system identifiers may contain double quotes, in which case they must be quoted with single quotes.
This commit addresses that issue and adds tests.
Follow-up to [59399].
Reviewed by cbravobernal.
Merges [59410] to the 6.7 branch.
Props jonsurrell, luisherranz, apermo.
Fixes#62396.
Built from https://develop.svn.wordpress.org/branches/6.7@59411
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Aligns on the behavior of the negation operator with directives to missing paths in client and in server.
With a directive like the following:
{{{
<div data-wp-bind--hidden="!state.missing.property">
This should be hidden by the <code>hidden</code> attribute.
</div>
}}}
Both server and client will return with this fix:
{{{
<div data-wp-bind--hidden="!state.missing.property" hidden="">
This should be hidden by the <code>hidden</code> attribute.
</div>
}}}
Reviewed by cbravobernal.
Merges [59398] to the 6.7 branch.
Props jonsurrell, luisherranz.
Fixes#62374.
Built from https://develop.svn.wordpress.org/branches/6.7@59404
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Output DOCTYPE when calling `WP_HTML_Processor::serialize` on a full document that includes a DOCTYPE.
The DOCTYPE should be included in the serialized/normalized HTML output as it has an impact in how the document is handled, in particular whether the document should be handled in quirks or no-quirks mode.
This only affects the serialization of full parsers at this time because DOCTYPE tokens are currently ignored in all possible fragments. The omission of the DOCTYPE is subtle but can change the serialized document's quirks/no-quirks mode.
Reviewed by cbravobernal.
Merges [59399] to the 6.7 branch.
Props jonsurrell.
Fixes#62396.
Built from https://develop.svn.wordpress.org/branches/6.7@59401
git-svn-id: http://core.svn.wordpress.org/branches/6.7@58787 1a063a9b-81f0-0310-95a4-ce76da25c4cd