mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Customize: Introduce customize_nav_menu_searched_items
filter for modifying results of nav menu item searches.
This new filter can be used in conjunction with the `customize_nav_menu_available_items` and `customize_nav_menu_available_item_types` filters. Props TimothyBlynJacobs, westonruter. Fixes #34947. Built from https://develop.svn.wordpress.org/trunk@36676 git-svn-id: http://core.svn.wordpress.org/trunk@36643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ed6b0d31c
commit
061cbfadba
@ -334,6 +334,16 @@ final class WP_Customize_Nav_Menus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the available menu items during a search request.
|
||||||
|
*
|
||||||
|
* @since 4.5.0
|
||||||
|
*
|
||||||
|
* @param array $items The array of menu items.
|
||||||
|
* @param array $args Includes 'pagenum' and 's' (search) arguments.
|
||||||
|
*/
|
||||||
|
$items = apply_filters( 'customize_nav_menu_searched_items', $items, $args );
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36675';
|
$wp_version = '4.5-alpha-36676';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user