Commit Graph

49579 Commits

Author SHA1 Message Date
audrasjb
477e688d1c Login and Registration: login_header() docblock update after [58209].
This changeset indicates that the `$title` parameter is now nullable.

Follow-up to [58209].

Props skithund.
Fixes #60668.



Built from https://develop.svn.wordpress.org/trunk@58220


git-svn-id: http://core.svn.wordpress.org/trunk@57683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 21:32:13 +00:00
audrasjb
407584f9ef External Libraries: Revert some unwanted changes after [58218].
This reverts some unwanted changes related to `react` and react-dom` versions in `$vendor_scripts_versions`.

Follow-up to [58218].

Unprops audrasjb.
Fixes #61090.



Built from https://develop.svn.wordpress.org/trunk@58219


git-svn-id: http://core.svn.wordpress.org/trunk@57682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 21:22:10 +00:00
audrasjb
12541213c1 External Libraries: Update the jQuery UI library to version 1.13.3.
For more information on the changes included, see https://blog.jqueryui.com/2024/04/jquery-ui-1-13-3-released/.

Props audrasjb, desrosj, khokansardar, swissspidy.
Fixes #61090.



Built from https://develop.svn.wordpress.org/trunk@58218


git-svn-id: http://core.svn.wordpress.org/trunk@57681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 21:14:15 +00:00
joedolson
3b1f9c8c28 Media: Add missing units for length and dimensions in media library.
Include explicit units for media length and dimensions in attachment modal and media details screen.

Props Presskopp, joedolson, shailu25, audrasjb.
Fixes #59009.
Built from https://develop.svn.wordpress.org/trunk@58217


git-svn-id: http://core.svn.wordpress.org/trunk@57680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 19:44:14 +00:00
Pascal Birchler
bba7f1effc Build/Test Tools: Update REST API fixtures after [58211].
See #41172.
Built from https://develop.svn.wordpress.org/trunk@58216


git-svn-id: http://core.svn.wordpress.org/trunk@57679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 19:05:13 +00:00
joedolson
e7afd14793 Toolbar: Accessibility: Fix keyboard focus order of search form.
Change the priority of the search form & remove `float` so that the visual position of the form matches it's positioning in the DOM.

This sets the priority of the search form to an arbitrarily high value of `9999` to ensure it will generally be last in the DOM.

Props joedolson, sabernhardt, audrasjb.
Fixes #60685.
Built from https://develop.svn.wordpress.org/trunk@58215


git-svn-id: http://core.svn.wordpress.org/trunk@57678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 18:41:15 +00:00
joedolson
f07a796aab Media: Improve scale/crop layout in image editor medium breakpoints.
Adjust the max-width of the image edit settings panel so that reflow handling at intermediary breakpoints is more consistent and less fragile.

Props deepakvijayan, huzaifaalmesbah, joedolson, khokansardar.
Fixes #58979.
Built from https://develop.svn.wordpress.org/trunk@58214


git-svn-id: http://core.svn.wordpress.org/trunk@57677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 18:03:13 +00:00
joedolson
68197542eb Themes: Accessibility: Logo block returns empty link when image not set.
The logo block does not use theme mods, and instead saves a site-wide option `site_logo` to use as the site logo. 

Add handling for cases where the logo image does not exist and delete the `site_logo` option when the attachment configured as site logo is deleted.

Props afercia, joedolson, khokansardar, SergeyBiryukov.
Fixes #60922.
Built from https://develop.svn.wordpress.org/trunk@58213


git-svn-id: http://core.svn.wordpress.org/trunk@57676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 16:41:10 +00:00
Sergey Biryukov
f6973306ea Docs: Improve documentation for a few functions accepting a WP_Post object.
Follow-up to [15777], [23769], [24490], [25697], [37252], [49544].

See #60699.
Built from https://develop.svn.wordpress.org/trunk@58212


git-svn-id: http://core.svn.wordpress.org/trunk@57675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 16:29:16 +00:00
Pascal Birchler
b2b6166091 Posts, Post Types: Remove now obsolete hardcoded attachment check for autosave support.
Follow-up to [58201].

Props swissspidy, spacedmonkey.
See #41172.
Built from https://develop.svn.wordpress.org/trunk@58211


git-svn-id: http://core.svn.wordpress.org/trunk@57674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 15:24:13 +00:00
audrasjb
21b8312b48 Upload: Add missing escaping functions in wp-admin/async-upload.php.
Props nareshbheda, mukesh27.
Fixes #60978.



Built from https://develop.svn.wordpress.org/trunk@58210


git-svn-id: http://core.svn.wordpress.org/trunk@57673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 14:31:13 +00:00
audrasjb
fb4fcb4388 Login and Registration: Ensure login header title is translatable.
This changeset ensures the login header default title string is translatable in `login_header()`.

Props juliobox, swissspidy, audrasjb.
Fixes #60668.



Built from https://develop.svn.wordpress.org/trunk@58209


git-svn-id: http://core.svn.wordpress.org/trunk@57672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 14:11:12 +00:00
audrasjb
9df0603c96 HTTP API: Improve download_url() error message.
This changeset improves the error message returned when no URL is provided, and updates the related unit tests accordingly.

Props hinnerk, audrasjb.
Fixes #60565.



Built from https://develop.svn.wordpress.org/trunk@58208


git-svn-id: http://core.svn.wordpress.org/trunk@57671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 13:55:12 +00:00
Tammie Lister
fd798307a0 Twenty Seventeen: Resolves image block caption text alignment inconsitency.
The caption for image block was misaligned. The issue appeared in 5.8 due to the block class name change making the selector meaningless. This is resolved by a change in the selectors.

Props nkeller15, sabernhardt, thakordarshil, anilvaza, shailu25, pavanpatil1, darshitrajyaguru97.
Fixes #58539.

Built from https://develop.svn.wordpress.org/trunk@58207


git-svn-id: http://core.svn.wordpress.org/trunk@57670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 12:43:11 +00:00
Tammie Lister
b4aa9d18b1 Twenty Seventeen: Add filter for display of featured image in header.
When a layout doesn't use custom post types it was appearing broken. This adds a filter for the display of the featured image to resolve this.

Props justnorris, JPry, davidakennedy, SergeyBiryukov, zkarj, poena, nhrrob, lamarajan.
Fixes #39281.

Built from https://develop.svn.wordpress.org/trunk@58206


git-svn-id: http://core.svn.wordpress.org/trunk@57669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 12:28:18 +00:00
Tammie Lister
31b37a5eb3 Twenty Twenty: Fixes button link not inheriting custom letter spacing.
The button block link did not inherit the custom letter spacing. This resolves that issue.

Props nidhidhandhukiya, sabernhardt, wesatintellitonic, pooja1210, shailu25.
Fixes #58024.

Built from https://develop.svn.wordpress.org/trunk@58205


git-svn-id: http://core.svn.wordpress.org/trunk@57668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 10:46:13 +00:00
Tammie Lister
4c8cceb51a Twenty Seventeen: Resolves latest comments author font weight difference.
The latest comments author font weight was showing different between editor and front. This fixes that and also removes an extra ruleset. 

Props pitamdey, sabernhardt, shailu25, naeemhaque, darshitrajyaguru97.
Fixes #61180.

Built from https://develop.svn.wordpress.org/trunk@58204


git-svn-id: http://core.svn.wordpress.org/trunk@57667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 10:31:11 +00:00
Tammie Lister
57dc7cd16c Twenty Twenty-One: Test failure fix for theme [58202].
Compiling stylesheets to pass tests.

See #52551.

Built from https://develop.svn.wordpress.org/trunk@58203


git-svn-id: http://core.svn.wordpress.org/trunk@57666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 10:28:13 +00:00
Tammie Lister
a17042b780 Twenty Twenty-One: Fixes Search Box Alignment.
The search box alignment was not in alignment. This brings in a resolution for that through the margin.

Props vinita29, SergeyBiryukov, poena, shailu25, makdiahussain, imranhasanraaz, darshitrajyaguru97, lamarajan.
Fixes #52551.

Built from https://develop.svn.wordpress.org/trunk@58202


git-svn-id: http://core.svn.wordpress.org/trunk@57665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 10:04:15 +00:00
Pascal Birchler
3504e15aa9 Posts, Post Types: Autosave: Allow disabling autosave support per post type.
Not all post types support autosaving. By making autosave a post type feature, support can be more granularly handled without any workarounds or hardcoded allowlists. `wp_font_family` and `wp_font_face` are examples of built-in post types which do not support autosave.

For backward compatibility reasons, adding `editor` support implies `autosave` support, so one would need to explicitly use `remove_post_type_support()` to remove it again.

Props swissspidy, youknowriad, hellofromtonya, peterwilsoncc.
Fixes #41172.
Built from https://develop.svn.wordpress.org/trunk@58201


git-svn-id: http://core.svn.wordpress.org/trunk@57664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-27 09:06:16 +00:00
Sergey Biryukov
eba0df8c7b Docs: Correct the placement of @global tags in various files.
Follow-up to [6589], [8598], [10798], [25490], [25594], [31192], [31194], [35718], [37437], [44169], [44948], [45247], [56763], [56773], [57370], [57503].

Props shailu25.
Fixes #61295.
Built from https://develop.svn.wordpress.org/trunk@58200


git-svn-id: http://core.svn.wordpress.org/trunk@57663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-26 20:51:13 +00:00
Tammie Lister
56ce2e58de Twenty Nineteen: Resolves button block font issues.
The font on buttons was displaying less than the font size when applied through the editor. This resets the relative measurement on wp-block-button__link when either its Buttons or Button block has a custom size.

Props nidhidhandhukiya, sabernhardt, SergeyBiryukov, manojmaharrshi, darshitrajyaguru97, shailu25.
Fixes #56443.

Built from https://develop.svn.wordpress.org/trunk@58199


git-svn-id: http://core.svn.wordpress.org/trunk@57662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-26 08:49:09 +00:00
Tammie Lister
a9135c617a Twenty Nineteen: Make h1 consistent for entry title.
The h1 for entry-title was not the same between the editor and front end. This fixes that in the by setting wp-block-post-title font sizes together with h2 and combines post-section-dash mixin for both h1 and h2.

Props sabernhardt, nkeller15, shailu25.
Fixes #58440.

Built from https://develop.svn.wordpress.org/trunk@58198


git-svn-id: http://core.svn.wordpress.org/trunk@57661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-26 08:32:13 +00:00
Sergey Biryukov
5941fea0b3 Docs: Update pre_do_shortcode_tag and do_shortcode_tag filter DocBlocks.
This reflects the return type change of `shortcode_parse_atts()` from `array|string` to `array` in WordPress 6.5.

Follow-up to [38506], [38713], [39665], [55711], [57597], [58168].

Props marherumr.
Fixes #61288.
Built from https://develop.svn.wordpress.org/trunk@58197


git-svn-id: http://core.svn.wordpress.org/trunk@57660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-25 03:04:12 +00:00
Sergey Biryukov
991a96b968 Docs: Add a @since note for the changes to safecss_filter_attr() in WP 6.6.
Follow-up to [58170].

See #61111.
Built from https://develop.svn.wordpress.org/trunk@58196


git-svn-id: http://core.svn.wordpress.org/trunk@57659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-24 09:49:07 +00:00
gziolo
b3e3c8ba32 Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled
Syncs the changes from Gutenberg: https://github.com/WordPress/gutenberg/pull/60514. Enqueues a different Interactivity API runtime version with preact/debug when SCRIPT_DEBUG is enabled.

Props darerodz, jonsurrell, gziolo.
Fixes #61171.


Built from https://develop.svn.wordpress.org/trunk@58195


git-svn-id: http://core.svn.wordpress.org/trunk@57658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-24 09:42:09 +00:00
Pascal Birchler
03ed152078 Editor: fix PHP warnings in tests after [58170].
Props peterwilsoncc.
Fixes #61111.
Built from https://develop.svn.wordpress.org/trunk@58194


git-svn-id: http://core.svn.wordpress.org/trunk@57657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-24 08:31:11 +00:00
gziolo
76b498103c Build: Add globalThis DefinePlugin config to webpack
This updates the build to account for related changes in WordPress packages. More details in https://github.com/WordPress/gutenberg/pull/61486.

Props jonsurrell, youknowriad, swissspidy, gziolo.
Fixes #61262.



Built from https://develop.svn.wordpress.org/trunk@58193


git-svn-id: http://core.svn.wordpress.org/trunk@57656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-24 08:00:11 +00:00
dmsnell
ec7c61e320 HTML API: Add expects_closer() method to HTML Processor
This patch adds a new method, `WP_HTML_Processor->expects_closer()` to indicate
if the currently-matched node expects to find a closing token. For example, a
`DIV` element expects a closing `</div>` tag, but an `<img>` expects none, because
it's a void element. Similarly, `#text` nodes and HTML comments only appear as
unitary nodes on the stack of open elements. Once proceeding further in the
document they are immediately removed without any closing tag.

This new method serves as a helper to indicate whether or not to expect the
closer, as this can be more complicated than it seems, and calling code
shouldn't have to build custom interpretations and implementations. Instead,
the HTML Processor ought to export its internal knowledge to make it easy for
consuming code and projects.

Developed in https://github.com/WordPress/wordpress-develop/pull/6600
Discussed in https://core.trac.wordpress.org/ticket/61257

Fixes #61257.
Props dmsnell, jonsurrell.


Built from https://develop.svn.wordpress.org/trunk@58192


git-svn-id: http://core.svn.wordpress.org/trunk@57655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-24 01:21:10 +00:00
dmsnell
07a35d5d41 HTML API: Add method to report depth of currently-matched node.
The HTML Processor maintains a stack of open elements, where every element,
every `#text` node, every HTML comment, and other node is pushed and popped while
traversing the document. The "depth" of each of these nodes represents how deep
that stack is where the node appears. Unfortunately this information isn't
exposed to calling code, which has led different projects to attempt to
calculate this value externally. This isn't always trivial, but the HTML
Processor could make it so by exposing the internal knowledge in a new method.

In this patch the `get_current_depth()` method returns just that. Since the
processor always exists within a context, the depth includes nesting from the
always-present html element and also the body, since currently the HTML
Processor only supports parsing in the IN BODY context.

This means that the depth reported for the `DIV` in `<div>` is 3, not 1, because
its breadcrumbs path is `HTML > BODY > DIV`.

Developed in https://github.com/WordPress/wordpress-develop/pull/6589
Discussed in https://core.trac.wordpress.org/ticket/61255

Fixes #61255.
Props dmsnell, jonsurrell.

Built from https://develop.svn.wordpress.org/trunk@58191


git-svn-id: http://core.svn.wordpress.org/trunk@57654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 23:37:12 +00:00
dmsnell
c3b76697cd HTML API: Respect class_name query arg in HTML_Processor::next_tag()
Previously the HTML Process was ignoring the `class_name` argument in
the `next_tag()` query if it existed. This was wrong and would lead to
calling code finding the wrong tag if provided.

This patch adds the class detection code back into `next_tag()` to fix
the bug.

Developed in https://github.com/WordPress/wordpress-develop/pull/6618
Discussed in https://core.trac.wordpress.org/ticket/58517

See #58517.
Follow-up to [56274].
Props: dmsnell, jonsurrell.

Built from https://develop.svn.wordpress.org/trunk@58190


git-svn-id: http://core.svn.wordpress.org/trunk@57653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 22:45:13 +00:00
ellatrix
3c2e6808c3 Editor: add new block PHP files.
This was forgotten in changeset 58187.


Built from https://develop.svn.wordpress.org/trunk@58189


git-svn-id: http://core.svn.wordpress.org/trunk@57652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 19:59:07 +00:00
dmsnell
cbc1c955d8 Introduce Token Map: An optimized static translation class.
This patch introduces a new class: `WP_Token_Map`, designed for efficient
lookup and translation of static mappings between string keys or tokens, and
string replacements (for example, HTML character references).

The Token Map imposes certain restrictions on the byte length of the lookup
tokens and their replacements, but is a highly-optimized data structure for
mappings with a very high number of tokens.

Developed in https://github.com/WordPress/wordpress-develop/pull/5373
Discussed in https://core.trac.wordpress.org/ticket/60698

Fixes #60698.
Props: dmsnell, gziolo, jonsurrell, jorbin.

Built from https://develop.svn.wordpress.org/trunk@58188


git-svn-id: http://core.svn.wordpress.org/trunk@57651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 19:56:08 +00:00
ellatrix
1fbf5fa51d Editor: Update npm packages.
Updates the editor npm packages to latest versions.

See https://github.com/WordPress/wordpress-develop/pull/6612.

Props ellatrix, mukesh27, youknowriad, mamaduka.


Built from https://develop.svn.wordpress.org/trunk@58187


git-svn-id: http://core.svn.wordpress.org/trunk@57650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 19:39:28 +00:00
Bernhard Reiter
031dbe0b4d Block Hooks API: Insert metadata at the same time as hooked blocks.
The Block Hooks UI relies on the `ignoredHookedBlocks` metadata when determining whether to show the toggle in the Site Editor. The problem is that for uncustomized templates we don't add this metadata.

Currently the visitor functions have a default callback of `insert_hooked_blocks` and we only add the metadata when we're writing to the database via an available filter in the template controller.

This changeset creates a new callback which both inserts the hooked blocks and adds the `ignoredHookedBlocks` metadata to the anchor block, and uses this new callback explicitly in the visitor functions that are run upon reading from the database.

We continue to set the `ignoredHookedBlocks` metadata when writing to the database, i.e. this operation happens twice. Although not ideal, this is necessary to cover the following scenarios:

* When the user adds an anchor block within the editor, we still need to add the `ignoredHookedBlocks` meta to it to prevent hooked blocks hooking on to it unexpectedly on the frontend. This is required to keep parity between the frontend and editor.
* When a user writes template data to the database directly through the API (instead of the editor), we need to again ensure we're not inserting hooked blocks unexpectedly.

It is worth noting that with this change, the first hooked block to insert relative to its anchor block will be accepted. Any additional blocks of the same type (e.g. a second `core/loginout` block) trying to hook onto the same anchor block will be ignored, irrespective of the position.

Props tomjcafferkey, bernhard-reiter, gziolo.
Fixes #59574.
Built from https://develop.svn.wordpress.org/trunk@58186


git-svn-id: http://core.svn.wordpress.org/trunk@57649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 18:35:14 +00:00
Joe McGill
bdebc89143 Editor: Remove additional calls to WP_Theme_JSON::_construct.
This improves performance of the  `WP_Theme_JSON_Resolver` class by avoiding redundant construction of `WP_Theme_JSON` objects for each origin.

Props thekt12, joemcgill, swissspidy, audrasjb, oandregal.
Fixes #61112.

Built from https://develop.svn.wordpress.org/trunk@58185


git-svn-id: http://core.svn.wordpress.org/trunk@57648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 16:14:13 +00:00
Sergey Biryukov
0d6e7f33c4 Editor: Add excerpt support to the wp_block post type.
The purpose is to enable using the excerpt as a description for user-created patterns on the Site Editor Pattern screens.

This commit backports the original PR from Gutenberg repository:
* [[https://github.com/WordPress/gutenberg/pull/60549|#60549: [Data Views] User patterns: Use excerpt as description]]

Reference: [[https://github.com/WordPress/gutenberg/issues/55244|#55244: Patterns: Add descriptions to user-created patterns]].

Follow-up to [44146], [44150], [50835], [56030].

Props poena, ntsekouras, krupalpanchal.
Fixes #61250.
Built from https://develop.svn.wordpress.org/trunk@58184


git-svn-id: http://core.svn.wordpress.org/trunk@57647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-23 13:41:58 +00:00
Sergey Biryukov
6cb9583d5d Tests: Use assertSame() in navigation fallback tests.
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 [56052].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58183


git-svn-id: http://core.svn.wordpress.org/trunk@57646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-22 15:41:11 +00:00
spacedmonkey
0775b69427 Options, Meta APIs: Introduce wp_prime_network_option_caches() to load multiple network options with a single database request.
WordPress's `get_network_option` function generally makes individual database requests for each network option. While some options are preloaded in `wp_load_core_site_options`, many still require single database calls to the network options table.

Building on the work done in [56445], [56990], and [57013], which introduced the `wp_prime_option_caches` function, this commit adds two new functions: `wp_prime_network_option_caches` and `wp_prime_site_option_caches`. These functions enable developers to pass an array of option names, allowing caches for these options to be primed in a single object cache or database request. If an option is not found, the notoptions cache key is refreshed, preventing unnecessary repeated requests.

The function `wp_prime_site_option_caches` is similar to `get_site_option`, enabling developers to retrieve network options on the current network without needing to know the current network ID. If these functions are called in a non-multisite environment, they fall back to using wp_prime_option_caches.

These functions have been implemented in `wp_load_core_site_options`, `get_site_transient`, and `set_site_transient`.

Props to spacedmonkey, peterwilsoncc, mukesh27, joemcgill.
Fixes #61053.
Built from https://develop.svn.wordpress.org/trunk@58182


git-svn-id: http://core.svn.wordpress.org/trunk@57645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-21 21:38:12 +00:00
Sergey Biryukov
b6b5ffbf9f Tests: Use assertSame() in block support tests.
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.

Includes renaming a few test classes per the naming conventions.

Reference: [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization Writing PHP Tests: Naming and Organization].

Follow-up to [53076], [53085], [54497], [56046], [56614], [57246], [57491].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58181


git-svn-id: http://core.svn.wordpress.org/trunk@57644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-21 10:33:13 +00:00
spacedmonkey
90de126bd5 Query: Add more context to the split_the_query filter.
Add more context to the `split_the_query` filter by adding two new parameters: '$old_request' and '$clauses'. This enriches the filter with additional information about the SQL query before the query is run, enabling developers to have more context to help decide if a query should be split. 

Props spacedmonkey, shailu25, rcorrales, tillkruess.
Fixes #59514.
Built from https://develop.svn.wordpress.org/trunk@58180


git-svn-id: http://core.svn.wordpress.org/trunk@57643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 21:21:16 +00:00
Tammie Lister
73bb34454d Twenty Twenty-Three: Updates Screenshot.
The screenshot wasn't showing the front view. This now resolves it to fit guidelines. 

Props kafleg, poena, shivashankerbhatta, SergeyBiryukov.
Fixes #56949.

Built from https://develop.svn.wordpress.org/trunk@58179


git-svn-id: http://core.svn.wordpress.org/trunk@57642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 17:49:17 +00:00
Tammie Lister
cd0b1dde3c Bundled Themes: Removes measurement in px for zero and related fixes.
The measurement in px for zero values is not needed. It does this for Twenty Twenty-One, Twenty Ten, Twenty Eleven and Twenty Nineteen. This also adds short-hand-property-no-redudant-values to Twenty Twenty-One's stylelint rules. Included is removing box-shadow prefixed rules before the standard property in Twenty Ten. Finally, it also removes empty spaces at the ends of lines in Twenty Thirteen, Twenty Nineteen and Twenty Twenty. 

Props ankitmaru, SergeyBiryukov, netweb, mukesh27, ryelle, audrasjb, sabernhardt.
Fixes #53874.

Built from https://develop.svn.wordpress.org/trunk@58178


git-svn-id: http://core.svn.wordpress.org/trunk@57641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 15:14:16 +00:00
Tammie Lister
15c49cc2ca Twenty Sixteen: Fixes mismatch of visual and DOM order of elements.
In the footer the site info and social menu visual order and DOM order was mismatched. This fixes that and resolves the altering.

Props afercia, joedolson, rcreators, sabernhardt.
Fixes #60496.

Built from https://develop.svn.wordpress.org/trunk@58177


git-svn-id: http://core.svn.wordpress.org/trunk@57640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 14:42:11 +00:00
Sergey Biryukov
22aa7cb48a Tests: Correct a number of invalid @covers tags.
This resolves a few warnings when running PHPUnit with the code coverage report:
{{{
"@covers WP_Privacy_Requests_List_Table::get_views" is invalid
"@covers WP_Block_Bindings_Registry::register_block_bindings_source" is invalid
"@covers WP_Block_Patterns_Registry::_register_theme_block_patterns" is invalid
}}}

The two removed `@coversDefaultClass` annotations are redundant, as the class name is already included in the individual `@covers` tags. Removing them allows `@covers ::_register_theme_block_patterns` to work as expected, where `_register_theme_block_patterns` is an standalone function, not a class method.

Follow-up to [54215], [56733], [57373], [57562].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58176


git-svn-id: http://core.svn.wordpress.org/trunk@57639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 14:40:16 +00:00
Sergey Biryukov
1251cb8c5e Coding Standards: Rewrite an empty conditional in get_post_status().
Expand the comment to further clarify the post object check performed.

Follow-up to [58174].

See #59283.
Built from https://develop.svn.wordpress.org/trunk@58175


git-svn-id: http://core.svn.wordpress.org/trunk@57638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 13:44:15 +00:00
youknowriad
e1034e15f0 Posts: Ensure get_sample_permalink returns the right permalink for auto-draft posts.
The post editor uses the permalink_template property from the posts REST API to render the post slug input or not. For auto-drafts or newly created posts, this property was not set properly. This PR solves by fixing the get_sample_permalink function used to compute this property.

Props youknowriad, mcsf, antonvlasenko, azaozz, peterwilsoncc, andrewserong, hellofromTonya, spacedmonkey.
Fixes #59283.
Built from https://develop.svn.wordpress.org/trunk@58174


git-svn-id: http://core.svn.wordpress.org/trunk@57637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 09:49:16 +00:00
Peter Wilson
3cdaeae7ab Editor: Fix unit tests for fluid typography CSS.
Fixes a unit test to assert that CSS variables are defined in `:root{}` rather than `body{}`. Fixes a couple of docblocks in the same file.

Follow up to [58171].

Props ramonopoly.
See #61118.

Built from https://develop.svn.wordpress.org/trunk@58173


git-svn-id: http://core.svn.wordpress.org/trunk@57636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 05:24:18 +00:00
Sergey Biryukov
e59e190855 Docs: Add a note that the who parameter in WP_User_Query is deprecated.
Any usage of `'who' => 'authors'` should be updated to use capability queries instead.

Includes documenting the capability query parameters in `wp_dropdown_users()`.

Follow-up to [51943].

Props kkmuffme, swissspidy, SergeyBiryukov.
See #61243.
Built from https://develop.svn.wordpress.org/trunk@58172


git-svn-id: http://core.svn.wordpress.org/trunk@57635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-19 19:53:19 +00:00
isabel_brison
ff2929bf19 Editor: pass fluid typography theme.json settings to wp_get_typography_font_size_value.
Updates `wp_get_typography_font_size_value` to accept an array of theme.json settings instead of a boolean derived from global state.

Props ramonopoly, audrasjb.
Fixes #61118.

Built from https://develop.svn.wordpress.org/trunk@58171


git-svn-id: http://core.svn.wordpress.org/trunk@57634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-18 23:18:15 +00:00