49122 Commits

Author SHA1 Message Date
Riad Benguella
1d05ea9d11 Editor: Check for null values in Theme JSON to cater for blockGap.
When resolving theme.json preset variables, add a check to make sure the value is not empty before we run it through strpos() and preg_match_all().

Props ramonopoly, mukesh27, get_dave.
Fixes #60613.

git-svn-id: https://develop.svn.wordpress.org/trunk@57716 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-27 10:13:13 +00:00
Kelly Choyce-Dwan
ec37b57fb9 Help/About: Update the About page for 6.5.
Introducing the new content & design for the 6.5 About page & related pages. This style is simplified, with no header images, and brings back the illustrations from previous versions for Contribute, Freedoms, and Privacy.

This also includes a fix for heading hierarchy on the Get Involved page.

Props laurlittle, dansoschin, benjamin_zekavica, richtabor, joen, annezazu, swissspidy, marybaum, ryelle, huzaifaalmesbah.
See #60303.



git-svn-id: https://develop.svn.wordpress.org/trunk@57715 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 23:49:59 +00:00
Pascal Birchler
3e91cf91f6 Upgrade/Install: Improve localized strings related to plugin/theme installation and activation.
Adds context to strings where applicable to disambiguate them, coherently throughout the admin. Also improves some of the strings introduced in [57545] to ease localization.

Props swissspidy, costdev.
Fixes #60630. See #22316.

git-svn-id: https://develop.svn.wordpress.org/trunk@57714 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 20:33:46 +00:00
Aaron Jorbin
d0aa2fe32b Site icon: Polish up Site Icon on the general settings screen.
This fixes a number of issues, chief among them:
- Updates to the site title are reflected in the preview.
- Improve alt text for preview
- Make string describing site icon more succinct.
- Add inline documentation to JavaScript

Props kebbet, jorbin, swissspidy, afercia, mukesh27, alexstine, jameskoster, andraganescu.
Fixes #54370.



git-svn-id: https://develop.svn.wordpress.org/trunk@57713 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 20:16:09 +00:00
Sergey Biryukov
a975632f7f Twenty Nineteen: Further adjust CSS selectors used to change the primary color.
This aims to make the file, button, quote, pullquote, and search block selectors work on multiple WordPress versions.

Follow-up to [57637].

Props poena, mukesh27.
Fixes #59922.

git-svn-id: https://develop.svn.wordpress.org/trunk@57712 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 16:25:28 +00:00
Pascal Birchler
d1e7c85e7c Login and Registration: Slash email address when updating an existing user.
Addresses an issue with password reset keys when the email address contains special characters such as apostrophes.

Props emirpprime, rajinsharwar, fnpen, hellofromTonya, oglekler, nicolefurlan.
Fixes #52529.

git-svn-id: https://develop.svn.wordpress.org/trunk@57711 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 10:41:50 +00:00
Pascal Birchler
55290eddfa Tests: Update incorrect assertion message added in [57366].
Props david.binda.
Fixes #60358.

git-svn-id: https://develop.svn.wordpress.org/trunk@57710 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 10:27:30 +00:00
Joe Dolson
716cf66fda Code Standards: Fix alignment in tests.
Fix variable alignment in changed tests. Follow-up to [r57708]. Because I edited the wrong local copy when I fixed that.

Props joedolson.
See #34668.

git-svn-id: https://develop.svn.wordpress.org/trunk@57709 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 00:58:11 +00:00
Joe Dolson
eb33c60eaa Toolbar: Accessibility: Keyboard navigation for screen readers.
Change the admin toolbar to have `role="menu"` and support opening for screen readers. Remove screen reader only log out link and collapse duplicate profile links into one link. This is an imperfect solution to a complex problem in the adminbar, but the lack of screen reader access to submenus is a major accessibility problem, and this fix provides access, even if the mechanism is imperfect.

Screen reader log out added in [21452].

Props abletec, Cheffheid, sabernhardt, alexstine, joedolson, afercia, sparklingrobots, danieltj, swissspidy, netweb, dionysous.
Fixes #34668, #43633.

git-svn-id: https://develop.svn.wordpress.org/trunk@57708 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-26 00:50:22 +00:00
Peter Wilson
2ba8f942cb Upgrade/Install: Normalize major versions in is_wp_version_compatible().
Modify `is_wp_version_compatible()` to return the expected result for major WordPress versions formatted as either `x.x` or `x.x.0` (for example `6.5` and `6.5.0`).

The WordPress project currently documents major version numbers in both formats leading to confusion for developers using the `is_wp_version_compatible()` function. As the PHP function `version_compare()` treats `x.x` and `x.x.0` as different version numbers this leads to unexpected results in the WP function.

This change removes a trailing `.0` from major version numbers to account for the WordPress project using the two formats interchangeably.

Props afragen, azaozz, costdev, joemcgill, jorbin, kkmuffme, sessioncookiemonster, swissspidy, wazeter.
Fixes #59448.


git-svn-id: https://develop.svn.wordpress.org/trunk@57707 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-25 22:15:11 +00:00
Sergey Biryukov
78b37f39f6 Tests: Use assertSame() in new_admin_email_subject filter test.
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 [57283].

See #59655.

git-svn-id: https://develop.svn.wordpress.org/trunk@57706 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-25 15:25:49 +00:00
Sergey Biryukov
7ee50fe6e3 Tests: Use assertSame() in comment_exists() 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 [34456], [34460].

Props costdev.
See #59655.

git-svn-id: https://develop.svn.wordpress.org/trunk@57705 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-24 19:28:52 +00:00
Pascal Birchler
aea8a21c11 I18N: Do not set translation controller locale in bootstrap.
Removes the `WP_Translation_Controller::set_locale()` call from `wp-settings.php`, which happened before the current user was loaded.
That caused translations to be missing when the site locale and user locale were different, as the translation was associated with the wrong locale.

Turns out this call was not needed at all, as the locale will be set/updated when calling `load_textdomain()` anyway.

Props oglekler.
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57704 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-24 09:46:11 +00:00
Joe McGill
5328b94691 Editor: Improve PHPUnit tests for block pattern registration.
This is a followup to [57683], which adds additional unit test coverage to ensure block pattern content is not loaded from files during registration, but instead when those patterns are accessed. This also improves the `set_up` and `tear_down` methods for the `Tests_Blocks_wpBlockPattersRegistry` test class to ensure that any modifications made to registered blocks during the tests are reset after each test.

Props thekt12, joemcgill.
See #59532.


git-svn-id: https://develop.svn.wordpress.org/trunk@57703 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-23 16:53:39 +00:00
Pascal Birchler
38ee6fc470 Build/Test Tools: Update JSHint config to remove deprecated options.
Removes deprecated options that no longer have any effect, and updates the targeted ES version in line with WordPress’ browser support.

This change mostly allows new code to properly use trailing commas, as added by the Prettier formatter.

Future efforts should rather go towards adopting ESLint for code formatting, see #31823.

Props netweb.
Fixes #28236.

git-svn-id: https://develop.svn.wordpress.org/trunk@57702 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-23 10:36:36 +00:00
Sergey Biryukov
6ffe615d1c Docs: Add a @since note for $preferred_ext parameter in wp_mime_type_icon().
Follow-up to [57687].

See #31352.

git-svn-id: https://develop.svn.wordpress.org/trunk@57701 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-23 09:41:18 +00:00
Greg Ziółkowski
f720cdc942 Editor: Add id to the supported Image's binding attributes
Syncs changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/59194.

Fixes #60577.
Props kevin940726, ankit-k-gupta, sonali844, harshalkadu, gziolo.



git-svn-id: https://develop.svn.wordpress.org/trunk@57700 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-23 09:18:34 +00:00
K. Adam White
367157bb35 Script Loader: Inject wp_remove_surrounding_empty_script_tags function name in returned error string using sprintf.
The name of this function should not be editable by the translator in the internationalized return error string.

Props naoki0h, swissspidy, kirasong.
Fixes #60590.


git-svn-id: https://develop.svn.wordpress.org/trunk@57699 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-23 05:43:42 +00:00
Tonya Mork
8448d06c49 General: Handle missing field in WP_List_Util::pluck().
Handles when the `$field` (i.e. key or property) is missing in one of the `$input_list` items by checking the key (array) or property (object) exists before using it for assignment.

Resolves the following bugs:

* a PHP warning for undefined key|property.
* `null` being set for that array or object within the returned list.

The changes resolve the issues in both `WP_List_Util::pluck()` (if invoked directly) and `wp_list_pluck()`.

Also includes an additional test for the scenario where the `wp_list_pluck()` `$index_key` is not `null`, the `$field` is missing in one of the `$input_list` items.

Follow-up to [55423], [51663], [42527], [38928].

Props iamarunchaitanyajami, davidbinda, hellofromTonya, helgatheviking.
Fixes #59774.

git-svn-id: https://develop.svn.wordpress.org/trunk@57698 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 21:50:10 +00:00
Pascal Birchler
ec459dcc64 Upgrade/Install: Improve plugin install button appearance.
Fixes a misaligned spinner icon when opening the plugin details information in a new tab rather than the modal, and then installing the plugin in that window.

Props huzaifaalmesbah, zunaid321, swissspidy.
Fixes #60494.

git-svn-id: https://develop.svn.wordpress.org/trunk@57697 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 18:03:01 +00:00
Pascal Birchler
9bcc4ebc33 Upgrade/Install: Fix upgrade count decrement on Updates page.
Fixes a JavaScript error that caused the update count bubble not to decrement when updating a plugin.

Props nendeb55, swissspidy.
Fixes #60589.

git-svn-id: https://develop.svn.wordpress.org/trunk@57696 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 17:56:09 +00:00
Pascal Birchler
4a3240eb8f Shortcodes: Fix small typo in inline documentation.
Props shailu25, mukesh27.
Fixes #60603.

git-svn-id: https://develop.svn.wordpress.org/trunk@57695 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 15:51:32 +00:00
Sergey Biryukov
9433cc089a Coding Standards: Correct alignment in wp_get_attachment_image_src().
This resolves a WPCS warning:
{{{
Equals sign not aligned with surrounding statements
}}}
so that the output of `composer format` is clean.

Follow-up to [57687].

See #59650.

git-svn-id: https://develop.svn.wordpress.org/trunk@57694 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 11:54:10 +00:00
Pascal Birchler
34fb70014e Docs: Improve docblock for $x_redirect_by param in wp_redirect().
The `$x_redirect_by` parameter is supported by `wp_redirect()` and `wp_safe_redirect()` to set the `X-Redirect-By` header.
It can be modified via the `x_redirect_by` filter.

This updates the docblock to clarify that `false` can be passed to disable sending the header, which was previously undocumented behavior.

Props kkmuffme, swissspidy.
Fixes #60209.

git-svn-id: https://develop.svn.wordpress.org/trunk@57693 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 10:56:26 +00:00
Pascal Birchler
2f4cc966e9 Docs: Use more inclusive term in rest_filter_response_fields docblock.
See #59651.

git-svn-id: https://develop.svn.wordpress.org/trunk@57692 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-22 09:52:56 +00:00
Joe Dolson
bf2d4016aa Media: Fix broken media modal following [57688]
Fix undefined TypeError overlooked in [57688].

Props antpb, swissspidy, joedolson.
Fixes #58973.

git-svn-id: https://develop.svn.wordpress.org/trunk@57691 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 20:55:50 +00:00
Joe Dolson
84ce628d0b Twenty Twenty-Three: Update XX-large font-sizes for accessibility.
Update XX-large font-sizes so that the responsive typography meets the minimum ratio between the min and max font-sizes of 0.61 required for accessible responsive typography.

Props mikachan, ryokuhi, poena, dhruvishah2203, joedolson.
Fixes #58603.

git-svn-id: https://develop.svn.wordpress.org/trunk@57690 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 20:05:54 +00:00
Tonya Mork
214b196ce9 Build/Test Tools: Revert r57684.
Changes to the `test_readme_mariadb_version()` test were made in an effort to stabilize the connection tests and CI failures. After the changeset, all multisite tests CI jobs connected and passed, but oddly all single site tests CI jobs repeatedly and consistently failed.

Reverting to unblock the CI jobs while continued investigation happens.

See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57689 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 20:04:50 +00:00
Joe Dolson
a138b23bc6 Media: Prevent Media Library sidebar from showing with no actions.
Fix an issue where the actions sidebar in the media library could appear when there are no relevant actions available.

Props sruthi89, nithi22, ivanzhuck, dhruvishah2203, joemcgill, ukdrahul, joedolson, shailu25.
Fixes #58973.

git-svn-id: https://develop.svn.wordpress.org/trunk@57688 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 19:44:17 +00:00
Joe Dolson
c2cca0dcfc Media: Ensure wp_mine_type_icon() returns expected file type.
Add an argument to `wp_mime_type_icon()` to control the file type returned. Following [57638], there are two file formats in the media icons directory. Different systems would pull up different files by default dependent on the order loaded into the cached array, causing intermittent test failures and unpredictable behavior.

Function update allows core usages to always return the `.svg` while maintaining backwards compatibility for any extended usage that expects a `.png`. Follow up to [57638].

Also handles a missed case in media list view.

Props SergeyBiryukov, sabernhardt, joedolson, antpb.
Fixes #31352.

git-svn-id: https://develop.svn.wordpress.org/trunk@57687 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 19:25:18 +00:00
Pascal Birchler
8ced706f7f Editor: Ensure font collection metadata can be properly localized.
Updates `wp_register_font_collection()` and `WP_Font_Collection` so that only font families can be loaded from a file or URL.
All metadata, such as name, description, and list of font categories, needs to be passed directly in PHP so that it can be properly localized.

Props swissspidy, mmaattiiaass, grantmkin, youknowriad.
Fixes #60509.

git-svn-id: https://develop.svn.wordpress.org/trunk@57686 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 19:24:14 +00:00
Joe McGill
618e42240f Themes: Use original template paths when switching blogs.
This fixes a bug introduced by [57129] and [56635] in which deprecating the previous  `TEMPLATEPATH` and `STYLESHEETPATH` constants in favor of `get_template_directory()` and `get_stylesheet_directory()` functions caused the active theme template path to change when using `switch_to_blog()`.

This introduces a new function, `wp_set_template_globals()`, which is called during the bootstrap process to store the template paths to new globals values `$wp_template_path` and `$wp_stylesheet_path`. This restores behavior to how things worked prior to [56635] but retains the ability for template values to be reset for better testability.

Related #18298, #60025.

Props joemcgill, flixos90, mukesh27, swissspidy, manfcarlo, metropolis_john, jeremyfelt.
Fixes #60290.


git-svn-id: https://develop.svn.wordpress.org/trunk@57685 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 19:24:12 +00:00
Colin Stewart
cd57def8b4 Tests: Query mariadb.org instead of mariadb.com in README test.
The `test_readme_mariadb_version()` test method has been experiencing HTTP failures that result in test and CI failures.

This switches to mariadb.org which may result in more stable test runs.

Some additional safety assertions are also included.

Props hellofromTonya, SergeyBiryukov, costdev.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57684 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 18:59:57 +00:00
Joe McGill
a2e34fea96 Editor: Load pattern content only when used.
Previously, the content for all registered patterns would get loaded on each request when the patterns are registered. Instead, this stores the path the pattern file during registration and reads the content the first time the pattern is used, which is a performance optimization.

Props thekt12, spacedmonkey, gziolo, aristath, joemcgill.
Fixes #59532.


git-svn-id: https://develop.svn.wordpress.org/trunk@57683 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 18:48:30 +00:00
Pascal Birchler
668cbbf7a5 Script Loader: Fix small typo in wp_remove_surrounding_empty_script_tags docblock.
Props shailu25.
Fixes #60591.

git-svn-id: https://develop.svn.wordpress.org/trunk@57682 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 18:37:29 +00:00
Tonya Mork
6c2ed039cb Export: Include featured image for posts or pages.
This bugfix resolves an issue in `export_wp()` with featured images.

When using Tools > Export and selecting either Posts or Pages (with or without a specific author), the resulting XML file now includes a XML item for each post|page's featured image attachment and its metadata.

Uses same chunking (for performance) and code patterns from existing code in the same file.

Adds a new test class for `export_wp()` with code coverage specific to this bugfix.

Follow-up to [34326], [14444], [6375], [6335].

Props billseymour, nateallen, petitphp, hellofromTonya, duck_, jane, rcain, jghazally, jghazally, smub, batmoo, axwax, creativeslice, dlocc, nacin, wonderboymusic, ganon, SergeyBiryukov, hlashbrooke, chriscct7, fischfood, hifidesign, ankit-k-gupta, 5um17, shailu25, huzaifaalmesbah, mukesh27.
Fixes #17379.

git-svn-id: https://develop.svn.wordpress.org/trunk@57681 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 18:13:27 +00:00
Sergey Biryukov
3a196ba354 Tests: Use assertSame() in wp_insert_post() 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 [34085], [35183], [48937], [53782], [53785], [53883], [54402].

Props costdev.
See #59655.

git-svn-id: https://develop.svn.wordpress.org/trunk@57680 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 17:33:54 +00:00
Colin Stewart
05456bf555 Plugins: Output plugin card elements in the order they're displayed.
Previously, the notice for listing dependencies in a plugin card was styled with the CSS `order` properties. This created a mismatch between the visual order and DOM order of elements in the plugin card.

For accessibility, visual order and DOM order must always match when they affect meaning and functionality.

This removes the CSS `order` properties and outputs the dependencies notice later, making the visual and DOM order match. Some unused/empty CSS is also removed.

Follow-up to [57545].

Props afercia, afragen, bosskhj, huzaifaalmesbah, mukesh27, costdev.
Fixes #60488.

git-svn-id: https://develop.svn.wordpress.org/trunk@57679 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 17:32:41 +00:00
John Blackbourn
d916f05830 Docs: Correct the URLs that document the available images for MySQL and MariaDB for the local development environment.
See #59930


git-svn-id: https://develop.svn.wordpress.org/trunk@57678 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 14:32:05 +00:00
Greg Ziółkowski
a578de5860 Editor: Add fallback for block version when registering block script module
It aligns implementation with how regular scripts are handled.

Follow-up [57437].
See #60233.




git-svn-id: https://develop.svn.wordpress.org/trunk@57677 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 11:18:34 +00:00
bernhard-reiter
299e2adb44 Block Hooks: Make test a bit easier to read.
Follow-up [57668].
Props gziolo.
See #60580.

git-svn-id: https://develop.svn.wordpress.org/trunk@57676 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 10:47:49 +00:00
Jb Audras
4ba0963a1f Editor: Allow symlinks in directories provided to get_block_asset_url().
This changeset allows using symbolic links for `editorScript` and `editorStyle` in `register_block_type()`. This adds `realpath` to template and stylesheet in `get_block_asset_url()` to ensure returning canonicalized absolute pathnames.

Follow-up to [56683].

Props antonlukin, spacedmonkey, maxpertici.
Fixes #59175.
See #58525.





git-svn-id: https://develop.svn.wordpress.org/trunk@57675 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 09:36:18 +00:00
Colin Stewart
75eb1a86e9 Tests: Mock API response in Plugin Dependencies tests.
Previously, the tests for `WP_Plugin_Dependencies::get_dependency_names()` performed an API request to WordPress.org. If an HTTP failure occurred when connecting to WordPress.org, this could trigger test failures.

This mocks the API response to prevent HTTP failures from triggering test failures.

Follow-up to [57545].

Props swissspidy, peterwilsoncc, costdev.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57674 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-21 01:05:53 +00:00
Sergey Biryukov
bd78247617 Tests: Use assertSame() in wp_read_image_metadata() 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 [49/tests], [198/tests], [34374], [48937], [52269].

Props costdev.
See #59655.

git-svn-id: https://develop.svn.wordpress.org/trunk@57673 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 18:14:41 +00:00
Jb Audras
c58cb01aaa Post WordPress 6.5 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@57671 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 17:20:47 +00:00
Jb Audras
27d51aca80 WordPress 6.5 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@57670 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 17:04:47 +00:00
Riad Benguella
2fd9591653 Editor: Update Packages with the latest bug fixes for 6.5 beta 2 (Round 2).
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59208

See #60315.

git-svn-id: https://develop.svn.wordpress.org/trunk@57669 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 15:39:42 +00:00
bernhard-reiter
3a206f74a1 Block Hooks: Allow hooked_block filters to return null.
Allow returning null from the `hooked_block` and `hooked_block_{$hooked_block_type}` filters to suppress a hooked block from being inserted. This is required to allow extenders conditionally inserting a hooked block based on e.g. the value of an attribute of the anchor block.

Props swissspidy, gziolo, joshuatf, tomjcafferkey.
Fixes 60580.

git-svn-id: https://develop.svn.wordpress.org/trunk@57668 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 15:20:39 +00:00
Jonathan Desrosiers
804360948c Build/Test Tools: Bump the Node.js version for Codespaces.
This bumps the version of Node.js used in GitHub Codespaces from 16 to 20.

Follow up to [57212].

Props itschristiandale, huzaifaalmesbah.
Fixes #60555.

git-svn-id: https://develop.svn.wordpress.org/trunk@57667 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 15:04:04 +00:00
bernhard-reiter
fb27575fa1 Block Hooks: Fix actual/expected order in test assertions.
In test assertions for the `set_ignored_hooked_blocks_metadata` function, the actual value was erroneously passed as the first argument, and the expected value as the second. This changeset rectifies this by swapping the arguments.

Follow-up [57627].
See #60506.

git-svn-id: https://develop.svn.wordpress.org/trunk@57666 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-20 13:23:08 +00:00