Changeset 35452 for trunk/src/wp-includes/nav-menu.php
- Timestamp:
- 10/30/2015 08:56:36 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu.php
r35382 r35452 278 278 isset( $_possible_existing->term_id ) && 279 279 $_possible_existing->term_id != $menu_id 280 ) 281 return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) ); 280 ) { 281 return new WP_Error( 'menu_exists', 282 /* translators: %s: menu name */ 283 sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ), 284 '<strong>' . esc_html( $menu_data['menu-name'] ) . '</strong>' 285 ) 286 ); 287 } 282 288 283 289 // menu doesn't already exist, so create a new menu … … 285 291 $menu_exists = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' ); 286 292 287 if ( $menu_exists ) 288 return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) ); 293 if ( $menu_exists ) { 294 return new WP_Error( 'menu_exists', 295 /* translators: %s: menu name */ 296 sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ), 297 '<strong>' . esc_html( $menu_data['menu-name'] ) . '</strong>' 298 ) 299 ); 300 } 289 301 290 302 $_menu = wp_insert_term( $menu_data['menu-name'], 'nav_menu', $args );
Note: See TracChangeset
for help on using the changeset viewer.