diff --git a/wp-includes/class-wp-customize-nav-menus.php b/wp-includes/class-wp-customize-nav-menus.php index 9540f65836..7326ae807f 100644 --- a/wp-includes/class-wp-customize-nav-menus.php +++ b/wp-includes/class-wp-customize-nav-menus.php @@ -370,6 +370,22 @@ final class WP_Customize_Nav_Menus { } } + // Add "Home" link if search term matches. Treat as a page, but switch to custom on add. + if ( isset( $args['s'] ) ) { + $title = _x( 'Home', 'nav menu home label' ); + $matches = function_exists( 'mb_stripos' ) ? false !== mb_stripos( $title, $args['s'] ) : false !== stripos( $title, $args['s'] ); + if ( $matches ) { + $items[] = array( + 'id' => 'home', + 'title' => $title, + 'type' => 'custom', + 'type_label' => __( 'Custom Link' ), + 'object' => '', + 'url' => home_url(), + ); + } + } + /** * Filters the available menu items during a search request. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 2e16a4f0e5..8b13a3fa8a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.3-beta1-42620'; +$wp_version = '4.9.3-beta1-42621'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.