Adds a filter to move the duotone classname to the outer wrapper on aligned images.
Props scruffian, isabel_brison, ajlende.
Fixes#61271.
git-svn-id: https://develop.svn.wordpress.org/trunk@58313 602fd350-edb4-49c9-b593-d223f7449a82
Checks if `__experimentalSkipSerialization` is set and returns early from `wp_apply_shadow_support` if so.
Props colind, madhudollu, aaronrobertshaw, vcanales, isabel_brison, swissspidy, youknowriad.
Fixes#60784.
git-svn-id: https://develop.svn.wordpress.org/trunk@58312 602fd350-edb4-49c9-b593-d223f7449a82
The `WP_Style_Engine` class has a method `get_classnames` that builds classnames. It loops over an array to add each classname. This changeset adds a `continue` in the loop after adding the default classname.
Syncs changes from https://github.com/WordPress/gutenberg/pull/60153
Props ramonopoly.
Fixes#60847.
git-svn-id: https://develop.svn.wordpress.org/trunk@58311 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds a check in Site Health to display whether the fonts directory is writable or not.
Follow-up to [58299].
Props ironprogrammer.
Fixes#60719.
git-svn-id: https://develop.svn.wordpress.org/trunk@58310 602fd350-edb4-49c9-b593-d223f7449a82
[58139] introduced debugging flags to ensure debugging output would only be shown when both the `WP_DEBUG` and `WP_DEBUG_LOG` constants are defined as true. However, some of the flags incorrectly use `WP_DEBUG_DISPLAY` rather than `WP_DEBUG_LOG`.
This fixes the flags to consistently use `WP_DEBUG` and `WP_DEBUG_LOG` as intended.
Follow-up to [58128], [58139].
Props rogermedia, afragen, swissspidy, costdev.
Fixes#58281.
git-svn-id: https://develop.svn.wordpress.org/trunk@58309 602fd350-edb4-49c9-b593-d223f7449a82
The Rollback Auto-Update feature introduced additional maintenance mode toggling.
After installing WordPress in a non-English (US) language, translation updates are performed automatically. As there may be a large number of updates for Core and bundled themes, users will be presented with a maintenance notice upon visiting the newly installed website.
To avoid concerning users that the website has failed to install correctly, this excludes translation updates from triggering the additional maintenance mode toggling.
Follow-up to [58128].
Props benniledl, afragen, rajinsharwar, costdev.
Fixes#61260. See #58281.
git-svn-id: https://develop.svn.wordpress.org/trunk@58308 602fd350-edb4-49c9-b593-d223f7449a82
Change the edit menu item toggle to communicate more context about the item to be edited. Make edit text consistent between Customizer menu editor and admin menu editor.
The menu position is conveyed only visually, using indentation, because there are no organizational semantics in either editor. This change helps provide screen reader users with consistent contextual information about the order, position, and parent of the current item.
Props joedolson, rcreators, afercia, mohonchandra.
Fixes#60673, See #60672.
git-svn-id: https://develop.svn.wordpress.org/trunk@58306 602fd350-edb4-49c9-b593-d223f7449a82
Fix an issue where the GD image library falsely reports supporting the AVIF format, when support is actually missing. Add an additional function check to ensure AVIF support is really available.
Props niktat, adamsilverstein.
Fixes#60910
git-svn-id: https://develop.svn.wordpress.org/trunk@58305 602fd350-edb4-49c9-b593-d223f7449a82
HTML is a kind of short-hand for a DOM structure. This means that there are
many cases in HTML where an element's opening tag or closing tag is missing (or
both). This is because many of the parsing rules imply creating elements in the
DOM which may not exist in the text of the HTML.
The HTML Processor, being the higher-level counterpart to the Tag Processor, is
already aware of these nodes, but since it's inception has not paused on them
when scanning through a document. Instead, these are visible when pausing on a
child of such an element, but otherwise not seen.
In this patch the HTML Processor starts exposing those implicitly-created nodes,
including opening tags, and closing tags, that aren't foudn in the text content
of the HTML input document.
Previously, the sequence of matched tokens when scanning with
`WP_HTML_Processor::next_token()` would depend on how the HTML document was written,
but with this patch, all semantically equal HTML documents will parse and scan in
the same exact manner, presenting an idealized or "perfect" view of the document
the same way as would occur when traversing a DOM in a browser.
Developed in https://github.com/WordPress/wordpress-develop/pull/6348
Discussed in https://core.trac.wordpress.org/ticket/61348
Props audrasjb, dmsnell, gziolo, jonsurrell.
Fixes#61348.
git-svn-id: https://develop.svn.wordpress.org/trunk@58304 602fd350-edb4-49c9-b593-d223f7449a82
Just like Site Health lists the paths to the plugins/themes/uploads directories, this changeset adds the path to the fonts directory (and its size).
Props swissspidy, andr3ribeiro, krupajnanda, ironprogrammer, iamfarhan09, naeemhaque, imasikur22, tofajjal02, sarkarripon, prottoysarkar, zunaid321, imranhasanraaz, rajinsharwar, nazmul111, audrasjb, peterwilsoncc.
Fixes#60719.
git-svn-id: https://develop.svn.wordpress.org/trunk@58299 602fd350-edb4-49c9-b593-d223f7449a82
This changeset modifies the block bindings HTML replacement logic to use a hardcoded list of selectors based on the block and a regex to substitute the inner content. The previous logic was too complex because the HTML API does not support CSS selectors yet and it does not have an official way to modify the inner HTML. This made it difficult to understand, iterate on it and add new functionalities.
As it will be solved in the future once the HTML API is ready, it is better for now to keep a simple hardcoded version that is easier to understand and iterate on.
Props santosguillamot, gziolo, petitphp.
Fixes#61351.
git-svn-id: https://develop.svn.wordpress.org/trunk@58298 602fd350-edb4-49c9-b593-d223f7449a82
This changeset restores "Edit site" on the block editor link and replaces the multisite link with "Manage Site".
Follow-up to [58035].
Props annezazu, johnbillion, Joen, audrasjb, johnjamesjacoby, oglekler, nilovelez, tobifjellner, sabernhardt, pavanpatil1, hitendra-chopda.
Fixes#60977.
git-svn-id: https://develop.svn.wordpress.org/trunk@58296 602fd350-edb4-49c9-b593-d223f7449a82
This ensures cached Theme JSON data is cleared between all test classes that extend `WP_Theme_UnitTestCase` and fixes a few tests that would fail in isolation, even though they full test suite would pass.
Props isabel_brison, thekt12, joemcgill.
Fixes#61337.
git-svn-id: https://develop.svn.wordpress.org/trunk@58295 602fd350-edb4-49c9-b593-d223f7449a82
Expand allowable set of custom data attribute names to include those containing
leading, trailing, and double `-` characters. Previously, WordPress was
removing data attributes that are used in the Interactivity API. By allowing
these additional custom data attributes, the related Interactivity API
directives will preserve through `kses`.
For example, the Interactivity API frequently relies on custom data attributes
such as `data-wp-on--click="..."`. The change in [43981] would strip these out
of the processed HTML, however.
Developed in https://github.com/WordPress/wordpress-develop/pull/6598
Discussed in https://core.trac.wordpress.org/ticket/61052
Props cbravobernal, dmsnell, gziolo, jonsurrell.
Follow-up to [43981].
Fixes#61052.
git-svn-id: https://develop.svn.wordpress.org/trunk@58294 602fd350-edb4-49c9-b593-d223f7449a82
In a similar vein as [58291], this changeset introduces a new `insert_hooked_blocks_into_rest_response` function and hooks it to the `rest_prepare_wp_navigation` filter.
This is part of an ongoing effort to move Block Hooks related code out of the Navigation block. Specifically, `insert_hooked_blocks_into_rest_response` is based on `block_core_navigation_insert_hooked_blocks_into_rest_response`. Eventually, it will be possible to deprecate the latter.
Follow-up to [58291].
See #60759.
git-svn-id: https://develop.svn.wordpress.org/trunk@58292 602fd350-edb4-49c9-b593-d223f7449a82
As of [57790], the Templates endpoint uses the `rest_pre_insert_*` filter to inject the `ignoredHookedBlocks` metadata attribute into anchor blocks, prior to persisting a template or template part to the database. The same principle was implemented for the Navigation endpoint (where additionally, first and last child blocks added at the top level are store in the `wp_navigation` post object's post meta). The required logic was added to the Navigation block's code, i.e. inside the Gutenberg code repository, and then synchronized to Core.
In order to harmonize the code between the two endpoints, this changeset introduces a new `update_ignored_hooked_blocks_postmeta` function, which is based on the Navigation block's `block_core_navigation_update_ignore_hooked_blocks_meta`, alongside a few helper functions, and hooks it to the `rest_pre_insert_wp_navigation` filter hook. (The Navigation block has been prepared in [58275] to add an additional conditional to check for the new `update_ignored_hooked_blocks_postmeta` filter so there won't be any collisions.)
Eventually, this will allow to deprecate `block_core_navigation_update_ignore_hooked_blocks_meta` (and some related functions), and remove the relevant code from the Navigation block. It also paves the way for some other future changes, such as inserting a hooked block as a Template Part block's first or last child (#60854).
Props tomjcafferkey, bernhard-reiter.
Fixes#60759.
git-svn-id: https://develop.svn.wordpress.org/trunk@58291 602fd350-edb4-49c9-b593-d223f7449a82
Adds handling for a `__default` block binding attribute for pattern overrides that dynamically adds support for all supported block binding attributes.
Props talldanwp, petitphp, mukesh27, isabel_brison, kevin940726.
Fixes#61333.
git-svn-id: https://develop.svn.wordpress.org/trunk@58289 602fd350-edb4-49c9-b593-d223f7449a82
This changeset avoids breaking the inline script added for `Moment.js` localization if for some reason `get_user_locale()` doesn't return a simply string.
Props swissspidy.
Fixes#61341.
git-svn-id: https://develop.svn.wordpress.org/trunk@58288 602fd350-edb4-49c9-b593-d223f7449a82
This changeset makes the following changes:
- Adds the title attribute to `<link rel="alternate">` tags for oEmbed and REST API endpoints
- Updates the oEmbed phpunit tests to reflect the above change
- Adds the title link-param to REST API Link: headers (verified as supported in RFC 8288 here: https://httpwg.org/specs/rfc8288.html#serialisation-defined-attributes)
Props edent, kadamwhite, TimothyBlynJacobs, joedolson, swissspidy, sabernhardt.
Fixes#59006.
git-svn-id: https://develop.svn.wordpress.org/trunk@58286 602fd350-edb4-49c9-b593-d223f7449a82
In #50824 support was added for a package to include a disable_autoupdate flag to indicate that the plugin/theme should not be auto-updated even if a user had opted-in via the WP-Admin UI. However, the logic implementing the flag was inverted.
This commit repairs the logic. If a package has disable_autoupdate set, then it should not be auto-updated.
Props amisiewicz.
Fixes#52796.
git-svn-id: https://develop.svn.wordpress.org/trunk@58285 602fd350-edb4-49c9-b593-d223f7449a82
Because `none` doesn't convey the same meaning all the time.
Props tobifjellner, audrasjb, SergeyBiryukov, shailu25.
Fixes#50087.
git-svn-id: https://develop.svn.wordpress.org/trunk@58284 602fd350-edb4-49c9-b593-d223f7449a82
Developers can now include /wp/v2/users routes when making a batch API request.
Props alexminza, timothyblynjacobs, mukesh27.
Fixes#60895.
git-svn-id: https://develop.svn.wordpress.org/trunk@58283 602fd350-edb4-49c9-b593-d223f7449a82
Provides a custom decoder for strings coming from HTML attributes and
markup. This custom decoder is necessary because of deficiencies in
PHP's `html_entity_decode()` function:
- It isn't aware of 720 of the possible named character references in
HTML, leaving many out that should be translated.
- It isn't aware of the ambiguous ampersand rule, which allows
conversion of character references in certain contexts when they
are missing their closing `;`.
- It doesn't draw a distinction for the ambiguous ampersand rule
when decoding attribute values instead of markup values.
- Use of `html_entity_decode()` requires manually passing non-default
paramter values to ensure it decodes properly.
This decoder also provides some conveniences, such as making a
single-pass and interruptable decode operation possible. This will
provide a number of opportunities to optimize detection and decoding
of things like value prefixes, and whether a value contains a given
substring.
Developed in https://github.com/WordPress/wordpress-develop/pull/6387
Discussed in https://core.trac.wordpress.org/ticket/61072
Props dmsnell, gziolo, jonsurrell, jorbin, westonruter, zieladam.
Fixes#61072.
git-svn-id: https://develop.svn.wordpress.org/trunk@58281 602fd350-edb4-49c9-b593-d223f7449a82
On the profile edit screen in ``wp-admin, the username was previously displayed using an input field with the `disabled` attribute. This field was skipped by screen readers, which leads to a loss of information for visually impaired users. This changeset switches it to a `readonly` attribute, which is exactly the purpose of this field.
Props roytanck, audrasjb, rajinsharwar, joedolson.
Fixes#60774.
git-svn-id: https://develop.svn.wordpress.org/trunk@58280 602fd350-edb4-49c9-b593-d223f7449a82
This changeset updates the design of the Upload Media screen to stack progress bars below the file name. After the upload completes, Action buttons also stack below the file name.
Props afercia, rcreators.
Fixes#60141.
git-svn-id: https://develop.svn.wordpress.org/trunk@58279 602fd350-edb4-49c9-b593-d223f7449a82
The Site Editor Patterns page was exposed internally for the Classic theme as of WP6.5. As we aim to officially expose the new Patterns page as of WP6.6, this changeset makes the following changes available when a classic themes is activated:
- Link Appearance > Patterns submenu to the Site Editor Patterns page located at `wp-admin/site-editor.php?path=/patterns
- Remove Template Parts submenu
Props wildworks, audrasjb, ironprogrammer, azaozz, youknowriad.
Fixes#61109.
git-svn-id: https://develop.svn.wordpress.org/trunk@58278 602fd350-edb4-49c9-b593-d223f7449a82
The workflow responsible for testing the build process is currently responsible for creating a ZIP file of the WordPress build and storing it as an artifact. This can be used for manual testing, but is mainly used for spinning up a Playground instance.
Because of how comments with Playground testing instructions are left pull requests. the pull request number needs to be stored as a workflow artifact as well. This moves the logic responsible for this to the reusable workflow, which allows older branches to make use of Playground testing without additional maintenance burden.
See #59416.
git-svn-id: https://develop.svn.wordpress.org/trunk@58274 602fd350-edb4-49c9-b593-d223f7449a82
This adds a new input to the reusable performance testing workflow for accepting a PHP version. This allows the workflow to be reused in older branches when the PHP version currently tagged `latest` was not supported.
Props swissspidy, joemcgill.
See #60127, #61213.
git-svn-id: https://develop.svn.wordpress.org/trunk@58269 602fd350-edb4-49c9-b593-d223f7449a82
Provide users with the ability to style entire sections of a page without
having to tediously reapply the same sets of styles.
This is done by extending block style variations to apply to nested blocks.
See https://github.com/WordPress/gutenberg/pull/57908.
Fixes#61312.
Props aaronrobertshaw, talldanwp, ramonopoly, isabel_brison, andrewserong.
git-svn-id: https://develop.svn.wordpress.org/trunk@58264 602fd350-edb4-49c9-b593-d223f7449a82
Allow using relative `file:` URLs in top-level theme.json properties such as
`styles.background`, and modify the REST API to provide clients with the
absolute URLs via a 'https://api.w.org/theme-file' attribute in the `_links`
array.
Props ramonopoly.
Fixes#61273.
git-svn-id: https://develop.svn.wordpress.org/trunk@58262 602fd350-edb4-49c9-b593-d223f7449a82
With a new direction in the 6.5.4 to restore the Activate button's href (see [58250]), the changesets committed for 6.5.3 (see #60992) are now dead code and will not render the admin notice on successful plugin activation.
This commit is a clean revert of r58081.
Follow-up to [58250].
Props swissspidy, azaozz, costdev, jorbin, hellofromTonya, afragen.
Fixes#61331.
See #60992, #61319.
git-svn-id: https://develop.svn.wordpress.org/trunk@58257 602fd350-edb4-49c9-b593-d223f7449a82