Docs: Add a @since tag for the pre_wp_setup_nav_menu_item filter.

Includes moving the unit test next to the other `wp_setup_nav_menu_item()` tests and using the `MockAction` class to confirm that the filter runs.

Follow-up to [55867].

Props TobiasBg.
Fixes #56577.
Built from https://develop.svn.wordpress.org/trunk@55868


git-svn-id: http://core.svn.wordpress.org/trunk@55380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-05-30 14:13:22 +00:00
parent 91b653f5cd
commit 6d16bbc088
2 changed files with 5 additions and 3 deletions

View File

@ -822,10 +822,12 @@ function update_menu_item_cache( $menu_items ) {
function wp_setup_nav_menu_item( $menu_item ) {
/**
* Short-circuit the wp_setup_nav_menu_item() output.
* Filters whether to short-circuit the wp_setup_nav_menu_item() output.
*
* Returning a non-null value from the filter will short-circuit wp_setup_nav_menu_item(),
* and return that value.
* returning that value instead.
*
* @since 6.3.0
*
* @param object|null $modified_menu_item Modified menu item. Default null.
* @param object $menu_item The menu item to modify.

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-alpha-55867';
$wp_version = '6.3-alpha-55868';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.