This replaces a helper method in `Tests_Theme_wpThemeJsonResolver` with the `wp_recursive_ksort()` function that was introduced later for the same purpose.
Follow-up to [52049], [53129], [55117].
See #56793.
git-svn-id: https://develop.svn.wordpress.org/trunk@55118 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$array` parameter to `$input_array` in `wp_recursive_ksort()`.
* Moves the function next to other array-related functions for consistency.
Follow-up to [53129], [54929].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55117 602fd350-edb4-49c9-b593-d223f7449a82
This changeset fixes an issue with the "Dots" style of the Separator block on multiple bundled themes. It adds `max-width: 100%` to this style variation on the following themes: Twenty Eleven, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, and Twenty Sixteen.
Props umesh84, sabernhardt, audrasjb, amin7, esratpopy, multidots1896.
Fixes#56114.
git-svn-id: https://develop.svn.wordpress.org/trunk@55114 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds a `large-text` attribute and removes the `size` attribute of the text input field located in the Slug metabox. It improves its usability, at least for as long as the Slug metabox is available in the Classic Editor.
Props ABTOP, nacin, helen, sabernhardt, abitofmind, tyxla, audrasjb.
Fixes#16346.
git-svn-id: https://develop.svn.wordpress.org/trunk@55113 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds `spellcheck="false"` attribute to Database Password field on the Database Setup screen.
Follow-up to [55094], [55095], [55096].
See #56763.
git-svn-id: https://develop.svn.wordpress.org/trunk@55110 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes the "Remove selected item" from the classic Navigation Menus screen when no item is selected, and makes it non focusable from assistive technologies.
Plus, this changeset fixes a small unrelated coding standard issue in `nav-menus.css`.
Props kebbet, joedolson, audrasjb.
Fixes#56942.
git-svn-id: https://develop.svn.wordpress.org/trunk@55109 602fd350-edb4-49c9-b593-d223f7449a82
This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before it returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` call.
Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev.
Fixes#28112.
git-svn-id: https://develop.svn.wordpress.org/trunk@55108 602fd350-edb4-49c9-b593-d223f7449a82
Change the focus and hover state of the plugin modal close button to use `#f0f0f1` with visible outline to be visible against modal overlay.
Props dperonne, viralsampat, jeawhanlee, mukesh27, sabernhardt, joedolson.
Fixes#56604.
git-svn-id: https://develop.svn.wordpress.org/trunk@55107 602fd350-edb4-49c9-b593-d223f7449a82
This changeset introduces the `wp_ajax_save_attachment` action hook, triggered after an attachment has been updated and before the JSON response is sent. For example, it allows developers to update any additional attachment fields that have been rendered by extending the `media.view.Attachment.Details` subview.
Props griffinjt, bradyvercher, pputzer, antpb, sc0ttkclark, audrasjb, costdev, hellofromTonya.
Fixes#23148.
git-svn-id: https://develop.svn.wordpress.org/trunk@55106 602fd350-edb4-49c9-b593-d223f7449a82
The `IXR_Message` class declares a property `_currentTag`, which is never assigned or used. It does assign to `currentTag` instead, which outside of that one assignment is never used either.
Since there are various other underscore-prefixed properties declared on the class, including one named `_currentTagContents` which is used in several places, it appears that the declared property is correct and the assignment is a typo.
This commit resolves a notice on PHP 8.2:
{{{
Deprecated: Creation of dynamic property IXR_Message::$currentTag is deprecated
}}}
Follow-up to [1346].
Props bjorsch, kraftbj, jrf, mukesh27, SergeyBiryukov.
See #56790.
git-svn-id: https://develop.svn.wordpress.org/trunk@55105 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces floating elements with `flex` CSS positioning, while the markup stays the same to keep the elements' semantic value.
Follow-up to [53706].
Props sabernhardt, kebbet, audrasjb.
Fixes#56673.
See #55498.
git-svn-id: https://develop.svn.wordpress.org/trunk@55103 602fd350-edb4-49c9-b593-d223f7449a82
The second parameter passed to `get_callback` in `WP_REST_Controller::add_additional_fields_to_object()` is the field name, not the request details.
Includes moving the `get_callback` and `update_callback` helper functions next to the tests they are used in.
Follow-up to [38832], [43768].
See #56793.
git-svn-id: https://develop.svn.wordpress.org/trunk@55102 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes some CSS custom properties that targets navigation menu items to avoid preventing the block from inheriting padding values set by the Global Styles system.
Props Joen, desrosj, poena, audrasjb, hellofromtonya, SergeyBiryukov.
Fixes#53220.
git-svn-id: https://develop.svn.wordpress.org/trunk@55101 602fd350-edb4-49c9-b593-d223f7449a82
Up until now, new translations could only be installed via Settings -> General.
When editing the user profile, one could only select locales that were already installed.
This change allows also installing new translations if the editing user has the necessary capabilities.
Props barryceelen, johnbillion, ocean90, swissspidy.
Fixes#38664.
git-svn-id: https://develop.svn.wordpress.org/trunk@55099 602fd350-edb4-49c9-b593-d223f7449a82
This adds descriptions to the existing pattern categories.
It also updates backports the new pattern categories:
banner, call to action, posts, team, testimonials, services,
portfolio and contact.
Fixes#57479.
git-svn-id: https://develop.svn.wordpress.org/trunk@55098 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds `spellcheck="false"` attribute to various password fields.
Follow-up to [55094].
Props dziudek, audrasjb, gainesm, fosuahmed.
See #56763.
git-svn-id: https://develop.svn.wordpress.org/trunk@55095 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds `spellcheck="false"` attribute to various password fields.
The spellcheck global attribute defines whether the element may be checked for spelling errors. The `false` value indicates that the element should not be checked for spelling errors, which is relevant for a password field.
Furthermore, and as per MDN specs, using spellchecking can have consequences for users' security and privacy. The specification does not regulate how spellchecking is done and the content of the element may be sent to a third party for spellchecking results. Thus, it is recommended to set `spellcheck` attribute to `false` for elements that can contain sensitive information. Which is the case for password fields.
Props dziudek, audrasjb, gainesm, fosuahmed.
Fixes#56763.
git-svn-id: https://develop.svn.wordpress.org/trunk@55094 602fd350-edb4-49c9-b593-d223f7449a82
When lazy-loading images was introduced, in [52065] the check for `wp_lazy_loading_enabled()` was omitted by accident in the logic to set the attribute with its default value on `img` tags from `get_the_post_thumbnail()`. Without this check, it is impossible for third-party developers to modify the behavior for featured images.
This changeset fixes the problem by introducing the check.
Props flixos90, joemcgill, mukesh27.
Fixes#57490.
git-svn-id: https://develop.svn.wordpress.org/trunk@55093 602fd350-edb4-49c9-b593-d223f7449a82
Calls to `wp-admin/load-styles.php` do not include the loading of `wp_cache_*()` functions. With [55086], this caused a fatal error:
{{{
Fatal error: Uncaught Error: Call to undefined function wp_cache_get() in /wp-includes/global-styles-and-settings.php on line 285
}}}
In some production and local environments running `trunk`, the admin area looked broken as the styling was not loaded as there were no HTTP requests.
This commit reverts the caching from [55086] to restore sites running `trunk` until a solution is found.
Follow-up to [55086].
Props Otto42, dmsnell, costdev.
See #56975.
git-svn-id: https://develop.svn.wordpress.org/trunk@55092 602fd350-edb4-49c9-b593-d223f7449a82
Allow the image upload notification to expand height and display the full image name when uploaded. Primarily effects mobile devices, where the available space for image names is narrow.
Props sumitsingh.
Fixes#54812.
git-svn-id: https://develop.svn.wordpress.org/trunk@55091 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$string` parameter to `$content` in:
* `Tests_Kses::test_wp_filter_post_kses_address()`
* `Tests_Kses::test_wp_filter_post_kses_a()`
* `Tests_Kses::test_wp_filter_post_kses_abbr()`
* Amends a few parameters and variables in other tests in the same file for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364], [53365], [54927], [54929], [54930], [54931], [54932], [54933], [54938], [54943], [54944], [54945], [54946], [54947], [54948], [54950], [54951], [54952], [54956], [54959], [54960], [54961], [54962], [54964], [54965], [54969], [54970], [54971], [54972], [54996], [55000], [55011], [55013], [55014], [55015], [55016], [55017], [55020], [55021], [55023], [55027], [55028], [55034], [55036], [55037], [55038], [55039], [55049], [55050], [55060], [55062], [55064], [55065], [55076], [55077], [55078], [55081].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #56788.
git-svn-id: https://develop.svn.wordpress.org/trunk@55090 602fd350-edb4-49c9-b593-d223f7449a82
[55088] introduced some issues with the "Test Default Themes & Create ZIPs" workflow on GitHub Actions. This changeset reverts it to leave time to figure out what failed and why.
See #53220.
git-svn-id: https://develop.svn.wordpress.org/trunk@55089 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes CSS custom properties that targets navigation menu items to avoid preventing the block from inheriting padding values set by the Global Styles system.
Props Joen, desrosj, poena.
Fixes#53220.
git-svn-id: https://develop.svn.wordpress.org/trunk@55088 602fd350-edb4-49c9-b593-d223f7449a82
This makes the assertions more helpful, as per the [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#using-assertions Writing PHP Tests] guidelines:
> All PHPUnit assertions, as well as all WordPress custom assertions, allow for a `$message` parameter to be passed. This message will be displayed when the assertion fails and can help immensely when debugging a test. This parameter should always be used if more than one assertion is used in a test method.
Follow-up to [55030], [55032].
Props mukesh27, costdev.
See #28407.
git-svn-id: https://develop.svn.wordpress.org/trunk@55087 602fd350-edb4-49c9-b593-d223f7449a82
Adds `wp_theme_has_theme_json()` for public consumption, to replace the private internal Core-only `WP_Theme_JSON_Resolver::theme_has_support()` method. This new global function checks if a theme or its parent has a `theme.json` file.
For performance, results are cached as an integer `1` or `0` in the `'theme_json'` group with `'wp_theme_has_theme_json'` key. This is a non-persistent cache. Why? To make the derived data from `theme.json` is always fresh from the potential modifications done via hooks that can use dynamic data (modify the stylesheet depending on some option, settings depending on user permissions, etc.).
Also adds a new public function `wp_clean_theme_json_cache()` to clear the cache on `'switch_theme'` and `start_previewing_theme'`.
References:
* [https://github.com/WordPress/gutenberg/pull/45168 Gutenberg PR 45168] Add `wp_theme_has_theme_json` as a public API to know whether a theme has a `theme.json`.
* [https://github.com/WordPress/gutenberg/pull/45380 Gutenberg PR 45380] Deprecate `WP_Theme_JSON_Resolver:theme_has_support()`.
* [https://github.com/WordPress/gutenberg/pull/46150 Gutenberg PR 46150] Make `theme.json` object caches non-persistent.
* [https://github.com/WordPress/gutenberg/pull/45979 Gutenberg PR 45979] Don't check if constants set by `wp_initial_constants()` are defined.
* [https://github.com/WordPress/gutenberg/pull/45950 Gutenberg PR 45950] Cleaner logic in `wp_theme_has_theme_json`.
Follow-up to [54493], [53282], [52744], [52049], [50959].
Props oandregal, afragen, alexstine, aristath, azaozz, costdev, flixos90, hellofromTonya, mamaduka, mcsf, ocean90, spacedmonkey.
Fixes#56975.
git-svn-id: https://develop.svn.wordpress.org/trunk@55086 602fd350-edb4-49c9-b593-d223f7449a82
The function `get_adjacent_post` cached the results of database query in the cache group `counts`. This is a none persistent group and meant cache would not persist on the next request. Change cache to save to the `posts` cache group. Cache invalidation is done by using get last changed value of the `posts` and `terms` group as a salt for the cache key.
Props spacedmonkey, peterwilsoncc, johnbillion, boonebgorges, mukesh27, dd32.
Fixes#41131.
git-svn-id: https://develop.svn.wordpress.org/trunk@55085 602fd350-edb4-49c9-b593-d223f7449a82
The new Gutenberg packages are using the inert attribute
to disable some parts of the HTML tree in an accessible way.
Props ntsekouras.
Fixes#57492.
git-svn-id: https://develop.svn.wordpress.org/trunk@55084 602fd350-edb4-49c9-b593-d223f7449a82
Remove escape placeholder from query cache key, as placeholders are on a based on a unique id on every request. This meant that it is impossible for a cache to be reused, making queries that use escape placeholders such as searches, meta queries or using the `description__like` / `name__like` parameters were unable to be cached.
Follow on from [54634].
Props spacedmonkey, peterwilsoncc.
Fixes#57298.
git-svn-id: https://develop.svn.wordpress.org/trunk@55083 602fd350-edb4-49c9-b593-d223f7449a82
This changeset fixes a few use case:
- When referring to the Privacy Policy page, "Privacy Policy" should use capitalization on "Privacy Policy", but "page" should remain lowercase;
- When referring to the fact that a website needs, let's say "a relevant privacy policy", "privacy policy" should stay lowercase.
This changeset also updates other small capitalization issues.
Props aravindajith, audrasjb, sarathar, nithi22, costdev.
Fixes#57226.
git-svn-id: https://develop.svn.wordpress.org/trunk@55082 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes an extra apostrophe in `wp_style_add_data()` DocBlock.
Props lanacodes, ashrafulsarkar, SergeyBiryukov.
Fixes#57466.
See #56792.
git-svn-id: https://develop.svn.wordpress.org/trunk@55071 602fd350-edb4-49c9-b593-d223f7449a82
When passed a `WP_Image_Editor` instance as the `$image` parameter, `wp_save_image_file()` returns an array on success, so we can specifically check for an array instead of any non-empty result.
Likewise, in PDF tests, when creating an attachment is expected to return an integer ID and not a `WP_Error` object, we can specifically check for that.
Follow-up to [1061/tests], [38949], [39617], [42792], [53529], [53530], [53531], [55019], [55066].
See #56793.
git-svn-id: https://develop.svn.wordpress.org/trunk@55070 602fd350-edb4-49c9-b593-d223f7449a82