5412 Commits

Author SHA1 Message Date
John Blackbourn
f7dbb2462b General: Increase the minimum supported version of PHP to 7.0.0.
This also removes the random compat library which is no longer necessary, and adjusts unit tests and CI workflows that no longer need to take PHP 5.6 into account.

Thank you for your service, PHP 5. Onwards!

Props SergeyBiryukov, mukesh27, dingo_d, audrasjb, jrf, costdev, azaozz, JavierCasares, hellofromTonya, samiamnot, spacedmonkey, masteradhoc, knutsp, garyjones, chanthaboune

Fixes #57345


git-svn-id: https://develop.svn.wordpress.org/trunk@56141 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-05 17:39:55 +00:00
Sergey Biryukov
c11f70878f General: Compare values as strings in WP_List_Util::filter() and ::sort_callback().
This aims to preserve backward compatibility for code relying on type juggling when using the `wp_list_filter()` function, e.g. comparing a numeric string to an integer.

Follow-up to [55908].

Props azaozz, jeremyfelt, david.binda.
See #57839.

git-svn-id: https://develop.svn.wordpress.org/trunk@56137 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-05 10:44:20 +00:00
Andrew Ozz
56af1e4b94 HTML API: Fix a fatal error when processing malformed document with unclosed attribute.
Props: dlh, costdev, dmsnell.
Fixes: #58637.

git-svn-id: https://develop.svn.wordpress.org/trunk@56133 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-04 20:43:43 +00:00
Sergey Biryukov
e834fed6eb Options, Meta APIs: Check if the gmt_offset value is numeric in sanitize_option().
When saving the settings via the admin UI, the default value for any options not passed in the current `$_POST` request is set to `null` in `wp-admin/options.php`. Some options, e.g. `blog_public`, then rely on `null` being passed to `update_option()` to determine whether the value was changed or not.

This commit resolves a PHP 8.1 deprecation notice when saving the `gmt_offset` option without any changes:
{{{
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
}}}

Includes a similar fix for the `blog_charset` option.

Follow-up to [4112], [4329], [5541], [21849].

Props adi3890, dhrupo, hrdelwar, hasanmisbah, oglekler, mukesh27, SergeyBiryukov.
Fixes #57728.

git-svn-id: https://develop.svn.wordpress.org/trunk@56132 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-04 13:40:55 +00:00
Sergey Biryukov
62b286f9b2 Upgrade/Install: Initialize the local $checkout variable in WP_Automatic_Updater::is_vcs_checkout().
This avoids an `Undefined variable $checkout` PHP warning if all of the directories checked for access are disallowed due to the PHP `open_basedir` restrictions.

Follow-up to [55425].

Props jqz, costdev, audrasjb.
Fixes #58563.

git-svn-id: https://develop.svn.wordpress.org/trunk@56124 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-02 10:33:18 +00:00
Jb Audras
e635540d1c Quick/Bulk Edit: Ensure scheduled posts are published when using Bulk Edit.
This changeset ensures scheduled posts are actually published when changing their status to "Published" using bulk edit. Also adds related unit tests.

Props siobhan, Clorith, webcommsat, cadic, oglekler, audrasjb, pavanpatil1.
Fixes #31635.




git-svn-id: https://develop.svn.wordpress.org/trunk@56123 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-02 08:02:45 +00:00
John Blackbourn
be90d79cb5 General: Ignore invalid types for the '_wp_http_referer' URL query variable.
It's expected that this query variable contains a string when it's set, but it's possible for its type to be something else such as an array. Ignoring non-string values prevents cascading errors when its value is passed through functions that expect a string.

Props xknown, costdev, jrf, azaozz

Fixes #57670


git-svn-id: https://develop.svn.wordpress.org/trunk@56115 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 23:25:38 +00:00
Isabel Brison
41277f1f1b REST API: updates test annotations for global styles revisions
Adds `@covers` annotations to tests and fixes incorrect spacing.

Props ramonopoly, mukesh27.
See #58524.


git-svn-id: https://develop.svn.wordpress.org/trunk@56105 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:47:43 +00:00
Isabel Brison
280f162097 Editor: delete test file from update duotone support.
Deleting the test file that should have been removed in [56101].

See #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56103 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:34:25 +00:00
Isabel Brison
d966798bfc Editor: update duotone support.
Updates duotone support after stabilisation of selectors API and adds a few small code quality and UI improvements.

Props onemaggie, peterwilsoncc, ajlende, audrasjb, mikeschroder, ramonopoly.
Fixes #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56101 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:19:41 +00:00
K. Adam White
68be569925 REST API: Expose current $request object to cors_header filters in WP_REST_SERVER->serve_request().
Allows headers to be more easily set on a per-response basis when more or less security is needed on a specific route.

Props bor0, rachelbaker, spacedmonkey, chaion07, oglekler, SergeyBiryukov.
Fixes #57752.



git-svn-id: https://develop.svn.wordpress.org/trunk@56096 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 17:37:52 +00:00
Andrew Ozz
80e424ad55 Script Loader: Fix unintended adding of async to scripts that are printed directly with wp_print_scripts() without enqueueing them beforehand.
Props: joemcgill, westonruter, felixarntz, peterwilsoncc.
See: #58648.

git-svn-id: https://develop.svn.wordpress.org/trunk@56092 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 14:14:58 +00:00
Sergey Biryukov
a63be5a890 Quick/Bulk Edit: Add an action hook to bulk_edit_posts() function.
This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before the function returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` calls.

Follow-up to [8973].

Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev, webcommsat, marybaum, oglekler, mukesh27, SergeyBiryukov.
Fixes #28112.

git-svn-id: https://develop.svn.wordpress.org/trunk@56091 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 13:17:49 +00:00
Isabel Brison
28c879ecc4 Editor: update function name in test comment.
Renames `gutenberg_apply_typography_support` to `wp_apply_typography_support` in typography test comment.

Props kebbet, oglekler, ramonopoly.
See #58522.


git-svn-id: https://develop.svn.wordpress.org/trunk@56084 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 03:56:48 +00:00
Isabel Brison
518a4fc53c Editor: add Post Template fallback styles.
Adds fallback styles necessary for classic themes to display the correct Post Template layout.

Props mikeschroder, ramonopoly.
Fixes #58570.


git-svn-id: https://develop.svn.wordpress.org/trunk@56083 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 03:47:17 +00:00
Isabel Brison
c345180c29 REST API: add revisions endpoint for global styles.
Adds an endpoint that returns revisions to the global styles custom post.

Props ramonopoly, peterwilsoncc, spacedmonkey, mukesh27, timothyblynjacobs.
Fixes #58524.


git-svn-id: https://develop.svn.wordpress.org/trunk@56082 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 03:33:23 +00:00
K. Adam White
507cab8d6f REST API: Check post meta update authorization only when value is changed.
Resolves a bug where a post save will be reported as failed if the post includes any meta keys the current user does not have authorization to update, even when those meta values are unchanged.
Write authorization is now checked for a meta key only when the value of that key has changed, so that passing a REST response back unchanged will not cause failures.
Authorization is only needed when data will be updated.

Props ckoerner, TimothyBlynJacobs, spacedmonkey



git-svn-id: https://develop.svn.wordpress.org/trunk@56075 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 17:24:44 +00:00
Sergey Biryukov
87a0ad45a5 Media: Only show “Copy” and “Download” actions when an attachment URL is available.
Includes unit tests to verify the logic for displaying row actions in the Media Library in certain scenarios, e.g. with and without the “Trash” or “Unattached” filter.

Follow-up to [55949].

Props costdev, kebbet, mukesh27, oglekler.
Fixes #57893.

git-svn-id: https://develop.svn.wordpress.org/trunk@56072 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:26:15 +00:00
Jb Audras
7ce266f2b2 Coding Standards: Fix a PHPCS issue found in wpPluginsListTable.php.
This fixes a previously existing issue, discovered after [56068].




git-svn-id: https://develop.svn.wordpress.org/trunk@56070 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:09:19 +00:00
Mike Schroder
45b080dd54 Filesystem API: Allow optional inclusion of hidden files in list_files().
Adds a new optional `$include_hidden` parameter to allow the inclusion of hidden (`.` prefixed) files.
Defaults to false for backward compatibility.

Props yani.iliev, sabernhardt, costdev, rutviksavsani, zunaid321, azaozz.
Fixes #53659.

git-svn-id: https://develop.svn.wordpress.org/trunk@56069 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:06:16 +00:00
Jb Audras
929c270cf9 Plugins: Introduce the plugins_list filter.
This changeset adds the `plugins_list` hook, which can be use to filter the list of plugin displayed on WP Admin Plugins screen.

Props nateallen, fischfood, mukesh27, peterwilsoncc, SergeyBiryukov, audrasjb, costdev, ecorica, zunaid321.
Fixes #57278.




git-svn-id: https://develop.svn.wordpress.org/trunk@56068 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:00:00 +00:00
Jb Audras
b66fcb55e5 Menus: Allow themes and plugins to pass HTML attributes to various Nav Walker outputs.
This introduces a new set of hooks that can be used to filter various HTML elements of the Nav Walker, in order to output the desired HTML attributes:

- List items: `nav_menu_item_attributes`
- Submenu `<ul>` element: `nav_menu_submenu_attributes`

Props davidwebca, danyk4, costdev, peterwilsoncc, audrasjb, oglekler.
Fixes #57140.




git-svn-id: https://develop.svn.wordpress.org/trunk@56067 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 15:25:00 +00:00
Bernie Reiter
a710b97e7c Editor: update Wordpress npm packages.
Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files.

Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell.
Fixes #58623.

git-svn-id: https://develop.svn.wordpress.org/trunk@56065 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 14:20:18 +00:00
Jonny Harris
30d6172eed Script Loader: Fix performance issues in wp_common_block_scripts_and_styles.
In [52069] the function `wp_common_block_scripts_and_styles` was changed load individual theme stylesheets, if the current theme supports block styles and loading separate core block assets. To do this, the function calls many expensive file operation functions, such as `glob`, `file_exists` and `file_get_contents`. This is wasteful, as these functions are loaded on every page request, even request that do not include blocks, like REST API calls. In [56044] all core block styles are registered in a single place. In `register_core_block_style_handles` calls `glob` to get all css styles in block directories. While registering style and editor styles, also register block theme styles, under a new style handle. Example `wp-block-avatar-theme`. If the current theme supports block styles, also request the block to enqueue the theme style on the front end. As these new stylesheets have a path attribute set, the function `wp_maybe_inline_styles` will automatically inline the styles for you. 

Props spacedmonkey, flixos90, oandregal, costdev, audrasjb, mukesh27.
Fixes #58560.

git-svn-id: https://develop.svn.wordpress.org/trunk@56064 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 11:26:12 +00:00
Isabel Brison
c27f776a6a Editor: allow filtering block patterns by source.
Extends the REST API endpoint for block patterns to provide a source attribute that can be used to filter patterns.

Props aaronrobertshaw, mukesh27, talldanwp, ramonopoly.
Fixes 58622.


git-svn-id: https://develop.svn.wordpress.org/trunk@56063 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 11:11:02 +00:00
Isabel Brison
8b9d8d8a9f Editor: refactor and stabilize selectors API.
Restructures the block.json selectors API by moving `__experimentalSelector` props into their own config, stabilizing the selectors API, and enabling more flexible styling options.

Props ramonopoly, spacedmonkey, aaronrobertshaw, onemaggie.
Fixes #58586.


git-svn-id: https://develop.svn.wordpress.org/trunk@56058 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 08:46:45 +00:00
Isabel Brison
7e9385e485 Editor: stabilise layout and refactor definitions.
Marks the layout support stable and moves layout definitions from `theme.json` into `wp-includes/block-supports/layout.php`.

Props andrewserong, poena, ramonopoly, peterwilsoncc.
Fixes #58550.


git-svn-id: https://develop.svn.wordpress.org/trunk@56055 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 07:23:04 +00:00
Isabel Brison
7c4c4a8665 Editor: fix post edit navigation link.
Adds a custom link for navigation post types.

Props get_dave, spacedmonkey, ramonopoly.
Fixes #58589.


git-svn-id: https://develop.svn.wordpress.org/trunk@56053 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 06:00:59 +00:00
Isabel Brison
3d551af3f2 Editor: add navigation fallback.
Creates a fallback menu for the Navigation block including an API endpoint to retrieve it.

Props get_dave, spacedmonkey, kebbet, flixos90, mikeschroder, ramonopoly, audrasjb.
Fixes 58557.


git-svn-id: https://develop.svn.wordpress.org/trunk@56052 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 05:52:06 +00:00
Isabel Brison
a44e46b914 REST API: ignore empty templates.
Ignore empty templates when using the `/lookup` endpoint in the `WP_REST_Templates_Controller` class.

Props ramonopoly, jorgefilipecosta, spacedmonkey, youknowriad, mukesh27.
Fixes #58615.



git-svn-id: https://develop.svn.wordpress.org/trunk@56051 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 05:34:12 +00:00
Isabel Brison
e55e9c2f0c Editor: add box shadow support to blocks.
Adds the ability for blocks to declare support for CSS box-shadow and processing of necessary styles.

Props madhudollu, sabernhardt, ramonopoly, spacedmonkey, mukesh27.
Fixes #58590.


git-svn-id: https://develop.svn.wordpress.org/trunk@56046 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 23:42:16 +00:00
Jonny Harris
d8409a205a Editor: Register core block styles in one place.
Register all core blocks in a new function called `register_core_block_style_handles`. This mirrors the function `wp_default_styles` where all core styles are registered in one place. This improves block registration performance, as it avoids expensive file lookups, like realpath in `register_block_style_handle`. The new function `register_core_block_style_handles` uses `glob` to get all css files in the blocks directory. This glob is cached in a transient to save lookups on subsequent requests. The function `register_block_style_handle` now checks to see if the style handle is already registered before trying to register it again. 

Props mukesh27, westonruter, flixos90, joemcgill, spacedmonkey.
Fixes #58528.

git-svn-id: https://develop.svn.wordpress.org/trunk@56044 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 21:15:21 +00:00
Jb Audras
c1a3975367 Posts, Post Types: Add a $previous_status parameter to wp_trash_post() related hooks.
This adds a `$previous_status` parameter to the `pre_trash_post`, `wp_trash_post`, and `trashed_post` hooks.

Props mujuonly, mukesh27, nihar007, dhruvishah2203, SergeyBiryukov, costdev, hugod, audrasjb, oglekler.
Fixes #58392.




git-svn-id: https://develop.svn.wordpress.org/trunk@56043 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 20:55:04 +00:00
Felix Arntz
4a16702090 General: Introduce WP_DEVELOPMENT_MODE constant to signify context-specific development mode.
In recent releases, WordPress core added several instances of cache usage around specific files. While those caches are safe to use in a production context, in development certain nuances apply for whether or not those caches make sense to use. Initially, `WP_DEBUG` was used as a temporary workaround, but it was clear that a more granular method to signify a specific development mode was required: For example, caches around `theme.json` should be disabled when working on a theme as otherwise it would disrupt the theme developer's workflow, but when working on a plugin or WordPress core, this consideration does not apply.

This changeset introduces a `WP_DEVELOPMENT_MODE` constant which, for now, can be set to either "core", "plugin", "theme", or an empty string, the latter of which means no development mode, which is also the default. A new function `wp_get_development_mode()` is the recommended way to retrieve that configuration value.

With the new function available, this changeset replaces all existing instances of the aforementioned `WP_DEBUG` workaround to use `wp_get_development_mode()` with a more specific check.

Props azaozz, sergeybiryukov, peterwilsoncc, spacedmonkey.
Fixes #57487.


git-svn-id: https://develop.svn.wordpress.org/trunk@56042 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 19:55:28 +00:00
Weston Ruter
c7597fa62f Editor: Use static closures to avoid memory leaks.
Backports Gutenberg changes from https://github.com/WordPress/gutenberg/pull/50723.

Amends [55822].

Fixes #58323.
Props westonruter, spacedmonkey, flixos90. 


git-svn-id: https://develop.svn.wordpress.org/trunk@56038 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 16:58:38 +00:00
Felix Arntz
b6fde03ef7 Media: Automatically add fetchpriority="high" to hero image to improve load time performance.
This changeset adds support for the `fetchpriority` attribute, which is typically added to a single image in each HTML response with a value of "high". This enhances load time performance (also Largest Contentful Paint, or LCP) by telling the browser to prioritize this image for downloading even before the layout of the page has been computed. In lab tests, this has shown to improve LCP performance by ~10% on average.

Specifically, `fetchpriority="high"` is added to the first image that satisfies all of the following conditions:
* The image is not lazy-loaded, i.e. does not have `loading="lazy"`.
* The image does not already have a (conflicting) `fetchpriority` attribute.
* The size of of the image (i.e. width * height) is greater than 50,000 squarepixels.

While these heuristics are based on several field analyses, there will always be room for optimization. Sites can customize the squarepixel threshold using a new filter `wp_min_priority_img_pixels` which should return an integer for the value.

Since the logic for adding `fetchpriority="high"` is heavily intertwined with the logic for adding `loading="lazy"`, yet the features should work decoupled from each other, the majority of code changes in this changeset is refactoring of the existing lazy-loading logic to be reusable. For this purpose, a new function `wp_get_loading_optimization_attributes()` has been introduced which returns an associative array of performance-relevant attributes for a given HTML element. This function replaces `wp_get_loading_attr_default()`, which has been deprecated. As another result of that change, a new function `wp_img_tag_add_loading_optimization_attrs()` replaces the more specific `wp_img_tag_add_loading_attr()`, which has been deprecated as well.

See https://make.wordpress.org/core/2023/05/02/proposal-for-enhancing-lcp-image-performance-with-fetchpriority/ for the original proposal and additional context.

Props thekt12, joemcgill, spacedmonkey, mukesh27, costdev, 10upsimon.
Fixes #58235.


git-svn-id: https://develop.svn.wordpress.org/trunk@56037 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 16:15:12 +00:00
Joe McGill
613b0e7dc9 Script Loader: Add support for HTML 5 "async" and "defer" attributes.
This allows developers to register scripts with an intended loading strategy by changing the `$in_footer` parameter of `wp_register_script` and `wp_enqueue_script` to an array that accepts both an `in_footer` and `strategy` argument. If present, the loading strategy attribute will be added to the script tag when that script is printed to the page as long as it is not a dependency of any blocking scripts, including any inline scripts attached to the script or any of its dependents.

Props 10upsimon, thekt12, westonruter, costdev, flixos90, spacedmonkey, adamsilverstein, azaozz, mukeshpanchal27, mor10, scep, wpnook, vanaf1979, Otto42.
Fixes #12009.


git-svn-id: https://develop.svn.wordpress.org/trunk@56033 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 13:40:31 +00:00
Isabel Brison
b524268be4 Editor: rename reusable blocks to patterns.
Renames the Reusable blocks to Patterns and adds an option to convert a block or collection of blocks to a non-synced Pattern.

Props glendaviesnz, ramonopoly, peterwilsoncc, timothyblynjacobs, flixos90.
Fixes #58577.


git-svn-id: https://develop.svn.wordpress.org/trunk@56030 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 08:55:31 +00:00
Isabel Brison
f571f4519b Editor: add support for block-level link hover colors.
Adds the ability to set link hover colors for individual blocks from the block inspector color panel.

Props @youknowriad, @peterwilsoncc, @kebbet.
Fixes #58575.


git-svn-id: https://develop.svn.wordpress.org/trunk@56028 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-26 01:13:56 +00:00
Joe Dolson
ed54bb7444 Quick/Bulk Edit: Don't set publish date when editing drafts.
Ensure that quick edit does not define a publish date if the post status is one of 'draft', 'pending', or 'auto-draft'.

Props uxtremist, SergeyBiryukov, Denis-de-Bernardy, jane, rfischmann, mista-flo, rutviksavsani, oglekler, joedolson.
Fixes #19907.

git-svn-id: https://develop.svn.wordpress.org/trunk@56022 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-25 15:18:12 +00:00
Felix Arntz
915db312ab Editor: Fix block editor styles being registered with frontend stylesheets.
This changeset fixes a bug where WordPress core's own block editor styles (`wp-block-{$block_name}-editor`) were referencing the same CSS files as their frontend equivalents (`wp-block-{$block_name}`). This would result in incorrect frontend styles potentially being loaded in the block editor.

Tests for the related logic have been added.

Props flixos90, joemcgill, mukesh27, spacedmonkey.
Fixes #58605.


git-svn-id: https://develop.svn.wordpress.org/trunk@56005 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 18:59:53 +00:00
Pascal Birchler
85e6518189 I18N: Ensure determine_locale() does not potentially return an empty string.
Call `get_locale()` as a last resort in case the sanitized locale is an empty string.

Also swaps conditionals to cater for more typical use case and adds tests.

Follow-up to [55862]

Props Cybr, swissspidy.
Fixes #58317.

git-svn-id: https://develop.svn.wordpress.org/trunk@56003 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 16:01:08 +00:00
André
d25a8d62f7 Fix block template utils test: use template part instead of template object.
Note that the PHP unit tests didn't fail in the CI job because the date for both the template and template part was the same.

Props ramonopoly.
Fixes #58540.


git-svn-id: https://develop.svn.wordpress.org/trunk@55993 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 09:28:10 +00:00
Isabel Brison
09a7c6835b REST API: return post modified datetime for Templates.
Adds a `modified` field to the template and template part objects in the rest response for `WP_REST_Templates_Controller`.

Props ramonopoly, andrewserong, mukesh27, timothyblynjacobs.
Fixes #58540.


git-svn-id: https://develop.svn.wordpress.org/trunk@55992 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 06:27:45 +00:00
André
fe3645519a wp_get_global_styles: allow transforming the CSS Custom Properties into the values they represent.
Props samnajian, ramonopoly, isabel_brison.
Fixes #58588.


git-svn-id: https://develop.svn.wordpress.org/trunk@55986 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-22 08:42:42 +00:00
Isabel Brison
9a9a672a83 Editor: add text columns to typography support.
Adds a text columns feature to the typography block support that uses CSS `column-count` for multi-column text.

Props ramonopoly, aaronrobertshaw.
Fixes #58549.


git-svn-id: https://develop.svn.wordpress.org/trunk@55985 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-22 08:16:05 +00:00
Sergey Biryukov
d9d0498254 Tests: Update the test for pre_wp_setup_nav_menu_item filter.
This ensures that not only is the filter applied in `wp_setup_nav_menu_item()`, but also the actual output is tested.

Follow-up to [55867], [55868].

Props azaozz, ugyensupport.
Fixes #56577.

git-svn-id: https://develop.svn.wordpress.org/trunk@55979 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-22 05:53:05 +00:00
André
3b34f3a30e wp_get_global_styles: return the standard format for CSS Custom Properties.
Props samnajian, hellofromtonya, isabel_brison.
Fixes #58467.


git-svn-id: https://develop.svn.wordpress.org/trunk@55959 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-21 07:54:01 +00:00
Isabel Brison
cfe8ab9b20 Editor: update layout classnames and specificity.
Adds a compound layout classname and reduces layout spacing rule specificity.

Props ramonopoly, andrewserong, poena.
Fixes #58548.


git-svn-id: https://develop.svn.wordpress.org/trunk@55956 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-21 05:30:24 +00:00
Isabel Brison
b35b1fcc86 Editor: add Post Content attributes to block editor settings.
Adds a new block editor setting containing the Post Content block attributes, if they exist.

Props audrasjb, spacedmonkey, jeremyfelt, mukesh27, flixos90, andrewserong.
Fixes #58534.


git-svn-id: https://develop.svn.wordpress.org/trunk@55955 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-21 04:21:04 +00:00