Changeset 41766 for trunk/src/wp-includes/nav-menu.php
- Timestamp:
- 10/05/2017 01:37:39 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu.php
r41237 r41766 183 183 */ 184 184 return apply_filters( 'has_nav_menu', $has_nav_menu, $location ); 185 } 186 187 /** 188 * Returns the name of a navigation menu. 189 * 190 * @since 4.9.0 191 * 192 * @param string $location Menu location identifier. 193 * @return string Menu name. 194 */ 195 function wp_get_nav_menu_name( $location ) { 196 $menu_name = ''; 197 198 $locations = get_nav_menu_locations(); 199 200 if ( isset( $locations[ $location ] ) ) { 201 $menu = wp_get_nav_menu_object( $locations[ $location ] ); 202 203 if ( $menu && $menu->name ) { 204 $menu_name = $menu->name; 205 } 206 } 207 208 /** 209 * Filters the navigation menu name being returned. 210 * 211 * @since 4.9.0 212 * 213 * @param string $menu_name Menu name. 214 * @param string $location Menu location identifier. 215 */ 216 return apply_filters( 'wp_get_nav_menu_name', $menu_name, $location ); 185 217 } 186 218
Note: See TracChangeset
for help on using the changeset viewer.