This changeset removes color names from pattern names to make them less opinionated, and avoid mismatching when the user changes related colors. It does not update filenames for now, as they are not directly exposed to end users.
Props poena, mukesh27.
Fixes#56720.
git-svn-id: https://develop.svn.wordpress.org/trunk@55122 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds support for `:link` and `:any-link` in `theme.json`, using the `VALID_ELEMENT_PSEUDO_SELECTORS` array. `:link` can be used to style unvisited links and `:any-link` can be used to style any link containing an `href` attribute.
Props peterwilsoncc, whaze, audrasjb, costdev, mukesh27.
Fixes#57053.
git-svn-id: https://develop.svn.wordpress.org/trunk@55121 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
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
[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
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
This changeset merges the following changes from Gutenberg repository:
- Allow themes without `theme.json` to opt-in to appearance tools via `add_theme_support( 'appearance-tools' );`
- Update `wpThemeJsonResolver` unit tests accordingly
See the following pull request for more info: https://github.com/WordPress/gutenberg/pull/43337
Props ironprogrammer, audrasjb.
Fixes#57460.
git-svn-id: https://develop.svn.wordpress.org/trunk@55067 602fd350-edb4-49c9-b593-d223f7449a82
The value for both these filters can also contain a string path to a CA file used to authenticate the identity of the remote server.
Props chesio, mcaskill
Fixes#54803
git-svn-id: https://develop.svn.wordpress.org/trunk@55063 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds the top 10 Mastodon domains by popularity to Twenty Twenty and Twenty Twenty-One Social icon feature.
Note: other Mastodon domains can be added to the array of domain mapping using `twentytwenty_social_icons_map` and `twenty_twenty_one_social_icons_map` filters.
Props triumvirate, sabernhardt, audrasjb, peterwilsoncc, rryyaanndd, ianbelanger.
Fixes#57293, #49099.
git-svn-id: https://develop.svn.wordpress.org/trunk@55061 602fd350-edb4-49c9-b593-d223f7449a82
This changeset introduces the `wp_set_password` action hook, triggered after a password is set for a given user. As several plugins are calling `wp_set_password()` directly, adding an action to the end of the function will help plugin authors to catch all instances of password setting.
Props tanner-m, audrasjb.
Fixes#57436.
git-svn-id: https://develop.svn.wordpress.org/trunk@55056 602fd350-edb4-49c9-b593-d223f7449a82
The [https://make.wordpress.org/core/2021/02/19/feature-plugin-rollback-update-failure/ Rollback Update Failure feature project] has been split into two plugins for testing:
* [https://github.com/afragen/faster-updates Faster Updates] speeds up plugin or theme updates by moving files rather than copying them, thus decreasing the memory usage and reducing the chance of timeouts or running out of disk space during updates.
* [https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure] creates a temporary backup of plugins and themes before updating. This aims to make the update process more reliable and ensure that if a plugin or theme update fails, the previous version can be safely restored.
The current priority of the feature project is to test the new `move_dir()` function, which offers better performance than `copy_dir()`. Instead of copying a directory in a recursive manner file by file from one location to another, `move_dir()` uses the `rename()` PHP function to speed up the process, which is instrumental in updating large plugins without a delay. If the renaming failed, it falls back to the `copy_dir()` WP function.
The `move_dir()` function is self-contained in the Faster Updates plugin and does not require any special hooks in core, so the conditional previously added to `WP_Upgrader::install_package()` to facilitate testing is no longer needed and can be removed.
Follow-up to [53578], [54484], [54643].
Props afragen, costdev, peterwilsoncc.
See #56057, #57375, #57386.
git-svn-id: https://develop.svn.wordpress.org/trunk@55055 602fd350-edb4-49c9-b593-d223f7449a82
This changeset moves typecasting to affect the `get_option` value, which ensures that when math is done it does not generate any error. In PHP 7.4 and earlier the previous implementation was dismissed as a warning, but in PHP 8+ it would have throw a fatal error.
Follow-up to [45856].
Props Nick_theGeek, SergeyBiryukov, johnbillion.
Fixes#57035.
git-svn-id: https://develop.svn.wordpress.org/trunk@55054 602fd350-edb4-49c9-b593-d223f7449a82