48487 Commits

Author SHA1 Message Date
Greg Ziółkowski
fd894bfd2c Blocks: Remove the gutenberg textdomain accidently added to translation
Props soean.
See #59346.
Follow-up [56587].



git-svn-id: https://develop.svn.wordpress.org/trunk@56592 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-15 07:49:27 +00:00
Joe Dolson
227fdb8b74 Media: Fix focus loss when closing Image Rotation menu.
Only shift focus into menu when opening the menu. Check `aria-expanded` value of toggle before moving focus.

Props joedolson.
Fixes #59353.

git-svn-id: https://develop.svn.wordpress.org/trunk@56591 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 22:33:50 +00:00
Joe Dolson
73d839264f Administration: additional_classes is not a function.
Correct usage of `additional_classes` array parameter as if it were a function. Clearly, I'm getting tired and missing things. So many little changes. Follow up to [56573].

Props joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56590 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 22:08:27 +00:00
Joe Dolson
bd8ff4a62a Administration: Fix undeclared variable.
Moved `$updated_notice_args` to be defined before the conditional in which it's used.

Props TobiasBg.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56589 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 17:10:25 +00:00
Greg Ziółkowski
da28362ba1 Tests: Improve the assertions for REST API endpoint for block types
Follow-up to [56587], [55673]. While working on #59346, it was noted that selectors fiels is not always included in the assertions. While looking at it is was difficult to spot the issue because the random order of how REST API fields where listed.

Reorderd the REST API fields in the test cases to follow the list from the documentation: https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md. This way it's going to be easier to maintain the list moving forward.

Props ockham.
See #59346, #59313, #57585.



git-svn-id: https://develop.svn.wordpress.org/trunk@56588 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 14:54:41 +00:00
Bernie Reiter
7b90f22573 General: Add block_hooks field to block type registration, REST API.
In order to implement Block Hooks, we need to add a new `block_hooks` field to the `WP_Block_Type` class, as well as to block registration related functions, the block types REST API controller, etc.

Props gziolo.
Fixes #59346. See #59313.

git-svn-id: https://develop.svn.wordpress.org/trunk@56587 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 13:23:13 +00:00
Sergey Biryukov
e005108fe1 Coding Standards: Restore more descriptive variable names in a few class methods.
When various methods parameters in child classes were renamed to `$item` to match the parent class for PHP 8 named parameter support, most of the methods restored the more descriptive, specific name at the beginning for better readability, with several exceptions for methods consisting only of a few lines.

To avoid confusion about why some methods do that and some don't, this commit aims to bring more consistency to the code, specifically in list tables' `::column_default()` methods.

Follow-up to [51728], [51737], [51786].

See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56586 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 12:44:23 +00:00
Jonny Harris
4ba29eb1cb Taxonomy: Introduce 'cache_results' parameter to WP_Term_Query for bypassing query caching.
Incorporating a new 'cache_results' parameter into the WP_Term_Query class, this commit empowers developers with the ability to bypass query caches, explicitly triggering database queries when needed.  This brings the `WP_Term_Query` class inline with `WP_Query` and `WP_User_Query` that already have a 'cache_results' parameter.

Update the `term_exists` function to use this new parameter, so the term query caches are not used while importing. 

Props dlh, spacedmonkey, peterwilsoncc.
Fixes #52710.

git-svn-id: https://develop.svn.wordpress.org/trunk@56585 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 12:38:04 +00:00
Greg Ziółkowski
950e76270f Tests: Split tests for _inject_theme_attribute_in_template_part_block
Follow-up to [56578].
See #59338.



git-svn-id: https://develop.svn.wordpress.org/trunk@56584 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 11:45:51 +00:00
Jonny Harris
a5bcf199a7 Bundled Theme: Implement the_header_image_tag function for enhanced compatibility for older core themes.
The `the_header_image_tag` function was introduced in WordPress 4.4 as part of [35594]. It is used in all themes created post WordPress 4.4 that supported header images. The function `get_header_image_tag` continues to get updated with new image features, like lazy loading, async decoding and fetch priority. To ensure our core themes maintain compatibility and benefit from these enhancements, a backward compatibility shim has been applied, integrating the `the_header_image_tag` function into the following core themes:

- Twenty Ten
- Twenty Eleven
- Twenty Twelve
- Twenty Fourteen
- Twenty Sixteen

This change ensures future compatibility and modern image features are applied for header images to these older themes. 

Props spacedmonkey, flixos90, mukesh27.
Fixes #58675.

git-svn-id: https://develop.svn.wordpress.org/trunk@56583 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 11:23:59 +00:00
Tammie Lister
943e2b9551 Twenty Ninteen: Revert changes to 'style-rtl.css'.
This revert changes to Twenty Nineteen 'style-rtl.css' file made in [56580] as it auto-generated during the build process.

Unprops karmatosed.
Props costdev.
See #58443.


git-svn-id: https://develop.svn.wordpress.org/trunk@56581 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 10:23:55 +00:00
Tammie Lister
73053994bf Twenty Nineteen: Fixes button line height.
Line height was broken for button block and adding spacing.

Props nidhidhandhukiya, shailu25.
Fixes #58443.


git-svn-id: https://develop.svn.wordpress.org/trunk@56580 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 09:45:48 +00:00
Bernie Reiter
18fbb97e50 Themes: Fix @covers PHPDoc line for test.
Follow-up to [56578].
Props @mukesh27.
See #59338.

git-svn-id: https://develop.svn.wordpress.org/trunk@56579 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 09:04:04 +00:00
Bernie Reiter
bbb85de12d Themes: Inject theme attribute during serialization.
Rather than using `_inject_theme_attribute_in_block_template_content` to inject the `theme` attribute into all Template Part blocks found in a given file-based Block Template, introduce a new function called `_inject_theme_attribute_in_template_part_block`, and use that as second argument to `serialize_blocks()` (introduced in [56557]) in order to inject said attribute during tree traversal for serialization.

This allows for a more modular approach that will eventually be extended to implement automatic insertion of hooked blocks.

Note that we're guarding `_build_block_template_result_from_file()` (i.e. the callsite of `_inject_theme_attribute_in_template_part_block` and previously of `_inject_theme_attribute_in_block_template_content`) against regressions through additional unit test coverage added in [56562].

Props @gziolo.
Fixes #59338. See #59313.

git-svn-id: https://develop.svn.wordpress.org/trunk@56578 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 08:50:43 +00:00
Isabel Brison
11c53d559b Post Types: allow trashing draft patterns.
Adds `delete_posts` to capabilities for the `wp_block` post type.

Props ramonopoly, johnbillion, dhruvishah2203, audrasjb.
Fixes #59041.


git-svn-id: https://develop.svn.wordpress.org/trunk@56577 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 05:51:09 +00:00
Colin Stewart
4bdca50d7a Administration: Fix erroneous call to wp_admin().
In [56573], a typo caused `wp_admin()` to be called rather than `wp_admin_notice()`.

This fixes the typo to correctly call `wp_admin_notice()`.

Follow-up to [56573].

Props takayukister.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56576 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 05:48:41 +00:00
Isabel Brison
ec47a8f85f REST API: quality tweaks to WP_REST_Global_Styles_Controller.
Removes redundant local variable and changes validate_custom_css() access modifier from private to protected.

Props ramonopoly, spacedmonkey.
Fixes #59296.



git-svn-id: https://develop.svn.wordpress.org/trunk@56575 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 05:11:50 +00:00
Isabel Brison
1a168a199e Editor: disable default style engine optimisation.
Stops style engine from combining CSS selectors by default so that rule order is preserved.

Props ramonopoly, rajinsharwar, timdix, costdev, audrasjb, SergeyBiryukov, JeffPaul, mukesh27.
Fixes #58811.


git-svn-id: https://develop.svn.wordpress.org/trunk@56574 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 04:54:22 +00:00
Joe Dolson
f43aaaf741 Administration: Use wp_admin_notice() for .updated.
Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.updated` in the root level of `/wp-admin/`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56573 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 02:13:42 +00:00
Joe Dolson
795534f909 Administration: Use wp_admin_notice() in /wp-includes/.
Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-includes/`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56572 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 01:23:37 +00:00
Joe Dolson
fa21528a9a Administration: Use wp_admin_notice() in /wp-admin/includes.
Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-admin/includes`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56571 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 01:11:29 +00:00
Joe Dolson
3cefc7c7ff Administration: Use wp_admin_notice() in /wp-admin/.
Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-admin/`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56570 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-14 00:52:45 +00:00
Weston Ruter
96a7954ee6 Bundled Themes: Ensure Twenty Twenty's main script loads in head for WP<6.3.
Amends [56556].
Props westonruter, flixos90, peterwilsoncc.
Fixes #59316.


git-svn-id: https://develop.svn.wordpress.org/trunk@56569 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 22:14:15 +00:00
Felix Arntz
1c2653dbcf General: Update wp_register_script() calls in core to use new function signature.
Since most core scripts are registered using `WP_Scripts::add()`, which is not affected by the signature change, only calls to `wp_register_script()` using the old signature need to be updated. There is only a single instance left, which is updated in this changeset.

Props incursadesigns.
Fixes #58634.


git-svn-id: https://develop.svn.wordpress.org/trunk@56568 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 20:50:17 +00:00
Tammie Lister
6f74f616b8 Twenty-Twenty One: Fixes quotation mark being outside with background.
The quotation marks were outside when the background color was applied.

Props nidhidhandhukiya, sabernhardt, shailu25, harshgajipara, poena, huzaifaalmesbah.
Fixes #57377. 


git-svn-id: https://develop.svn.wordpress.org/trunk@56567 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 15:38:27 +00:00
Jonny Harris
640a53354c REST API: Avoid unnecessarily preparing item links REST API index.
Building upon the changes introduced in [53760], this commit refines the behavior of the REST API index. Specifically, it addresses performance concerns related to the unnecessary preparation of item links, such as site icon and logo links.

Prior to this update, the index controller was invoking the prepare_links method regardless of whether the _links or _embedded fields were requested in the response. This led to unnecessary database lookups and decreased overall performance.

In this commit, we implement a more efficient approach. Now, the prepare_links method will only be called when the _links or _embedded fields are explicitly requested in the response. This optimization ensures that we prepare links only when they are intended for inclusion in the API response, reducing unnecessary overhead.

By implementing this improvement, we enhance the overall efficiency and performance of the WordPress core REST API index controller.

Props spacedmonkey, niravsherasiya7707, dlh, mukesh27, costdev, swissspidy.
Fixes #57902.

git-svn-id: https://develop.svn.wordpress.org/trunk@56566 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 14:32:33 +00:00
Bernie Reiter
11e91d50d5 HTML API: Update documentation and rename internal variable on HTML Processor
This patch updates documentation and an internal variable name within the
HTML Processor class so that they are more helpful and complete to a reader.

There should be no functional or visual changes in this patch.

Props dmsnell, mukesh27.
Fixes #59267.

git-svn-id: https://develop.svn.wordpress.org/trunk@56565 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 13:00:59 +00:00
Bernie Reiter
7dbf409caf HTML API: Skip over contents of RAWTEXT elements such as STYLE.
When encountering elements that imply switching into the RAWTEXT parsing state,
the Tag Processor should skip processing until exiting the RAWTEXT state.

In this patch the Tag Processor does just that, except for the case of the
deprecated XMP element which implies further and more complicated rules.

There's an implicit assumption that the SCRIPT ENABLED flag in HTML parsing
is enabled so that the contents of NOSCRIPT can be skipped. Otherwise, it would
be required to parse the contents of that tag.

Props dmsnell.
Fixes #59292.

git-svn-id: https://develop.svn.wordpress.org/trunk@56563 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 12:47:25 +00:00
Bernie Reiter
8e4ff2a01d Themes: Add test for theme atttibute in file-based block template.
While we already have unit test coverage for `_inject_theme_attribute_in_block_template_content`, those tests only verify that ''that'' function does what is supposed to do; there's however no guarantee that `_build_block_template_result_from_file` uses that function (or whatever other technique) to actually inject the theme attribute.

This patch adds test coverage to verify that the theme attribute is correctly injected by `_build_block_template_result_from_file`.

Props costdev, gziolo, mukesh27, spacedmonkey.
Fixes #59325. See #59313.

git-svn-id: https://develop.svn.wordpress.org/trunk@56562 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 12:03:14 +00:00
Sergey Biryukov
36f8240cc3 Docs: Fix typo in a comment in wp_trim_excerpt().
Includes removing redundant `@covers` tags. There is already an existing annotation for the whole test class, following the [https://docs.phpunit.de/en/9.6/annotations.html#covers PHPUnit recommendation]:
> This annotation can be added to the docblock of the test class or the individual test methods. The recommended way is to add the annotation to the docblock of the test class, not to the docblock of the test methods.

Follow-up to [56560].

See #58682.

git-svn-id: https://develop.svn.wordpress.org/trunk@56561 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-13 08:06:26 +00:00
Felix Arntz
15f5a952a1 Posts, Post Types: Avoid unnecessarily parsing blocks twice in wp_trim_excerpt().
All blocks relevant for the excerpt are already being parsed in `excerpt_remove_blocks()`. Therefore running `do_blocks()` on the post content only to create the excerpt is unnecessary and wasteful from a performance perspective.

Props thekt12, spacedmonkey, mukesh27, joemcgill.
Fixes #58682.


git-svn-id: https://develop.svn.wordpress.org/trunk@56560 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-12 19:18:34 +00:00
Sergey Biryukov
fd6c5606b1 Coding Standards: Include one space after function keyword for closures.
Note: This is enforced by WPCS 3.0.0.

Reference: [https://github.com/WordPress/WordPress-Coding-Standards/pull/2328 WPCS: PR #2328 Core: properly check formatting of function declaration statements].

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56559 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-12 15:21:02 +00:00
Bernie Reiter
9c9329c447 HTML API: Store current token reference in HTML Processor state.
The `$current_token` reference has been stored in the HTML Processor itself, but I suggested to move it into the externalized state so that it can be stored and replaced.

In this patch the reference is moved to that state variable and it should become more possible to save and load state, to resume execution after pausing.

Props dmsnell.
Fixes #59268.

git-svn-id: https://develop.svn.wordpress.org/trunk@56558 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-12 15:10:19 +00:00
Bernie Reiter
44e71c8e70 General: Add optional callback argument to serialize_block(s).
Allow passing a function callback to serialize_block(s) that is invoked on each node in the tree of parsed blocks as it is traversed for serialization.

A function argument was chosen for passing the callback function as it reflects a pattern familiar from other algorithms that apply a given callback function while traversing a data structure -- most notably PHP's own `array_map()`.

Introducing a filter was considered as an alternative but ultimately dismissed. For a fairly low-level and general-purpose function such as `serialize_block()`, using a filter to pass the callback seemed risky, as it also requires ''removing'' that filter after usage in order to prevent the callback from being accidentally applied when `serialize_block()` is called in an entirely different context.

Introducing a separate function for applying a given operation during tree traversal (i.e. independently of serialization) was also considered but dismissed, as it would unnecessarily duplicate tree traversal.

Props dlh, gziolo.
Fixes #59327. See #59313.

git-svn-id: https://develop.svn.wordpress.org/trunk@56557 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-12 13:00:32 +00:00
Weston Ruter
cc775b9985 Bundled Themes: Use defer loading strategy for theme scripts.
* Add `defer` loading strategy for all frontend end-user theme scripts (excluding Customizer preview).
* Move scripts to the `head` which relate to the initial page viewport to ensure they start loading earlier and execute sooner while still not blocking rendering.
* Update Twenty Twenty's script loader (`TwentyTwenty_Script_Loader`) to support core's built-in script loading strategies (#12009), while also retaining backwards-compatibility for child themes that may set `async` and `defer` script data.
* Update the main script loading strategy in Twenty Twenty from `async` to `defer` for better performance on repeat page views, since when an `async` script is cached it will block rendering.

Props westonruter, flixos90, sabernhardt.
Fixes #59316.


git-svn-id: https://develop.svn.wordpress.org/trunk@56556 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-12 00:04:15 +00:00
Jonny Harris
827a560ade Taxonomy: Cache term objects in WP_Term_Query if query is filtered.
When utilizing the `terms_clauses` or `get_terms_fields` filters within `WP_Term_Query` and the selected fields are modified, the entire term object is now cached. This adjustment is necessary because filters can broaden the selected fields beyond just the term ID. Fields linked to the term object, such as the count or parent, may undergo modifications when queried. Caching the complete object ensures the accurate storage of these modified fields within the cache.

Props spacedmonkey, tnolte, peterwilsoncc.
Fixes #58116.

git-svn-id: https://develop.svn.wordpress.org/trunk@56555 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-11 11:35:59 +00:00
Colin Stewart
46c1f6fcf4 External Libraries: Update the Requests library to version 2.0.8.
This is a maintenance release with minor changes:
- Only force close cURL connection when needed (cURL < 7.22).

References:
- [https://github.com/WordPress/Requests/releases/tag/v2.0.8 Requests 2.0.8 release notes]
- [https://github.com/WordPress/Requests/compare/v2.0.6...v2.0.8 Full list of changes in Requests 2.0.8]

Follow-up to [54997], [55007], [55046], [55225], [55296], [55629].

Props jrf, mukesh27, spacedmonkey, costdev.
Fixes #59322.

git-svn-id: https://develop.svn.wordpress.org/trunk@56554 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-11 10:31:22 +00:00
Peter Wilson
2453a6b57d Cron: Cast doing_cron transient to a float.
Cast the `doing_cron` transient value to a float to prevent type errors if the transient is not set (in which case it returns `false`) or another unexpected type.

Props fzhantw, ankitmaru.
Fixes #58471.



git-svn-id: https://develop.svn.wordpress.org/trunk@56553 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-11 05:25:41 +00:00
Sergey Biryukov
aeba9d183d Code Modernization: Use dirname() with the $levels parameter.
PHP 7.0 introduced the `$levels` parameter to the `dirname()` function, which means nested calls to `dirname()` are no longer needed.

Note: This is enforced by WPCS 3.0.0.

Reference: [https://www.php.net/manual/en/function.dirname.php PHP Manual: dirname()].

Follow-up to [56141].

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56552 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-11 04:51:09 +00:00
Sergey Biryukov
858bd4b25f Coding Standards: Correct spacing for spread operators.
No space allowed between the operator and the variable it applies to.

Note: This is enforced by WPCS 3.0.0.

Follow-up to [46133].

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56551 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-10 09:02:49 +00:00
Colin Stewart
2a13d9321c Upgrade/Install: Fix broken sprintf() call when deleting a backup.
In `WP_Upgrader::delete_temp_backup()`, a malformed `sprintf()` call did not pass the value, triggering a Warning in PHP 7 and a Fatal Error in PHP 8.

This fixes the malformed `sprintf()` call by correctly passing the value.

Follow-up to [55720].

Props akihiroharai, afragen.
Fixes #59320.

git-svn-id: https://develop.svn.wordpress.org/trunk@56550 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-10 07:31:47 +00:00
SergeyBiryukov
54e1b4b959 Coding Standards: Use pre-increment/decrement for stand-alone statements.
Note: This is enforced by WPCS 3.0.0:

1. There should be no space between an increment/decrement operator and the variable it applies to.
2. Pre-increment/decrement should be favoured over post-increment/decrement for stand-alone statements. “Pre” will in/decrement and then return, “post” will return and then in/decrement. Using the “pre” version is slightly more performant and can prevent future bugs when code gets moved around.

References:
* [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#increment-decrement-operators WordPress PHP Coding Standards: Increment/decrement operators]
* [https://github.com/WordPress/WordPress-Coding-Standards/pull/2130 WPCS: PR #2130 Core: add sniffs to check formatting of increment/decrement operators]

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56549 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-09 09:26:01 +00:00
Sergey Biryukov
1118e37f48 Coding Standards: Remove superfluous blank lines at the end of various functions.
Note: This is enforced by WPCS 3.0.0.

Follow-up to [56536], [56547].

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56548 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-08 10:01:14 +00:00
Sergey Biryukov
d790be16dc Coding Standards: Remove superfluous blank lines at the end of various classes.
Note: This is enforced by WPCS 3.0.0.

Follow-up to [56536].

Props jrf.
See #59161, #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56547 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-08 09:30:38 +00:00
Isabel Brison
3f9bc4eac0 Editor: tweak root padding styles.
Removes root padding from children of flex and grid layout blocks when root padding aware alignments are set.

Props andrewserong, ramonopoly.
Fixes #59295.


git-svn-id: https://develop.svn.wordpress.org/trunk@56546 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-08 00:49:49 +00:00
Isabel Brison
b693aebc34 Editor: performance enhancements to class-wp-theme-json.
Removes unnecessary sanitisation of hardcoded strings and avoids looping over style presets without classes or variables.

Props flixos90.
Fixes #59304.


git-svn-id: https://develop.svn.wordpress.org/trunk@56545 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-08 00:25:01 +00:00
Tonya Mork
9de414277e Code Modernization: Use wp_trigger_error() in WP_Text_Diff_Renderer_Table magic methods.
Replaces `trigger_error()` with `wp_trigger_error()` in each of the `WP_Text_Diff_Renderer_Table` magic methods.

[56354] added the dynamic properties deprecation messages to the `__get()`, `__set()`, `__isset()`, `__unset()` magic methods. Since that commit, `wp_trigger_error()` was introduced (see [56530]) as a wrapper for `trigger_error()`.

Follow-up to [56354], [56530].

See #58898, #57686.

git-svn-id: https://develop.svn.wordpress.org/trunk@56544 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-07 20:46:53 +00:00
Tonya Mork
a5eddeab2d Code Modernization: Use wp_trigger_error() in WP_User_Query magic methods.
Replaces `trigger_error()` with `wp_trigger_error()` in each of the `WP_User_Query` magic methods.

[56353] added the dynamic properties deprecation messages to the `__get()`, `__set()`, `__isset()`, `__unset()` magic methods. Since that commit, `wp_trigger_error()` was introduced (see [56530]) as a wrapper for `trigger_error()`.

Follow-up to [56353], [56530].

See #58897, #57686.

git-svn-id: https://develop.svn.wordpress.org/trunk@56543 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-07 20:43:48 +00:00
Tonya Mork
dc76011874 Code Modernization: Use wp_trigger_error() in WP_List_Table magic methods.
Replaces `trigger_error()` with `wp_trigger_error()` in each of the `WP_List_Table` magic methods.

[56349] added the dynamic properties deprecation messages to the `__get()`, `__set()`, `__isset()`, `__unset()` magic methods. Since that commit, `wp_trigger_error()` was introduced (see [56530]) as a wrapper for `trigger_error()`.

Follow-up to [56349], [56356], [56530].

See #58896, #57686.

git-svn-id: https://develop.svn.wordpress.org/trunk@56542 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-07 20:39:07 +00:00
Joe Dolson
ef54f4e57f Plugins: Respect prefers-reduced-motion on plugin thumbnails.
Pause animated plugin thumbnails when a user has reduced motion preferences configured in their device or operating system.

Props Travel_girl, audrasjb, bordoni, stevejonesdev, joedolson.
Fixes #55723.

git-svn-id: https://develop.svn.wordpress.org/trunk@56541 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-07 20:35:38 +00:00