This resolves a fatal error if `strict_types` PHP setting is enabled:
{{{
Argument #1 ($num) must be of type float, string given
}}}
Since the goal of the Site Health Info screen is to display raw values where possible, the `number_format()` call here does not seem to provide any benefit.
Props krishneup, sabernhardt, audrasjb, SergeyBiryukov.
Fixes#60364.
Built from https://develop.svn.wordpress.org/trunk@58847
git-svn-id: http://core.svn.wordpress.org/trunk@58243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This replaces an outdated note about the 20 characters limit on the password field in the WordPress database schema.
The `post_password` column was increased to 255 characters in WordPress 4.7.
Follow-up to [27676], [38590].
Props debarghyabanerjee, peterwilsoncc, dd32, mukesh27.
Fixes#61703.
Built from https://develop.svn.wordpress.org/trunk@58846
git-svn-id: http://core.svn.wordpress.org/trunk@58242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the Tag Processor (or HTML Processor) attempts to parse certain
incomplete script tags, the parser enters an infinite loop and will
hang indefinitely. The conditions to reach this situation are:
- Input HTML ends with an open script tag.
- The final character of input is `-` or `<`.
The infinite loop was caused by the parser-advancing increment not being
called when two `||` OR conditions short-circuited. If the first
condition was true, the `$at++` code was never reached.
This path resolves the issue.
Developed in https://github.com/wordpress/wordpress-develop/pull/7128
Discussed in https://core.trac.wordpress.org/ticket/61810
Follow-up to [55203].
Props: dmsnell, jonsurrell.
Fixes#61810.
Built from https://develop.svn.wordpress.org/trunk@58845
git-svn-id: http://core.svn.wordpress.org/trunk@58241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When setting an an attribute value in the HTML API, WordPress may reject
an update based on rules in `kses`. In these cases, the return value from
an escaping function will be an empty string, and the HTML API should
reject the update. Unfortunately, it currently reports that it updates the
attribute but sets an empty string value, which is misleading.
In this patch, the HTML API will refuse the attribute update and return
false to indicate as much when WordPress rejects the updates.
Developed in https://github.com/wordpress/wordpress-develop/pull/7114
Discussed in https://core.trac.wordpress.org/ticket/61719
Follow-up to [58472].
Props: amitraj2203, dmsnell, mukesh27.
Fixes#61719.
Built from https://develop.svn.wordpress.org/trunk@58844
git-svn-id: http://core.svn.wordpress.org/trunk@58240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update `is_wp_version_compatible()` to use `wp_get_wp_version()` introduced in [58813] to ensure the value of `$wp_version` has not been modified by a theme or plugin.
Props costdev, mukesh27, Cybr, sergeybiryukov.
Fixes#61781.
Built from https://develop.svn.wordpress.org/trunk@58843
git-svn-id: http://core.svn.wordpress.org/trunk@58239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
For salts generated and stored in the database, use `wp_prime_site_option_caches()` within `wp_salt()` to prime the options in a single database query, down from up to nine database queries.
The options are primed when the corresponding constant is either undefined or uses the default string `put your unique phrase here`.
Props joemcgill, spacedmonkey, peterwilsoncc.
Fixes#59871.
Built from https://develop.svn.wordpress.org/trunk@58837
git-svn-id: http://core.svn.wordpress.org/trunk@58233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The HTML Processor has only supported a specific kind of parsing mode
called _the fragment parsing mode_, where it behaves in the same way
that `node.innerHTML = html` does in the DOM. This mode assumes a
context node and doesn't support parsing an entire document.
As part of work to add more spec support to the HTML API, this patch
introduces a full parsing mode, which can parse a full HTML document
from start to end, including the doctype declaration and head tags.
Developed in https://github.com/wordpress/wordpress-develop/pull/6977
Discussed in https://core.trac.wordpress.org/ticket/61576
Props: dmsnell, jonsurrell.
See #61576.
Built from https://develop.svn.wordpress.org/trunk@58836
git-svn-id: http://core.svn.wordpress.org/trunk@58232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces the ability to specify a value for `background.backgroundAttachment` in theme.json styles.
The theme.json value determines the CSS value for the `background-attachment` property.
This feature was introduced into the Gutenberg plugin in version 18.9.
Props andrewserong, mukesh27, noisysocks, ramonopoly.
Fixes#61720
Built from https://develop.svn.wordpress.org/trunk@58834
git-svn-id: http://core.svn.wordpress.org/trunk@58230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to make the message more accurate by referring to the version of PHP currently recommended by WordPress, not the current version of PHP.
Follow-up to [44986], [46267], [47254].
Props swb1192, psykro, swissspidy, joemcgill, mukesh27, aristath.
See #61623.
Built from https://develop.svn.wordpress.org/trunk@58832
git-svn-id: http://core.svn.wordpress.org/trunk@58228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This patch fixes an oversight from when default metadata values were introduced
in #43941 in WordPress 5.5: metadata updates should persist in the database
even if they match the registered default value (because the default values
can change over time).
Previously, the REST API code was comparing updated values against the value
returned by the default-aware `get_metadata()` method. This meant that if no
value existed in the database, and the default value was supplied to the update,
WordPress would think that the updated value was already persisted and skip
the database call.
Now, the `get_metadata_raw()` method is called for comparing whether or not
a database update is required, fixing the bug.
In this patch both issues are resolved.
Developed in https://github.com/wordpress/wordpress-develop/pull/6782
Discussed in https://core.trac.wordpress.org/ticket/55600
Follow-up to [48402].
Props: dmsnell, kraftner, ramon-fincken.
Fixes#55600.
Built from https://develop.svn.wordpress.org/trunk@58831
git-svn-id: http://core.svn.wordpress.org/trunk@58227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the first part in a larger modularization of the data in `WP_Debug_Data`.
Previously this was a single massive method drawing in debug data from various
groups of related data, where the groups were independent from each other.
This patch separates the first of twelve groups, the `wp-filesystem` info,
into a separate method focused on that data.
This work precedes changes to make the `WP_Debug_Data` class more extensible
for better use by plugin and theme code.
Developed in https://github.com/wordpress/wordpress-develop/pull/7065
Discussed in https://core.trac.wordpress.org/ticket/61648
Props: afragen, apermo, costdev, dmsnell.
See #61648.
Built from https://develop.svn.wordpress.org/trunk@58830
git-svn-id: http://core.svn.wordpress.org/trunk@58226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to optimize performance by saving the return value to a static variable, so that the `version.php` file is not unnecessarily required on each function call.
Follow-up to [58813].
Props Cybr, debarghyabanerjee, mukesh27.
Fixes#61782. See #61627.
Built from https://develop.svn.wordpress.org/trunk@58827
git-svn-id: http://core.svn.wordpress.org/trunk@58223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In some cases, derived state returns an associative array. Directives may wish to continue to access properties of the associative array, when using the syntax `state.arrayReturnedByClosure.property`. This patch continues evaluating the path after the associative array has been returned by the Closure.
Props jonsurrell, luisherranz.
Fixes#61741.
Built from https://develop.svn.wordpress.org/trunk@58825
git-svn-id: http://core.svn.wordpress.org/trunk@58221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Table block was not reflecting the custom font size on the front. This solution now brings custom font sizes in for front the same as back in the editor.
Props umesh84, SergeyBiryukov, sabernhardt, shailu25.
Fixes#56157.
Built from https://develop.svn.wordpress.org/trunk@58824
git-svn-id: http://core.svn.wordpress.org/trunk@58220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Modifies gravatar image URLs to always use the HTTPS version from secure.gravatar.com.
Gravatar now redirects HTTP image requests to their HTTPS equivalent, resulting in redirects for sites running over an HTTP connection (`is_ssl() === false`). Since the introduction of HTTP/2 the use of sub-domains for different hashes ([1-3].gravatar.com) now represents a performance hinderance rather than improvement.
The scheme passed to `get_avatar_data()` is now ignored for the generation of Gravatar URLs but the setting retained to avoid introducing bugs for sites using either local avatars or third party providers.
Props neoxx, SergeyBiryukov, sippis, peterwilsoncc, mukesh27, costdev, dd32.
Fixes#37454.
Built from https://develop.svn.wordpress.org/trunk@58822
git-svn-id: http://core.svn.wordpress.org/trunk@58218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This allows for more flexibility in modifying how feed links are displayed by the `feed_links()` and `feed_links_extra()` functions, including, for example, a way to change the `»` separator to something else.
Follow-up to [10377], [33838], [33839], [53125], [54161].
Props topdownjimmy, tw2113, williampatton.
Fixes#43225.
Built from https://develop.svn.wordpress.org/trunk@58821
git-svn-id: http://core.svn.wordpress.org/trunk@58217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes adding a custom font size to a Calendar and Table block. This was only an issue for custom font size entering.
Props nidhidhandhukiya, yurajsinj2211, ankit-k-gupta, anveshika, sabernhardt, darshitrajyaguru97, shailu25, umesh84, SergeyBiryukov.
Fixes#59996, #56157.
Built from https://develop.svn.wordpress.org/trunk@58819
git-svn-id: http://core.svn.wordpress.org/trunk@58215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This resolves the Code block not changing when the font sizes are switched in Twenty Eleven and Twenty Twelve. The solution is the same as used for other code block adjustments for font sizes.
Props viralsampat, sabernhardt.
Fixes#61753.
Built from https://develop.svn.wordpress.org/trunk@58816
git-svn-id: http://core.svn.wordpress.org/trunk@58212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces `wp_get_wp_version()` to get an unmodified value of `$wp_version` from `wp-includes/version.php`. Some plugins modify the global in an attempt to improve security through obscurity. This practice can cause errors in WordPress so the ability to get an unmodified version is needed.
Replaces instances within the code base in which `version.php` was required in order to get an unmodified value. `script-loader.php` is intentionally excluded from the replacements as the function is not always available to the file.
Props debarghyabanerjee, afragen, costdev.
See #61627.
Built from https://develop.svn.wordpress.org/trunk@58813
git-svn-id: http://core.svn.wordpress.org/trunk@58209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that the arguments are correctly interpreted when passed as a query string, i.e. when `wp_parse_args()` is involved. For example, `wp_list_pages( 'depth=0' )` should display a list of all pages to the maximum depth.
Follow-up to [57848].
Props freibergergarcia, peterwilsoncc, ahortin.
Fixes#61749.
Built from https://develop.svn.wordpress.org/trunk@58812
git-svn-id: http://core.svn.wordpress.org/trunk@58208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Modifies the caching of `notoptions` in `delete_network_option()` to ensure that the network cache is bypassed on single site installs.
On single site installs the incorrect caching was causing the `notoptions` cache to remain populated once a deleted option was subsequently added or updated.
Follow up to [58782].
Props bjorsch, pbearne.
Fixes#61730.
See #61484.
Built from https://develop.svn.wordpress.org/trunk@58811
git-svn-id: http://core.svn.wordpress.org/trunk@58207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace links to en.gravatar.com with links to gravatar.com as the english site now uses the base domain. This avoids an unnecessary redirect for english language sites.
The links remain translatable for non-english versions of WordPress.
Props narenin, knutsp.
Fixes#61424.
Built from https://develop.svn.wordpress.org/trunk@58810
git-svn-id: http://core.svn.wordpress.org/trunk@58206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to resolve a fatal error when the incoming `$comment_id` is an instance of `WP_Comment` (or any object) without a `comment_ID` property defined, or if it's empty:
{{{
Object of class WP_Comment could not be converted to string
}}}
This commit mirrors the changes previously made for a similar code fragment in `get_comment_author()`.
Includes:
* Unit tests to demonstrate the fatal error and validate the fix.
* Changing the default value for a non-existent comment ID in `get_comment_author()` from an empty string to zero as a numeric string, for consistency with `get_comment_ID()`.
Follow-up to [52818], [55289], [58335], [58755].
Props narenin, mukesh27, iflairwebtechnologies, umeshsinghin, SergeyBiryukov.
Fixes#61715.
Built from https://develop.svn.wordpress.org/trunk@58809
git-svn-id: http://core.svn.wordpress.org/trunk@58205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[58069] introduced calling `sanitize_text_field()` with `$_REQUEST['autofocus']` (which is an array) and setting its default to a `string`. This fix restores the `array` data type for `autofocus`.
The fix also relocates the unsplash for `url`, `return`, and `autofocus` before sanitizing.
Follow-up to [58069], [34269], [29026], [21028].
Props jamesros161, swissspidy, dlh, audrasjb, hellofromTonya, ironprogrammer.
Fixes#61561.
Built from https://develop.svn.wordpress.org/trunk@58804
git-svn-id: http://core.svn.wordpress.org/trunk@58200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the `variations` field in a block.json file could be used to provide a static list of the block's variations (i.e., an array). Alternatively, the block's `variation_callback` could be set during server-side block registration to point to a PHP function to generate those variations.
This changeset makes it so that the block.json `variations` field can be alternatively set to a string, which will be interpreted as the filename of a PHP file that generates the variations.
It is loosely modeled after [54132], which introduced the `render` field for `block.json`, as a way to point to a PHP file instead of providing a `render_callback`.
Props bernhard-reiter, gziolo.
Fixes#61280.
Built from https://develop.svn.wordpress.org/trunk@58801
git-svn-id: http://core.svn.wordpress.org/trunk@58197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the `regenerator-runtime` library to version `0.14.1`.
This library has not been used by Core itself in quite a while and only maintained as a courtesy. Any projects relying on `regenerator-runtime` should reevaluate their usage.
Props manooweb.
Fixes#60515.
Built from https://develop.svn.wordpress.org/trunk@58800
git-svn-id: http://core.svn.wordpress.org/trunk@58196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This resolves the border not also aligning with the quote block. When this theme was built the editor used style attributes for text alignment. This patch updates existing rules for center and right aligned quote blocks.
Props viralsampat, poena, sabernhardt.
Fixes#61132.
Built from https://develop.svn.wordpress.org/trunk@58796
git-svn-id: http://core.svn.wordpress.org/trunk@58192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The following third-party actions have been updated to their latest versions.
- `shivammathur/setup-php` from `2.30.0` to `2.31.1`.
- `actions/setup-node` from `4.0.2` to `4.0.3`.
- `actions/cache` from `4.0.1` to `4.0.2`.
- `actions/upload-artifact` from `4.3.1` to `4.3.4`.
- `slackapi/slack-github-action` from `1.25.0` to `1.26.0`.
- `codecov/codecov-action` from `4.1.0` to `4.5.0`.
See #61564.
Built from https://develop.svn.wordpress.org/trunk@58789
git-svn-id: http://core.svn.wordpress.org/trunk@58191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `inject_ignored_hooked_blocks_metadata_attributes` filter that is attached to both the `rest_pre_insert_wp_template` and `rest_pre_insert_wp_template_part` hooks receives a `stdClass` object from the Templates REST API controller that contains all fields that the client would like to modify when making a `POST` request (plus the `id` to identify the relevant template or template part, respectively).
There are cases when the `post_content` field is not set, e.g. when the client would like to rename an existing template (in which case it would only set the `title` field).
Prior to this changeset, the filter would erroneously apply the Block Hooks algorithm to the non-existent `post_content` field regardless, which would result in it being set to the empty string `''`. As a consequence, renaming a template would have the unwanted side effect of wiping its contents.
This changeset fixes the issue by returning early from the filter if the `post_content` field is not set.
Props alshakero, bernhard-reiter.
Fixes#61550.
Built from https://develop.svn.wordpress.org/trunk@58785
git-svn-id: http://core.svn.wordpress.org/trunk@58187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This resolves the seperator block color settings ordering. They were displaying incorrectly due to ruleset problems. This edits the order for the front end also.
Props bhaveshdesai13, aniketpatel, miguelaxcar, nidhidhandhukiya, poena, pavanpatil1, sabernhardr.
Fixes#57544.
Built from https://develop.svn.wordpress.org/trunk@58784
git-svn-id: http://core.svn.wordpress.org/trunk@58186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When using the /posts or /pages endpoints, for private posts or pages, you get the following title property: { raw: "Some title", rendered: "Private: Some title" }
this commit removes the prefix from rendered private posts titles (just like what we do for protected posts)
Props youknowriad, swissspidy, timothyblynjacobs, sergeybiryukov, ramonopoly.
Fixes#61639.
Built from https://develop.svn.wordpress.org/trunk@58783
git-svn-id: http://core.svn.wordpress.org/trunk@58185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prime the `notoptions` cache within `delete_option` and `delete_network_option` to avoid the need for a database query if `get_option` or `get_network_option` is subsequently called.
Adds some associated tests to ensure that an option is cleared from the notoptions cache when an option is added either via `add_option`, `update_option` or their network option equivalent.
Props pbearne, mukesh27.
Fixes#61484.
Built from https://develop.svn.wordpress.org/trunk@58782
git-svn-id: http://core.svn.wordpress.org/trunk@58184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Insertion modes in an HTML parser may include instructions like "process
the token in the IN HEAD insertion mode." The rules do not change the
insertion mode of the parser, but the errors are triggered outside of the
rules for the current insertion mode. These will be misleading when
bailing on these instructions, because it will point someone to the wrong
place in the code to find the source of the error.
In this patch all of the bail-points due to lacking insertion mode support
are hard-coded to better orient someone to the section of the code lacking
support for handling the input HTML.
Developed in https://github.com/wordpress/wordpress-develop/pull/7043
Discussed in https://core.trac.wordpress.org/ticket/61576
Follow-up to [58679].
Props: dmsnell, jonsurrell.
See #61576.
Built from https://develop.svn.wordpress.org/trunk@58781
git-svn-id: http://core.svn.wordpress.org/trunk@58183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When support was added for the remaining tags in the IN BODY insertion mode, a test
file indicating that support was necessary for certain parts of the parser was
removed, but it wasn't removed from SVN when sending over the patch from `git`.
This patch removes that empty file so that the WPCS workflows pass.
Discussed in https://core.trac.wordpress.org/ticket/61576
Follow-up to [58779].
See #61576.
Built from https://develop.svn.wordpress.org/trunk@58780
git-svn-id: http://core.svn.wordpress.org/trunk@58182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the screen is smaller the edit buttons are obscured. This resolves that problem for the smaller screens and only targets the container for footer navigation and widgets.
Props sumitsingh, SergeyBiryukov, sabernhardt.
Fixes#49008.
Built from https://develop.svn.wordpress.org/trunk@58778
git-svn-id: http://core.svn.wordpress.org/trunk@58180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the font size is changed the border on the front was changing in width. This fix resolves that to make sure the width does not adjust.
Props nidhidhandhukiya, sabernhardt, kamran8176, pitamdey, shailu25.
Fixes#60239.
Built from https://develop.svn.wordpress.org/trunk@58777
git-svn-id: http://core.svn.wordpress.org/trunk@58179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Whilst initially this could be thought to be solved in Jetpack due to submenus only having a z-index of 1 a fix is desirable. This brings in the suggested value.
Props robertghetau, SergeyBiryukov, sabernhardt, poena, narenin.
Fixes#55892.
Built from https://develop.svn.wordpress.org/trunk@58776
git-svn-id: http://core.svn.wordpress.org/trunk@58178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
We tried moving away from the deprecated React UMD builds previously,
the problem we faced is that there's a warning that is triggered on the console because we're not using a separate impact for `createRoot`.
This warning has been removed in React 19 along with the removal of the UMD builds, so we should be able to revert this commit when we upgrade to React 19 but for now, we need to restore the usage of the umd builds.
Props mamaduka.
See #61324.
Built from https://develop.svn.wordpress.org/trunk@58775
git-svn-id: http://core.svn.wordpress.org/trunk@58177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The function twentysixteen_entry_meta included screen reader text inside the span property using the author mf class. This resolves that in both Twenty Sixteen and Twenty Fifteen. It should have the screen reader text inside the byline span but outside the author vcard span.
Props dshanske, laurelfulford, sabernhardt, shilu25.
Fixes#46233.
Built from https://develop.svn.wordpress.org/trunk@58771
git-svn-id: http://core.svn.wordpress.org/trunk@58173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `workflow_dispatch` event payload does not contain the `before` property containing the previous commit’s SHA value, which causes scheduled runs of the performance testing workflow in older branches to fail.
This adds a step specifically for this event type to use native Git commands to retrieve the required SHA value instead.
Props joemcgill.
Fixes#61699.
Built from https://develop.svn.wordpress.org/trunk@58767
git-svn-id: http://core.svn.wordpress.org/trunk@58169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
#61182 introduced is_utf8_charset() as a way of standardizing checks for charset slugs referring to UTF-8. This is called by _mb_strlen() inside of compat.php, but is_utf8_charset() is defined in functions.php, which isn't loaded early on. Code calling mb_strlen() early on before functions.php loads in hosts without the multibyte extension therefore may crash.
Props dmsnell, jonsurrell, joemcgill, jorbin.
Fixes#61681.
Built from https://develop.svn.wordpress.org/trunk@58763
git-svn-id: http://core.svn.wordpress.org/trunk@58165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[58335] introduced `(string)` type casting of the passed in `$comment_id` value. If `$comment_id` is a scalar, it works as expected. But if it's an `object`, the following fatal error is thrown:
{{{
Object of class WP_Comment could not be converted to string
}}}
This fatal error happens when the incoming `$comment_id` is an instance of `WP_Comment` (or any object) without a `comment_ID` (empty).
This changeset adds tests to demonstrate the fatal error and validate the fix.
It fixes the fatal error by restructuring the ternary checks into an `if/elseif/else` structure for the 3 paths:
- When `$comment->comment_ID` is not empty, then it uses the property.
- When `$comment_id` is scalar, then it type casts it to a `string`.
- Else, the default is an empty `string`.
Follow-up to [58335], [41127], [52818].
Props ambrosiawt, hellofromTonya, jorbin, mukesh27, SergeyBiryukov.
Fixes#61681.
Built from https://develop.svn.wordpress.org/trunk@58755
git-svn-id: http://core.svn.wordpress.org/trunk@58157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prior to WordPress 6.4, performance testing was performed using Puppeteer instead of Playwright (converted in [56926]). Because of the flaky nature of the workflow using Puppeteer, it was not converted to the reusable pattern implemented through #61213. It was instead removed from 6.2 and 6.3 in [58301] and [58330], respectively.
This removes the workflow for these branches from the strategy matrix when testing old branches to avoid errors and adds an expanded note about why those branches are missing.
See #61213, #61564.
Built from https://develop.svn.wordpress.org/trunk@58754
git-svn-id: http://core.svn.wordpress.org/trunk@58156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Following [58215], admin bar items in the `top-secondary` group have a changed visual order. Increase the priority of the user and recovery menu items so nodes added with higher priorities will still be shown visually before the user and recovery menu items, as they were prior to 58215.
The items will appear in the reverse of the previous order, but the new order now matches their priority order, rather than being the opposite.
Props sabernhardt, joemcgill, pbiron, joedolson.
Fixes#61615.
Built from https://develop.svn.wordpress.org/trunk@58748
git-svn-id: http://core.svn.wordpress.org/trunk@58150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The CSS to make menu item containers resizable in the admin menu editor was too broadly scoped, and caused classic editor metaboxes to have unconstrained height. Limit the scope of the CSS changes to only impact menu item containers.
Props neotrope, sabernhardt, joedolson.
Fixes#61662.
Built from https://develop.svn.wordpress.org/trunk@58747
git-svn-id: http://core.svn.wordpress.org/trunk@58149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In part of a larger review of CSS semantics and behaviors, this patch
takes the opportunity to remove leading whitespace in an updated class
attribute after the first class in the attribute has been removed.
Previously, if the first class name had been removed, the whitespace
that formerly followed it would remain in the class attribute. This
stood in contrast to removing other class names, which removed their
associated whitespace.
There should be no semantic or functional changes in this patch, only
a slightly-large diff for modified HTML documents that looks prettier
when removing the first class name in a class attribute.
Developed in https://github.com/WordPress/wordpress-develop/pull/6933
Discussed in https://core.trac.wordpress.org/ticket/61531
Props dmsnell, jonsurrell.
See #61531.
Built from https://develop.svn.wordpress.org/trunk@58740
git-svn-id: http://core.svn.wordpress.org/trunk@58142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Refactors the following tests to use a data provider with named test cases:
* `test_wp_interactivity_data_wp_context_with_different_arrays()`
* `test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace()`
* `test_wp_interactivity_data_wp_context_with_json_flags()`
This is better as:
1. One failing test will not block the other tests from running.
2. Each test is now referenced by name in any error message, making it more straight forward to see which test failed.
3. The test no longer contains multiple assertions.
3. It makes it more straight forward to add additional tests.
Follow-up to [58594], [58234], [57762], [57743], [57742], [57563].
Props jrf.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58739
git-svn-id: http://core.svn.wordpress.org/trunk@58141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Once the `test_process_directives_when_block_is_filtered()` method has run, the named `test_render_block_data()` function declared nested within becomes part of the global namespace, which could cause problems for other tests.
Quite apart from the fact that the name starting with `test_` is confusing (as methods prefixed with `test_` are supposed to be test methods to be run by PHPUnit).
Using a closure for this callback fixes the issue. Declared as `static` for a micro-optimization.
Follow-up to [57826].
Props jrf, hellofromTonya.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58738
git-svn-id: http://core.svn.wordpress.org/trunk@58140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Changeset [58712] introduced the following compile time PHP deprecation notice on >= PHP 8.2 test runs:
{{{
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php on line 257
PHPUnit 9.6.20 by Sebastian Bergmann and contributors.
}}}
The `${` syntax for string interpolation was deprecated in PHP 8.2 and should not be used anymore.
Ref: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
Follow-up to [58712].
Props jrf.
See #61530, #59654, #61576.
Built from https://develop.svn.wordpress.org/trunk@58733
git-svn-id: http://core.svn.wordpress.org/trunk@58135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The font family was not showing correctly for the verse block. The approach taken was to match the front end and this involved also removing the styles in [50358].
Props pranitdugad, sabernhardt, poena, pitamdey.
Fixes#61140.
Built from https://develop.svn.wordpress.org/trunk@58731
git-svn-id: http://core.svn.wordpress.org/trunk@58133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The border was not changing color when it was changed. This brings that in. It is worth noting the original theme design did not have this but as noted in the ticket this has been in the quote block for about two years so matching the current block styling in this case makes sense.
Props umesh84, desrosj, sabernhardt.
Fixes#56565.
Built from https://develop.svn.wordpress.org/trunk@58728
git-svn-id: http://core.svn.wordpress.org/trunk@58130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The button block had issues with font styling not applying. This not only brings letter-spacing but also line-height, text-transform and font-weight to wp-button-block-buttons. [57300] fixed the separator issue. This fix also added box-shadow none for consistency.
Props darshitrajyaguru97, harshgajipara, shailu25, sabernhardt, alvitazwar052.
Fixes#58609.
Built from https://develop.svn.wordpress.org/trunk@58725
git-svn-id: http://core.svn.wordpress.org/trunk@58127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `$single` parameter is passed via the `get_post_metadata` filter and has no default value.
Includes minor code layout fixes for consistency with the formatting of other long conditionals in core.
Follow-up to [56714].
Props rodrigosprimo.
Fixes#61645.
Built from https://develop.svn.wordpress.org/trunk@58717
git-svn-id: http://core.svn.wordpress.org/trunk@58119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses a discrepancy where using `unlink()` allows for checking if it was successful via the return value, but `wp_delete_file()` did not have a return value, making it impossible to verify the result without doing overhead checks if the file still exists.
This also brings more consistency with the other `wp_delete_*()` functions, specifically:
* `wp_delete_file_from_directory()`
* `wp_delete_post()`
* `wp_delete_post_revision()`
* `wp_delete_attachment()`
* `wp_delete_attachment_files()`
* `wp_delete_comment()`
* `wp_delete_nav_menu()`
* `wp_delete_term()`
* `wp_delete_site()`
* `wp_delete_user()`
Includes adding basic unit tests for `wp_delete_file()`.
Follow-up to [31575].
Props bedas, debarghyabanerjee, mukesh27, SergeyBiryukov.
Fixes#61590.
Built from https://develop.svn.wordpress.org/trunk@58715
git-svn-id: http://core.svn.wordpress.org/trunk@58117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The HTML Processor internally throws an exception when it reaches HTML
that it knows it cannot process, but this exception is not made
available to calling code. It can be useful to extract more knowledge
about why it gave up, especially for debugging purposes.
In this patch, more context is added to the WP_HTML_Unsupported_Exception
and the last exception is made available to calling code through a new
method, `get_unsupported_exception()`.
Developed in https://github.com/WordPress/wordpress-develop/pull/6985
Discussed in https://core.trac.wordpress.org/ticket/61646
Props bernhard-reiter, dmsnell, jonsurrell.
See #61646.
Built from https://develop.svn.wordpress.org/trunk@58714
git-svn-id: http://core.svn.wordpress.org/trunk@58116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since the HTML Processor started visiting all nodes in a document, both
real and virtual, the breadcrumb accounting became a bit complicated
and it's not entirely clear that it is fully reliable.
In this patch the breadcrumbs are rebuilt separately from the stack of
open elements in order to eliminate the problem of the stateful stack
interactions and the post-hoc event queue.
Breadcrumbs are greatly simplified as a result, and more verifiably
correct, in this construction.
Developed in https://github.com/WordPress/wordpress-develop/pull/6981
Discussed in https://core.trac.wordpress.org/ticket/61576
Follow-up to [58590].
Props bernhard-reiter, dmsnell.
See #61576.
Built from https://develop.svn.wordpress.org/trunk@58713
git-svn-id: http://core.svn.wordpress.org/trunk@58115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Many tests from the html5lib test suite fail because of differences in
text handling between a DOM API and the HTML API, even though the
semantics of the parse are equivalent. For example, it's possible in
the HTML API to read multiple successive text nodes when the tokens
between them are ignored.
The test suite didn't account for this and so was failing tests. This
patch improves the construction of the representation to compare
against the test suite so that those tests don't fail inaccurately.
Developed in https://github.com/WordPress/wordpress-develop/pull/6984
Discussed in https://core.trac.wordpress.org/ticket/61576
Props bernhard-reiter, dmsnell, jonsurrell.
See #61576.
Built from https://develop.svn.wordpress.org/trunk@58712
git-svn-id: http://core.svn.wordpress.org/trunk@58114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a fail-safe to return an empty string should the `switch` ever fall through without returning.
Currently, `WP_REST_Templates_Controller::get_wp_templates_author_text_field()` is tightly coupled to `WP_REST_Templates_Controller::get_wp_templates_original_source_field()`. However, if the `$original_source` values change in either method, but not both, it is possible a `void` or `null` will be returned, rather than a `string`.
Follow-up to [57366].
Props antonvlasenko, hellofromTonya, debarghyabanerjee.
Fixes#61580.
Built from https://develop.svn.wordpress.org/trunk@58705
git-svn-id: http://core.svn.wordpress.org/trunk@58107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Pullquote spacings wasn't reflected on front when using border settings. This caused double borders which was due to styling but this was done before optional borders were implemented. The pull request chosen presumes when you have an external border you no longer want the internal one but does look visually better.
Props nidhidhandhukiya, huzaifaalmesbah, poena, sabernhardt.
Fixes#59754.
Built from https://develop.svn.wordpress.org/trunk@58689
git-svn-id: http://core.svn.wordpress.org/trunk@58091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If you have a published page set to a section but also private, draft, pending or trash at some point in the future it was still showing on the homepage. There was no clarity to the user what was happening. This adds in a check to the post_status variable before displaying panel content and adjusts the customizer to show a placeholder if the page is draft,trashed,deleted.
Props brettshumaker, sabernhardt.
Fixes#46604.
Built from https://develop.svn.wordpress.org/trunk@58687
git-svn-id: http://core.svn.wordpress.org/trunk@58089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There were multiple discrepancies between the editor and front end with [58399] matched incorrect border color due to specificity. This resolves that and also includes issues not caught in [60293]. The full list of what this does is in ticket but a summary is reduces specificity for table cell border, removes border color rules, replaces selectors and adds wrapper so alignment changes within the iframe.
Props sabernhardt.
Fixes#61563.
Built from https://develop.svn.wordpress.org/trunk@58686
git-svn-id: http://core.svn.wordpress.org/trunk@58088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit reverts the code to the code from before the bug fix related to PHP 5.2.6–5.2.17.
As support for PHP 5.2 has been dropped, the workaround for the PHP 5.2 bug is no longer needed.
Follow-up to [38015], [38017], [44950], [45058], [57985], [58678], [58682].
Props jrf, ayeshrajans.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58683
git-svn-id: http://core.svn.wordpress.org/trunk@58085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit:
* Removes various comments referencing PHP versions which are no longer supported.
* Removes various comments containing “hints” of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons, so have no value:
* Even though a function could be turned into a closure, removing the function would be a backward compatibility break which is not acceptable, so this suggestion is not actionable.
* Short ternaries are forbidden by the coding standard exactly to prevent the faulty code suggested in the comment from getting into the codebase.
Follow-up to [1243/tests], [6543], [11816], [29861], [29864], [34928], [35369], [36698], [38694], [50786], [58678].
Props jrf, ayeshrajans.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58682
git-svn-id: http://core.svn.wordpress.org/trunk@58084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When WordPress sends out a password-reset or new-user email, it generates
a link for someone to follow in order to take them to the reset page. If
the user login name ends in a period, however, that generated URL will
end in a period and many email clients will confuse it with a
sentence-ending period instead of being part of the query arguments.
In this patch, the generated URL's query argument are rearranged so that
the link will never end in a period. Alternative ideas were explored to
create a new function to escape URL-ending periods, but this patch resolves
the reported problem without raising any further architectural questions.
Developed in https://github.com/WordPress/wordpress-develop/pull/6834
Discussed in https://core.trac.wordpress.org/ticket/42957
Props audrasjb, costdev, daveagp, dmsnell, hellofromTonya, markparnell, mukesh27, nhrrob, obrienlabs, paulcline.
Fixes#42957.
Built from https://develop.svn.wordpress.org/trunk@58674
git-svn-id: http://core.svn.wordpress.org/trunk@58076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [56082].
See #61573.
Built from https://develop.svn.wordpress.org/trunk@58673
git-svn-id: http://core.svn.wordpress.org/trunk@58075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In order to add support for the SELECT and TABLE tags in the HTML Processor, it
needs to implement the HTML algorithm named "reset the insertion mode
appropriately".
This patch implements that algorithm to unblock the additional tag support. The
algorithm resets the parsing mode after specific state changes in complicated
situations where alternative rules are in effect (such as rules governing how
the parser handles tags found within a TABLE element).
Developed in https://github.com/WordPress/wordpress-develop/pull/6020
Discussed in https://core.trac.wordpress.org/ticket/61549
Props dmsnell, jonsurrell.
Fixes#61549.
Built from https://develop.svn.wordpress.org/trunk@58656
git-svn-id: http://core.svn.wordpress.org/trunk@58070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After the changes in [58165] and [58645] and all associated backports, the workflow that dispatches regular testing in older branches needed to be updated.
- The `test-npm.yml` workflow no longer exists.
- The `test-build-processes.yml` has taken the place of `test-npm.yml` in all branches.
Also, the workflow will now run whenever an old version of the reusable PHPUnit workflow is updated (v1 or v2). This is to ensure the changes don’t cause any compatibility problems in older branches.
See #61213.
Built from https://develop.svn.wordpress.org/trunk@58654
git-svn-id: http://core.svn.wordpress.org/trunk@58069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The table and calendar block font sizes were not as expected on front end within editor. This includes changes for header cells (th), removes redundant font size rules, corrects font-weight and updates figcaption selector along with editing text alignment and adding RTL font selection.
Props nidhidhandhukiya, sabernhardt, sheulyshila, iamfarhan09, bijit027, jannathsyeda, pooja1210, shailu25, hmbashar.
Fixes#58355.
Built from https://develop.svn.wordpress.org/trunk@58635
git-svn-id: http://core.svn.wordpress.org/trunk@58064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When selecting center alignment for Archives or Categories List blocks the alignment was not matching. It is worth noting this fixes for these blocks but another ticket could be made to fix for titles.
Props pranitdugad, sabernhardt.
Fixes#47044.
Built from https://develop.svn.wordpress.org/trunk@58627
git-svn-id: http://core.svn.wordpress.org/trunk@58057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `$user_login` in the `login` action is already escaped on output.
* `$user_login` and `$user_email` in the `register` action are already unslashed a few lines above.
Follow-up to [3120], [4339], [8454], [11104], [23416], [23554], [23594], [46640].
Props johnjamesjacoby, rajinsharwar, narenin.
Fixes#55335.
Built from https://develop.svn.wordpress.org/trunk@58623
git-svn-id: http://core.svn.wordpress.org/trunk@58056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The images have been uploaded to the w.org CDN and added into the About page. Additionally, the link to the release page has been fixed, and an extra translator note about the escaped percent sign has been added.
Follow-up to [58568].
Props ryelle, joen.
See #61320.
Built from https://develop.svn.wordpress.org/trunk@58618
git-svn-id: http://core.svn.wordpress.org/trunk@58051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `WP_Plugins_List_Table::add_dependencies_to_dependent_plugin_row()`, a `sprintf()` call previously wrapped the `%2$s` placeholder in paragraph tags.
[57769] changed the placeholder's value to use `wp_get_admin_notice()`, which returns a paragraph-wrapped notice by default. As a result, the previous paragraph tags produced an extra, empty paragraph.
This removes the paragraph tags around the `%2$s` placeholder.
Follow-up to [57545], [57714], [57769].
Props mukesh27.
Fixes#61546.
Built from https://develop.svn.wordpress.org/trunk@58616
git-svn-id: http://core.svn.wordpress.org/trunk@58049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Block Hooks mechanism was previously extended to allow insertion of a block as a Navigation block's first or last child. This was implemented by storing the `ignoredHookedBlocks` array in the corresponding `wp_navigation` post's post meta (instead of a metadata attribute on the anchor block).
This changeset extends that mechanism to Template Part blocks, by storing said metadata in the corresponding `wp_template_part` post's post meta, thus allowing extenders to use Block Hooks to insert a block as a Template Part block's first or last child, respectively.
Props tomjcafferkey, bernhard-reiter.
Fixes#60854.
Built from https://develop.svn.wordpress.org/trunk@58614
git-svn-id: http://core.svn.wordpress.org/trunk@58047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As of [58457], the width and height cropping values are cast to an integer before the comparison to see if the target width and height differ from the original width and height.
Since they are now integers, it exposes a bug where the `&&` of the `if` conditional meant that if you were only cropping in one dimension, the check wouldn't pass, and cropping would not occur.
In the block editor, the cropping tools are aspect ratio based, so one of the dimensions will always match that of the source image. Therefore, now that the values are cast as integers, the condition that allows a cropping to occur needs to be updated. If either width or height is different from the source image, then a crop should be allowed.
Follow-up to [50124], [58457].
Props andrewserong, jrf, kevin940726.
Fixes#61514. See #59782.
Built from https://develop.svn.wordpress.org/trunk@58612
git-svn-id: http://core.svn.wordpress.org/trunk@58045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the reusable coding standards GitHub Actions workflow to support the old way of running PHPCS commands when the `old-branches` input flag is set to `true`. This allows the 5.1-5.4 branches to use the same workflow as all other 5.5+ branches.
See #61213.
Built from https://develop.svn.wordpress.org/trunk@58596
git-svn-id: http://core.svn.wordpress.org/trunk@58042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The changes associated with #61213 aim to update all branches potentially receiving security updates to use the same workflow files for easier maintenance as much as possible. However, there are times when the logic found in GitHub Action workflow files changes pretty drastically.
For PHPUnit testing, there are 2 instances where this occurred: the 5.2 and 5.9 branches. This changeset introduces 2 new reusable PHPUnit workflow files for use the 4.1-5.1 and 5.2-5.9 branches.
Including these workflows in `trunk` makes it more clear which version of the workflow file is used by these old branches, and allows Dependabot to open PRs for updating 3rd-party actions within these workflows.
Props jorbin.
See #61213.
Built from https://develop.svn.wordpress.org/trunk@58595
git-svn-id: http://core.svn.wordpress.org/trunk@58041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [57563], [57649], [57822], [57826], [57835], [58159], [58327].
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58594
git-svn-id: http://core.svn.wordpress.org/trunk@58040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When [58304] introduced the abililty to visit virtual nodes in the HTML document,
those being the nodes which are implied by the HTML but no explicitly present in
the raw text, a bug was introduced in the `get_breadcrumbs()` method because it
wasn't updated to be aware of the virtual nodes. Therefore it would report the
wrong breadcrumbs for virtual nodes. Since the new `get_depth()` method is based
on the same logic it was also broken for virtual nodes.
In this patch, the breadcrumbs have been updated to account for the virtual nodes
and the depth method has been updated to rely on the fixed breadcrumb logic.
Developed in https://github.com/WordPress/wordpress-develop/pull/6914
Discussed in https://core.trac.wordpress.org/ticket/61348
Follow-up to [58304].
Props dmsnell, jonsurrell, zieladam.
See #61348.
Built from https://develop.svn.wordpress.org/trunk@58588
git-svn-id: http://core.svn.wordpress.org/trunk@58035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This partially reverts [58563], which applied an update of the `uglify-js` `devDependency` from `3.17.4` to `3.18.0`.
The `3.18.0` update is causing some JavaScript errors in the `media-views.min.js` file, so needs to be investigated further.
Props david.binda, mukesh27, alshakero.
Fies #61519.
Built from https://develop.svn.wordpress.org/trunk@58585
git-svn-id: http://core.svn.wordpress.org/trunk@58032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The first tag wasn't switching correctly. This resolves it for an adjacent RTL language link setting list items to inline-block.
Props manooweb, audrasjb, SergeyBiryukov, davidbaumwald, marybaum, sabernhardt.
Fixes#46658.
Built from https://develop.svn.wordpress.org/trunk@58582
git-svn-id: http://core.svn.wordpress.org/trunk@58029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes restoring paragraph tags for “User updated” and “← Go to Users” messages, so that the arrow is not on the same line as the previous message.
Follow-up to [56570].
Props Presskopp, narenin, swissspidy, SergeyBiryukov.
Fixes#61506.
Built from https://develop.svn.wordpress.org/trunk@58581
git-svn-id: http://core.svn.wordpress.org/trunk@58028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a new filter `script_module_data_{$module_id}` to associate data
with a Script Module. For example:
{{{#!php
add_filter(
'script_module_data_MyScriptModuleID',
function ( array $data ): array {
$data['script-needs-this-data'] = 'ok';
return $data;
}
);
}}}
If the Script Module is included in the page, enqueued or as a
dependency, the associated data will be JSON-encoded and embedded in the
HTML in a `<script type="application/json">` tag with an ID of the form
`wp-script-module-data-{$module_id}` allowing the Script Module to
access the data on the client.
See the original proposal: https://make.wordpress.org/core/2024/05/06/proposal-server-to-client-data-sharing-for-script-modules/
Developed in https://github.com/WordPress/wordpress-develop/pull/6682.
Props jonsurrell, cbravobernal, westonruter, gziolo, bernhard-reiter, youknowriad, sergiomdgomes, czapla.
Fixes#61510. See #60647.
Built from https://develop.svn.wordpress.org/trunk@58579
git-svn-id: http://core.svn.wordpress.org/trunk@58026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prior to this changeset, the function `update_ignored_hooked_blocks_postmeta()` used the core function `update_post_meta()` to write `_wp_ignored_hooked_blocks` data to the database during an operation that is preparing a post to be inserted.
Since we have access to the incoming changes that are being prepared we can remove this database operation in favour of writing the data to the post object provided under `meta_input`.
Doing this means two things:
1. It allows us to store postmeta for new posts that are about to be created since they don't have an `ID` yet (which is information `update_post_meta()` needs).
2. The core controller will take care of updating postmeta in a more predictable pattern.
Props tomjcafferkey, bernhard-reiter.
Fixes#61495.
Built from https://develop.svn.wordpress.org/trunk@58578
git-svn-id: http://core.svn.wordpress.org/trunk@58025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [58470] a change was made to normalize the filename in validate_file, however this leads to instances where the list of files that are allowed aren't normalized such as in the theme editor. By normalizing the array, the comparison is apples to apples.
Fixes#61488.
Props jorbin, hellofromtonya, swissspidy, misulicus, script2see, Presskopp, audrasjb, peterwilsoncc, siliconforks, littler.chicken, paulkevan,
Built from https://develop.svn.wordpress.org/trunk@58570
git-svn-id: http://core.svn.wordpress.org/trunk@58018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This rebuilds compiled CSS files after updating the `caniuse` database in [58563].
All `-webkit-clip-path` properties have been removed as the corresponding browsers dipped below 1% usage and have fallen out of the browser support policy.
Fixes#61499.
Built from https://develop.svn.wordpress.org/trunk@58567
git-svn-id: http://core.svn.wordpress.org/trunk@58015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This takes into account the changes from #47125 and updates the related Help Tabs content accordingly.
Follow-up to [56515].
Props johnbillion, renishsurani, faisal03, shailu25, sumitbagthariya16, Ankit-K-Gupta, oglekler, rajinsharwar, hmbashar, huzaifaalmesbah.
Fixes#61153.
Built from https://develop.svn.wordpress.org/trunk@58564
git-svn-id: http://core.svn.wordpress.org/trunk@58012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This patch introduces two related changes:
- It adds missing subclass methods on the HTML Processor which needed
to be implemented since it started visiting virtual nodes. These
methods need to account for the fact that not all tokens truly exist.
- It adds a new concept and internal method, `is_virtual()`, indicating
if the currently-matched token comes from the raw text in the input
HTML document or if it was the byproduct of semantic parsing rules.
This internal method and new vocabulary around token provenance
considerably simplifies the logic spread throughout the rest of the
class and its subclass methods.
Developed in https://github.com/WordPress/wordpress-develop/pull/6860
Discussed in https://core.trac.wordpress.org/ticket/61348
Follow-up to [58304].
Props dmsnell, jonsurrell, gziolo.
See #61348.
Built from https://develop.svn.wordpress.org/trunk@58558
git-svn-id: http://core.svn.wordpress.org/trunk@58006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [55959], [55986], [57547], [57716], [58244], [58422].
See #60706.
Built from https://develop.svn.wordpress.org/trunk@58478
git-svn-id: http://core.svn.wordpress.org/trunk@57927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When a border color and width was added to the pullquote block but no border style was chosen the border was not visible. The expectation is that the border has a solid style by default when a color is selected.
Props pranitdugad, poena, sabernhardt.
Fixes#61362.
Built from https://develop.svn.wordpress.org/trunk@58469
git-svn-id: http://core.svn.wordpress.org/trunk@57918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
These changes involve:
- Move shared variation definitions from styles.blocks.variations to styles.variations
- Remove blockTypes from styles.variations.
- Do not register shared variations from theme style variation or primary theme.json files.
- Move the merging of theme.json data into the WP_Theme_JSON_Resolver and WP_Theme_JSON classes.
These changes improve performance and are more future-proof API wise.
See conversation at https://github.com/WordPress/gutenberg/issues/62686
Props aaronrobertshaw, oandregal, andrewserong, joemcgill, talldanwp, andrewserong, ramonopoly, richtabor, youknowriad.
See #61312, #61451.
Built from https://develop.svn.wordpress.org/trunk@58466
git-svn-id: http://core.svn.wordpress.org/trunk@57915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The font size was different in the last comments block depending on if it was in the editor or front. This resolves that by checking block for special font size before applying default and using inherit for nested elements.
Props pitamdey, sabernhardt.
Fixes#61082.
Built from https://develop.svn.wordpress.org/trunk@58464
git-svn-id: http://core.svn.wordpress.org/trunk@57913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In the page list block the text decoration was not the same on the front as the editor. This adds underline to links when in the post editor classic or block. This does not resolve the font size issue that needs to be fixed in block editor reset styles.
Props viralsampat, sabernhardt.
Fixes#61441.
Built from https://develop.svn.wordpress.org/trunk@58463
git-svn-id: http://core.svn.wordpress.org/trunk@57912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [56058].
See #60705.
Built from https://develop.svn.wordpress.org/trunk@58462
git-svn-id: http://core.svn.wordpress.org/trunk@57911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This brings more consistency with the other files having the same pattern:
* `wp-admin/moderation.php`
* `wp-admin/ms-admin.php`
* `wp-admin/ms-edit.php`
* `wp-admin/ms-sites.php`
* `wp-admin/ms-themes.php`
* `wp-admin/ms-upgrade-network.php`
* `wp-admin/ms-users.php`
Follow-up to [15481], [16847].
Props jigar-bhanushali, jorbin, johnbillion, Presskopp, rajinsharwar, audrasjb, SergeyBiryukov.
Fixes#60926.
Built from https://develop.svn.wordpress.org/trunk@58460
git-svn-id: http://core.svn.wordpress.org/trunk@57909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes text strings from the query pagination block that are not translatable without adding them to patterns.
This means that the texts now use the default translation for the block from WordPress, not the theme. The archive, search and home templates now match the text in the query pagination in the index template.
Props poena.
Fixes#60298.
Built from https://develop.svn.wordpress.org/trunk@58459
git-svn-id: http://core.svn.wordpress.org/trunk@57908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Cast crop values to integers to prevent PHP error caused by implicit conversion from `float` to `int` values when cropping images using ImageMagick.
Props skithund, mai21, nicomollet, amanias1977, joedolson.
Fixes#59782.
Built from https://develop.svn.wordpress.org/trunk@58457
git-svn-id: http://core.svn.wordpress.org/trunk@57906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The admin image editor crop function introduced rounding errors by using a scaled image to calculate values. Fix uses the image at 100% scale for calculations. Also avoid recalculating selection when the selection position is changed, and prevent incorrect values after scaling or restoration.
Props Jossnaz, johnillo, shailu25, rachelbaker, sudipatel007, joedolson.
Fixes#32282.
Built from https://develop.svn.wordpress.org/trunk@58456
git-svn-id: http://core.svn.wordpress.org/trunk@57905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add the attribute `role="alert"` on 12 instances of admin notices that are injected into the DOM using JavaScript. The `role="alert"` attribute allows screen readers to recognize the addition to the DOM and announce the errors to users.
Props afercia, cyrus11, rcreators, joedolson.
Fixes#47111.
Built from https://develop.svn.wordpress.org/trunk@58455
git-svn-id: http://core.svn.wordpress.org/trunk@57904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Document each element within the filter parameter `$clauses` associative array structure for the `'comments_clauses'`, `'networks_clauses'`, and `'sites_clauses'` filters.
This change:
* Brings consistency amongst the `WP_[*_]Query` filters.
* Helps to improve understanding.
* Helps to avoid confusion of the purpose for `pieces` and `clauses`.
Follow-up to [53376], [53375], [52974].
Props david.binda, audrasjb, hellofromTonya, ironprogrammer, johnbillion, oglekler, SergeyBiryukov.
Fixes#61307.
Built from https://develop.svn.wordpress.org/trunk@58454
git-svn-id: http://core.svn.wordpress.org/trunk@57903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds template and template_lock property of the post type to post types REST API endpoint.
This change allows us to fix a bug where the template of a page is not respected when creating a new page on the site editor.
Props jorgefilipecosta, oandregal, timothyblynjacobs, mukesh27.
Fixes#61477.
Built from https://develop.svn.wordpress.org/trunk@58452
git-svn-id: http://core.svn.wordpress.org/trunk@57901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds in a useful file to know how to compiled this theme. As there was previously a contributing file with instruction on this in the GitHub repo that was not brought into svn, this fixes that.
Props kjeller, nielslange, sabernahardt.
Fixes#46108.
Built from https://develop.svn.wordpress.org/trunk@58451
git-svn-id: http://core.svn.wordpress.org/trunk@57900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Set `aria-modal` and `aria-hidden` attributes when the Classic Editor link inserter modal is active, so that content behind the modal will be properly treated as inert when interacting with the modal.
Props lyonmuller, jwgoedert, sabernhardt, alexstine, afercia, rajinsharwar, rcreators, audrasjb, hmbashar, joedolson.
Fixes#60799.
Built from https://develop.svn.wordpress.org/trunk@58450
git-svn-id: http://core.svn.wordpress.org/trunk@57899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update behavior of admin menu so that the `aria-haspopup` attribute is only applied in responsive mode, when there is a popup behavior present. Add `aria-expanded` attributes to report current popup state.
Props afercia, khokansardar, ryokuhi, joedolson.
Fixes#43095.
Built from https://develop.svn.wordpress.org/trunk@58449
git-svn-id: http://core.svn.wordpress.org/trunk@57898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Match the naming behavior for uploaded media in the REST API to the way media is named when uploading in the media library. Fix an issue where dashes were replacing spaces unnecessarily.
Props abitofmind, kadamwhite, spacedmonkey, adamsilverstein, audrasjb, hellofromTonya.
Fixes#57957.
Built from https://develop.svn.wordpress.org/trunk@58447
git-svn-id: http://core.svn.wordpress.org/trunk@57896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This checks that objects returned from any of the `wp_theme_json_data_` filters are `WP_Theme_JSON_Data` objects in order to avoid incompatibilities. Otherwise, reprocess the theme.json data as new `WP_Theme_JSON` objects to ensure the data matches the expectations of code consuming that data.
Follow-up to [58185].
Props joemcgill, adamsilverstein, oandregal, ryelle, ocean90, pbearne.
See #61112.
Built from https://develop.svn.wordpress.org/trunk@58443
git-svn-id: http://core.svn.wordpress.org/trunk@57892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes a PHP 8.1 and above "null to non-nullable" deprecation notice in `get_available_post_mime_types()`:
{{{
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in ./wp-includes/post.php on line 3395
}}}
[https://developer.wordpress.org/reference/functions/get_available_post_mime_types/#return This function is documented] to:
* Return `An array of MIME types.`
* as an array of `string`s, i.e. `string[]`.
A `null` or empty element within the returned array is not a valid MIME type. If a `null` exists in the returned array, it is the root cause of PHP throwing the deprecation notice.
This commit removes the `null` and empty elements from the returned array of MIME types. It also adds a unit test.
Follow-up to [56623], [56452].
Props nosilver4u, jrf, ironprogrammer, antpb, antonvlasenko, rajinsharwar, hellofromTonya.
Fixes#59195.
Built from https://develop.svn.wordpress.org/trunk@58437
git-svn-id: http://core.svn.wordpress.org/trunk@57886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [58128], additional maintenance mode calls were added to the automatic updates process. However, there is an early return if a 'core' automatic update fails.
Maintenance mode isn't disabled until later in the `WP_Automatic_Updater::update()` method. This means that maintenance mode may continue to be enabled despite the core update being treated as a skipped update.
This disables maintenance mode before the early return.
Follow-up to [58128].
Props costdev, hellofromTonya, peterwilsoncc.
Fixes#61459. See #58281.
Built from https://develop.svn.wordpress.org/trunk@58436
git-svn-id: http://core.svn.wordpress.org/trunk@57885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After installation, the user is directed to the `Log In` page. This triggers the `wp_schedule_update_checks()` function which is hooked to `init` and schedules updates to run immediately if no other events exist. As a result of more robust use of maintenance mode for automatic updates added in [58128], the user may be presented with a maintenance mode screen just after installing WordPress.
To improve the user experience, this schedules core updates for 1 hour, plugin updates for 1.5 hours, and theme updates for 2 hours after installation.
Follow-up to [58128], [58139], [58308], [58309].
Props afragen, hellofromTonya, peterwilsoncc, nithi22, dd32.
Fixes#61457. See #58281, #61391.
Built from https://develop.svn.wordpress.org/trunk@58435
git-svn-id: http://core.svn.wordpress.org/trunk@57884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sometimes errors only occur in unusual code paths such as the maintenance mode or installation screens. Due to lack of tests for these scenarios in core, such errors are usually only noticed very late. This change adds new end-to-end (e2e) tests to prevent regressions in the following areas:
- Maintenance mode (presence of a `.maintenance` file)
- Fatal error handler (simulated with an mu-plugin that causes an error)
- Installation screen (verifying full installation flow & that there are no database errors)
Thanks to these tests, an issue was already found and addressed in the default `wp_die` handler, as `wp_robots_noindex_embeds` and `wp_robots_noindex_search` used to cause PHP warnings due to `$wp_query` not existing.
In the future, these tests can be extended to also test scenarios like localized error pages via `wp_load_translations_early()`.
Fixes#61240.
Built from https://develop.svn.wordpress.org/trunk@58430
git-svn-id: http://core.svn.wordpress.org/trunk@57879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [5983], a call to `clean_term_cache()` was removed from `wp_set_object_terms()`. Since then, the `$term_ids` array that had been populated inside one of the `foreach` loops before being passed to the removed `clean_term_cache()` call has not been used.
This change removes the unused `$term_ids` variable.
Follow-up to [5983].
Props dlh, mukesh27.
Fixes#61456.
Built from https://develop.svn.wordpress.org/trunk@58427
git-svn-id: http://core.svn.wordpress.org/trunk@57876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When saving options from the Settings page, include the `'ping_sites'` option in the allowed "writing" options list only when the `'blog_public'` option is `'1'`.
Fixes a PHP 8.1 and above "null to non-nullable" deprecation notice in `sanitize_option()` ([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php?annotate=blame#L4952 which happens when here] as part of [22255]):
{{{
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../wp-includes/formatting.php
}}}
**Explanation**
[https://developer.wordpress.org/apis/options/#writing Per the documentation], the `ping_sites` option requires the `'blog_public'` option to have a value of `'1'` and must be a `string` data type. `null` is not valid for this option.
The relationship between the 2 options shows itself in the `options-writing.php` code ([https://core.trac.wordpress.org/browser/tags/6.5.4/src/wp-admin/options-writing.php#L233 shown here] and in [4326]), as the `textarea#ping_sites` only renders when `'1' === get_option( 'blog_public' )`.
**What happens if `'blog_public'` is not `'1'`?**
The `'ping_sites'` option will not be a field on the page. Upon saving:
* HTTP POST (`$_POST`) does not include `'ping_sites'`.
* Before this commit:
* The [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/options.php#L333 option's value was set to] `null` before being passed to `update_option()`.
* `update_option()` invokes `sanitize_option()`.
* A `null` value for the `'ping_sites'` case was passed to `explode()`, which threw a deprecation notice on PHP 8.1 and above.
* With this commit, the `'ping_sites'` option is no longer included in the allow list and thus will not be passed to `update_options()` > `sanitize_option()` > `explode()`.
Follow-up to [22255], [12825], [4326], [949].
Props kitchin, SergeyBiryukov, swissspidy, devmuhib, rajinsharwar, hellofromTonya.
Fixes#59818.
Built from https://develop.svn.wordpress.org/trunk@58425
git-svn-id: http://core.svn.wordpress.org/trunk@57874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [58418] a test was added without the `test_` prefix in its function
name, and because of that, it wasn't run in the test suite.
The prefix has been added to ensure that it runs.
In the original patch, due to a logical bug, a recursive loop to
transform the inside contents of the bogus comments was never run
more than once. This has been fixed.
This patch also includes one more case where `kses` wasn't
properly detecting the bogus comment state, and adds a test case
to cover this. It limits itself to some but not all constructions
of invalid markup declaration so that it doesn't conflict with
existing behaviors around those and other kinds of invalid comments.
Props ellatrix, dmsnell.
See #61009.
Follow-up to [58418].
Built from https://develop.svn.wordpress.org/trunk@58424
git-svn-id: http://core.svn.wordpress.org/trunk@57873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When `wp_kses_split` processes a document it attempts to leave HTML comments
alone. It makes minor adjustments, but leaves the comments in the document in
its output. Unfortunately it only recognizes one kind of HTML comment and
rejects many others.
This patch makes a minor adjustment to the algorithm in `wp_kses_split` to
recognize and preserve an additional kind of HTML comment: closing tags with
an invalid tag name, e.g. `</%dolly>`.
These invalid closing tags must be interpreted as comments by a browser.
This bug fix aligns the implementation of `wp_kses_split()` more closely
with its stated goal of leaving HTML comments as comments.
It doesn't attempt to fully fix the mis-parsed comments, but it does propose a
minor fix that hopefully won't break any existing code or projects.
Developed in https://github.com/WordPress/wordpress-develop/pull/6395
Discussed in https://core.trac.wordpress.org/ticket/61009
Props ellatrix, dmsnell, joemcgill, jorbin, westonruter, zieladam.
See #61009.
Built from https://develop.svn.wordpress.org/trunk@58418
git-svn-id: http://core.svn.wordpress.org/trunk@57867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is a clean revert of r58415 as tests seem to now be failing with this change. Likely the test needs an update as well to accomodate the new successful version check.
Follow-up to [60798].
Props jorbin, hellofromTonya.
See #60798.
Built from https://develop.svn.wordpress.org/trunk@58417
git-svn-id: http://core.svn.wordpress.org/trunk@57866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes some autoload values that were updated in [58105] that used the database values of `"on"` and `"off"` instead of the boolean values `true` and `false` when being passed to `add|update_option()`.
Props joemcgill, desrosj, rajinsharwar.
Fixes#61045. See #42441.
Built from https://develop.svn.wordpress.org/trunk@58416
git-svn-id: http://core.svn.wordpress.org/trunk@57865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously `remove_pdf_alpha_channel()` used `Imagick::getVersion()` to validate the environment is capable of handling alpha. This was the incorrect function to use to check the module version as it will only provide the ImageMagick API version. This patch adjusts to instead use `phpversion()` as this is the correct method to get the Imagick version needed to determine alpha compatibility. This fixes a number of host tests that have been correctly failing on subsets of environments. Serendipidously, sometimes the API version was high enough to avoid shining light on this problem.
Props swissspidy, joedolson, antpb.
Fixes#60798.
Built from https://develop.svn.wordpress.org/trunk@58415
git-svn-id: http://core.svn.wordpress.org/trunk@57864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replaces `trigger_error()` with `wp_trigger_error()`.
The usage of `wp_trigger_error()` avoids generating `E_USER` family errors unless `WP_DEBUG` is on. In doing so, users should not see these messages in normal production.
Notes:
* Removes `E_USER_NOTICE` when passed as an argumnent, as it's the default error level.
* An empty string is passed for the function name when its name is already in the error message or does not add value to the error message.
* Externally maintained libraries are not included.
Follow-up to [55204], [25956], [29630], [38883], [52062], [52049], [54272], [38883], [55245], [51599], [14452], [38883], [24976].
Props prasadkarmalkar, rajinsharwar, thelovekesh, hellofromTonya, swissspidy.
Fixes#59652.
Built from https://develop.svn.wordpress.org/trunk@58409
git-svn-id: http://core.svn.wordpress.org/trunk@57858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix issue where the attachment thumbnail would be rendered as the site logo on attachment single templates if no site logo is set. Avoid calling `wp_attachment_is_image()` with no value, since that function will fallback to the global `$post` variable. Follow up to [58213]. See #60922.
Props greenshady, krupajnanda, hmbashar, rajinsharwar, joedolson.
Fixes#61408.
Built from https://develop.svn.wordpress.org/trunk@58407
git-svn-id: http://core.svn.wordpress.org/trunk@57856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This prevents the display of an inaccurate message when the `wp_insert_post_data` filter is used to change the status of a post while saving. This bug was only present when using the Classic Editor.
The previous code incorrectly assumed that a filter would never change a post’s status to `draft`, resulting in a “Post published.” message instead of “Post draft updated.”.
Props freibergergarcia, sirzooro, hakre, blepoxp, scribu, kawauso.
Fixes#11207.
Built from https://develop.svn.wordpress.org/trunk@58406
git-svn-id: http://core.svn.wordpress.org/trunk@57855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Finish task to replace placeholders used for labels with visible label elements. Add label elements in theme browser and theme installation screen. Change position of search input to match other user interfaces in WordPress.
Also crediting all contributors to ticket #61389, which this also closes.
Props joedolson, rcreators, sabernhardt, balub, rejaulalomkhan, syamraj24, nazmul111, krupajnanda, huzaifaalmesbah, hmbashar, mdnesarmridha, colorful-tones, printsachen1.
Fixes#40331, #61389.
Built from https://develop.svn.wordpress.org/trunk@58405
git-svn-id: http://core.svn.wordpress.org/trunk@57854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Removes an unassigned `sprintf` that was accidentally included as part of [57545] in the `wp_get_plugin_action_button()`. A copy/paste whoopsie.
The actual used code is assigned a wee bit lower in the function within the `install` case.
Follow-up to [57545].
Props hellofromTonya, costdev, rajinsharwar.
Fixes#61420.
Built from https://develop.svn.wordpress.org/trunk@58402
git-svn-id: http://core.svn.wordpress.org/trunk@57851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensure new multisite installs are up to date with the current mime types supported in core.
Note that this will only affect newly created networks, since this is only used to populate the schema for new networks, not change the allowed mime types for existing networks
Props spacedmonkey, costdev, pavanpatil1, joemcgill, rajinsharwar, tb1909.
Fixes#53167.
Built from https://develop.svn.wordpress.org/trunk@58400
git-svn-id: http://core.svn.wordpress.org/trunk@57849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset reverts part of the changes made in [58298] to avoid using regex that can cause potential bugs. It is indeed safer to revert these changes for now and do the refactoring once the HTML API supports CSS selectors and provides a way to set inner content.
It also adds a unit test to cover the regression experienced in https://github.com/WordPress/gutenberg/issues/62347.
Follow-up to [58298].
Props santosguillamot, gziolo.
Fixes#61385.
See #61351.
Built from https://develop.svn.wordpress.org/trunk@58398
git-svn-id: http://core.svn.wordpress.org/trunk@57847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[57545] introduced `wp_get_plugin_action_button()`. This function is documented to return a `string`. However, if the user does not have the appropriate capabilities, it returned `void`, which is unexpected.
Resolves the issue by moving the `return $button` to the bottom of the function to ensure it always returns a `string` type. On success, the button's HTML string is returned; else, an empty string is returned.
Unit tests are included.
Follow-up to [57545].
Props costdev, rajinsharwar, hellofromTonya.
Fixes#61400.
Built from https://develop.svn.wordpress.org/trunk@58396
git-svn-id: http://core.svn.wordpress.org/trunk@57845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Scalar values passed to `esc_attr()` are already converted internally to a string via both `wp_check_invalid_utf8()` and `_wp_specialchars()`.
Includes adding `@covers` tags for unit tests.
Follow-up to [58379].
See #58379.
Built from https://develop.svn.wordpress.org/trunk@58389
git-svn-id: http://core.svn.wordpress.org/trunk@57838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
These attributes are needed to indicate that both fields are required. This changeset doesn't add the attribute by default but allows extenders to enable it by passing `true` to the `$required_username` and `$required_password` to `wp_login_form()` arguments array.
Props alesflex, sabernhardt, joedolson, rcreators, rajinsharwar.
Fixes#60062.
Built from https://develop.svn.wordpress.org/trunk@58382
git-svn-id: http://core.svn.wordpress.org/trunk@57831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Lowers the priority at which `wp_filter_default_autoload_value_via_option_size()` is registered to run on the `wp_default_autoload_value()` filter. The default filter now runs at priority 5.
This is to allow third party developers to modify whether an option is autoloaded using the default priority, 10, rather than require they register their code to run at a higher priority.
Follow up to [57920].
Props peterwilsoncc, joemcgill.
Fixes#42441.
Built from https://develop.svn.wordpress.org/trunk@58381
git-svn-id: http://core.svn.wordpress.org/trunk@57830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Escapes the return value of `wp_autoload_values_to_autoload()` for use in the database query loading 'all options'. This is a hardening fix to protect against future changes to the options API which may allow developers to further customize the return value of the `wp_autoload_values_to_autoload` filter.
Follow up to [57920].
Props peterwilsoncc, joemcgill.
Fixes#42441.
Built from https://develop.svn.wordpress.org/trunk@58380
git-svn-id: http://core.svn.wordpress.org/trunk@57829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent `WP_List_Table::search_box()` from throwing an array to string conversion notice when post list tables are loaded with an array of orderby parameters in the URL, eg: `/wp-admin/edit.php?post_type=page&orderby[menu_order]=ASC&orderby[title]=ASC`.
Follow up to [29027].
Props leonidasmilossis, rajinsharwar, swissspidy, NomNom99, pls78, SergeyBiryukov.
Fixes#59494.
See #17065.
Built from https://develop.svn.wordpress.org/trunk@58379
git-svn-id: http://core.svn.wordpress.org/trunk@57828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates tests calling `get_stylesheet` to not output layout styles if they’re not relevant to the test or to call `get_styles_for_block` instead where more appropriate.
Props isabel_brison, andrewserong, ramonopoly.
Fixes#61371.
Built from https://develop.svn.wordpress.org/trunk@58378
git-svn-id: http://core.svn.wordpress.org/trunk@57827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add the label `template_name` to post types and taxonomies for use by the site editor to display on the templates/add new template screens to allow extenders to customize the display.
For post types the template name applies to templates for a singular pages with the default value "Single item: [singular name]".
For taxonomies the template name applies to templates for term archives with the default value "[singular name] Archives".
Props aljullu, audrasjb, ntsekouras, ellatrix, oglekler, rajinsharwar.
Fixes#60881.
Built from https://develop.svn.wordpress.org/trunk@58377
git-svn-id: http://core.svn.wordpress.org/trunk@57826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes an issue where the "Bulk select" option was getting selected when only a single user, comment, media, or plugin was selected.
Follow-up to [57745].
Props haritpanchal, swissspidy, sabernhardt, faisal03, sumitbagthariya16, mohitdadhich10.
Fixes#61168.
Built from https://develop.svn.wordpress.org/trunk@58375
git-svn-id: http://core.svn.wordpress.org/trunk@57824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a filter to enable TinyMCE in the media description textarea on the attachment details screen.
The media description field may be used to provide extended descriptions of images and videos, such as a transcript or detailed graphic explanations. In these uses, it will generally require structural elements like paragraphs. Having the ability to enable TinyMCE makes it easier for users to add this content without HTML knowledge.
Props juliemoynat, sebastienserre, mukesh27, joedolson.
Fixes#60158.
Built from https://develop.svn.wordpress.org/trunk@58372
git-svn-id: http://core.svn.wordpress.org/trunk@57821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The search block border was missing inside the wrapper on the front. This was done by adding styles to the theme block styles file along with padding.
Props nidhidhandhukiya, sabernhardt, yurajsinh2211, kamran8176, imranhasanraaz, krupajnanda, harshgajipara, rejaulalomkhan, shailu25, hmbashar, rajinsharwar.
Fixes#60164.
Built from https://develop.svn.wordpress.org/trunk@58369
git-svn-id: http://core.svn.wordpress.org/trunk@57818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The latest comments block space between comments not increases based on typography size. This only impacts the margin if added within a post, widgets on the front-end still only have a 1em margin which is smaller yet variable.
Props pitamdey, sabernhardt, shailu25, harshgajipara, rajinsharwar.
Fixes#59130.
Built from https://develop.svn.wordpress.org/trunk@58367
git-svn-id: http://core.svn.wordpress.org/trunk@57816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the `WP_HTML_Processor` was introduced with its `::create_fragment()`
static creator method, that method has been returning a `new self(...)`.
Unfortunately, this means that subclasses cannot use that method since it
will return the `WP_HTML_Processor` instead of the subclass.
With this patch, the static creator method returns `new static(...)` to preserve
the intended behavior. A new test asserts this behavior for future changes.
Developed in https://github.com/WordPress/wordpress-develop/pull/6729
Discussed in https://core.trac.wordpress.org/ticket/61374
Props dmsnell, jonsurrell.
Follow-up to [56274].
Fixes#61374.
Built from https://develop.svn.wordpress.org/trunk@58363
git-svn-id: http://core.svn.wordpress.org/trunk@57812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The oEmbed endpoint for SlideShare is effectively deprecated and throws an error for the majority of slide-decks using the service.
Capitalize the name of the service in the deprecation notice in accordance with the wordmark.
Props peterwilsoncc, mukesh27, swissspidy, talldanwp, dd32.
Fixes#61349.
Built from https://develop.svn.wordpress.org/trunk@58362
git-svn-id: http://core.svn.wordpress.org/trunk@57811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Stores the font file sub-directory in the `wp_font_face` post meta. Similar to attachments, only the portion of the path relative to the base directory is stored.
This ensures the files can be deleted alongside their post on sites using a plugin to store font files in sub-directories. Previously running such a plugin would result in the files remaining on the file system post delete.
Props costdev, grantmkin, peterwilsoncc.
Fixes#61297.
Built from https://develop.svn.wordpress.org/trunk@58353
git-svn-id: http://core.svn.wordpress.org/trunk@57805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix issue where the image details would shift position during AJAX updates in the media modal. Occurred when the Attachment Details heading was translated into a language where the text no longer alowed space for the 'Saved' message to the right of the message.
Props pavelevap, SergeyBiryukov, antpb, joedolson, shailu25.
Fixes#27914.
Built from https://develop.svn.wordpress.org/trunk@58352
git-svn-id: http://core.svn.wordpress.org/trunk@57804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This prevents workflow runs in older branches that are using older versions of runner images from displaying the wrong operating system in job names.
Because the updated files are reusable, this change will automatically fix the issue in all older branches without the need to backport.
See #61213.
Built from https://develop.svn.wordpress.org/trunk@58351
git-svn-id: http://core.svn.wordpress.org/trunk@57803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This introduces a new input to separate the ability to save the built WordPress ZIP from generating the artifacts necessary for comments with Playground testing details.
The ZIP file is used by the performance testing workflow for performing comparisons, so it should be built and saved for every `push` event. The Playground related steps should only run on `pull_request`.
Follow up to [58274].
Props jorbin.
See #59416.
Built from https://develop.svn.wordpress.org/trunk@58345
git-svn-id: http://core.svn.wordpress.org/trunk@57801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds additional hardening to the Autoload options Health Check to avoid potential bugs when extenders return unserialzed values from `wp_load_alloptions()`.
Follow-up to [58332].
Props mukesh27, joemcgill, westonruter.
Fixes#61276.
Built from https://develop.svn.wordpress.org/trunk@58338
git-svn-id: http://core.svn.wordpress.org/trunk@57794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `$comment_id` parameter of the `get_comment_author` filter is documented as a numeric string, however in case a non-existing comment ID is passed to the `get_comment_author()` function, it could be an integer instead.
This commit resolves the issue and adds a PHPUnit test demonstrating the behavior.
Includes updating `get_comment_author_url()` unit tests for consistency.
Follow-up to [41127], [52818].
Props david.binda.
Fixes#60475.
Built from https://develop.svn.wordpress.org/trunk@58335
git-svn-id: http://core.svn.wordpress.org/trunk@57791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This caches the generated CSS from block nodes in merged Theme JSON data to avoid repeated costly operations required to compute style properties for blocks. The generated CSS is saved to a transient that expires every hour.
Props thekt12, spacedmonkey, pereirinha, mukesh27, isabel_brison, oandregal, andrewserong, ramonjd.
Fixes#59595.
Built from https://develop.svn.wordpress.org/trunk@58334
git-svn-id: http://core.svn.wordpress.org/trunk@57790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset ensures the `user_activation_key` is flushed after successful login, so reset password links can not be used anymore after the user successfully log into their dashboard.
Props nsinelnikov, rajinsharwar, Rahmohn, oglekler, hellofromTonya.
Fixes#58901.
See #32429
Built from https://develop.svn.wordpress.org/trunk@58333
git-svn-id: http://core.svn.wordpress.org/trunk@57789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds a new Site Health check that will alert site owners if they are autoloading a large amount of data from the options table, as it could result in poor performance. The issue will be shown if the size of autoloaded options is greater than 800 KB, which can be adjusted using the new `site_status_autoloaded_options_size_limit` filter.
Props mukesh27, joemcgill, rajinsharwar, costdev, audrasjb, krupajnanda, pooja1210, Ankit K Gupta, johnbillion, oglekler.
Fixes#61276.
Built from https://develop.svn.wordpress.org/trunk@58332
git-svn-id: http://core.svn.wordpress.org/trunk@57788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This allows a calling workflow to configure the PHPUnit workflow to `continue-on-error` when one occurs. This is useful for older branches where support for a specific version of PHP was not at 100% within the test suite.
Follow up to [58165], [58269], [58270], [58329].
See #61213.
Built from https://develop.svn.wordpress.org/trunk@58331
git-svn-id: http://core.svn.wordpress.org/trunk@57787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Interactivity API has a concept of "derived state" but it only worked on the client (JavaScript). This is the implementation that mirrors it, so derived state has good server-side solution.
Props jonsurrell, darerodz, gziolo, luisherranz, cbravobernal.
Fixes#61037.
Built from https://develop.svn.wordpress.org/trunk@58327
git-svn-id: http://core.svn.wordpress.org/trunk@57784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset deactivates the download authenticity message by disabling package signature verification, at least until software signing is fully implemented on wordpress.org. The provided message had no actionability and only led to more support.
Props jipmoors, afercia, bridgetwillard, s0what, rajinsharwar, audrasjb, johnbillion, peterwilsoncc.
Fixes#47315.
Built from https://develop.svn.wordpress.org/trunk@58319
git-svn-id: http://core.svn.wordpress.org/trunk@57776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[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.
Built from https://develop.svn.wordpress.org/trunk@58309
git-svn-id: http://core.svn.wordpress.org/trunk@57766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58308
git-svn-id: http://core.svn.wordpress.org/trunk@57765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58306
git-svn-id: http://core.svn.wordpress.org/trunk@57763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Built from https://develop.svn.wordpress.org/trunk@58305
git-svn-id: http://core.svn.wordpress.org/trunk@57762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58304
git-svn-id: http://core.svn.wordpress.org/trunk@57761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58299
git-svn-id: http://core.svn.wordpress.org/trunk@57759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58298
git-svn-id: http://core.svn.wordpress.org/trunk@57758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58296
git-svn-id: http://core.svn.wordpress.org/trunk@57756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58295
git-svn-id: http://core.svn.wordpress.org/trunk@57755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58294
git-svn-id: http://core.svn.wordpress.org/trunk@57754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58292
git-svn-id: http://core.svn.wordpress.org/trunk@57752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58291
git-svn-id: http://core.svn.wordpress.org/trunk@57751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58289
git-svn-id: http://core.svn.wordpress.org/trunk@57749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58285
git-svn-id: http://core.svn.wordpress.org/trunk@57745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58281
git-svn-id: http://core.svn.wordpress.org/trunk@57741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58280
git-svn-id: http://core.svn.wordpress.org/trunk@57740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58278
git-svn-id: http://core.svn.wordpress.org/trunk@57738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58274
git-svn-id: http://core.svn.wordpress.org/trunk@57735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58269
git-svn-id: http://core.svn.wordpress.org/trunk@57732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@58257
git-svn-id: http://core.svn.wordpress.org/trunk@57720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make the panels for selecting menu items to add to a panel resizable using the CSS `resize` property. This minor change makes it easier to select items to add on desktop devices, and has nominal impact on other interfaces.
Props namith.jawahar, NekoJonez, jorbin, joen, joedolson.
Fixes#60763.
Built from https://develop.svn.wordpress.org/trunk@58256
git-svn-id: http://core.svn.wordpress.org/trunk@57719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Resolves a bug by first initializing in the AJAX callback `WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax()`.
More details:
[57658] removed auto-deactivation and bootstrapping logic from the Plugin Dependencies feature. In doing so, initialization calls were added to various locations in Core to ensure dependencies were detected and ready to be checked. However, an initialization call was missed in the AJAX callback before checking plugin dependencies.
This means that a plugin's dependencies may not be detected, and lead to a false positive, which in turn allows the user to click Activate only to see a failure message.
Follow-up to [57658].
Props kevinwhoffman, costdev, afragen.
Fixes#61294.
Built from https://develop.svn.wordpress.org/trunk@58252
git-svn-id: http://core.svn.wordpress.org/trunk@57715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Restores the Activate button's `href` native behavior by changing the AJAX activation handler introduced in 6.5.0. It restores the pre-6.5 behavior of clicking the "Activate" button, i.e. navigates the user to the button's `href` (i.e. to the `plugins.php` UI).
Why?
Feedback was given after shipping [57545] in 6.5.0 (but was unknown during the development and testing cycles) revealed significant impacts for plugins who's users valued the onboarding / configuration experiences.
6.5.3's [58081] and [58083] added a new user action / step to the workflow. Though helpful, it did not fully resolve the impacts.
For the minor, this commit seeks to restore only the "Activate" button's `href` pre-6.5 native behavior to resolve the regression.
The next phase of the Add Plugins workflow can then continue in a major release to gain the benefits of a full major to move it from ideation through the development phases. (See #61040). The questions of redirect, how / should configuration be in the workflow, etc. can best be explored and experimented with in a major.
Follow-up to [57545], [58081], [58083].
Props costdev, jorbin, hellofromTonya, afragen, kevinwhoffman, azaozz, adrianduffell, beaulebens, hmbashar, illuminea, ironprogrammer, jjj, lopo, louiswol94, mikachan, nerrad, mukesh27, peterwilsoncc, pooja1210, smub, swissspidy.
Fixes#61319.
See #22316, #60992.
Built from https://develop.svn.wordpress.org/trunk@58250
git-svn-id: http://core.svn.wordpress.org/trunk@57713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Handle `$preferred_ext` arguments that are passed with minor errors in formatting, such as incorrect casing or missing `.`. Add unit tests to verify that an omitted period on an otherwise correct extension is accepted. Follow up to [57687].
Props sabernhardt, joedolson, khokansardar.
Fixes#60610.
Built from https://develop.svn.wordpress.org/trunk@58248
git-svn-id: http://core.svn.wordpress.org/trunk@57711 1a063a9b-81f0-0310-95a4-ce76da25c4cd