diff --git src/wp-includes/nav-menu.php src/wp-includes/nav-menu.php
index 1585c62..71857ff 100644
|
|
|
function has_nav_menu( $location ) { |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| | 188 | * Returns the title of a navigation menu |
| | 189 | * |
| | 190 | * @since 4.8.1 |
| | 191 | * |
| | 192 | * @param string $theme_location Location of a navigation menu in a theme. |
| | 193 | * @return string |
| | 194 | */ |
| | 195 | function wp_nav_menu_title( $theme_location ) { |
| | 196 | $title = ''; |
| | 197 | if ( $theme_location && ( $locations = get_nav_menu_locations() ) && isset( $locations[ $theme_location ] ) ) { |
| | 198 | $menu = wp_get_nav_menu_object( $locations[ $theme_location ] ); |
| | 199 | |
| | 200 | if ( $menu && $menu->name ) { |
| | 201 | $title = $menu->name; |
| | 202 | } |
| | 203 | } |
| | 204 | /** |
| | 205 | * Filter navigation menu title with the location of a navigation menu in a theme. |
| | 206 | * |
| | 207 | * @since 4.8.1 |
| | 208 | * |
| | 209 | * @param string $title Title of the navigation menu. |
| | 210 | * @param string $theme_location Location of a navigation menu in a theme. |
| | 211 | */ |
| | 212 | return apply_filters( 'wp_nav_menu_title', $title, $theme_location ); |
| | 213 | } |
| | 214 | |
| | 215 | /** |
| 188 | 216 | * Determines whether the given ID is a nav menu item. |
| 189 | 217 | * |
| 190 | 218 | * @since 3.0.0 |