Ticket #57791: 57791-nav-menus.diff
File 57791-nav-menus.diff, 2.1 KB (added by , 13 months ago) |
---|
-
src/wp-admin/includes/nav-menu.php
1291 1291 } 1292 1292 1293 1293 if ( $some_pending_menu_items ) { 1294 $result .= '<div class="notice notice-info notice-alt inline"><p>' 1295 . __( 'Click Save Menu to make pending menu items public.' ) 1296 . '</p></div>'; 1294 $message = __( 'Click Save Menu to make pending menu items public.' ); 1295 $notice_args = array( 1296 'type' => 'info', 1297 'additional_classes' => array( 'notice-alt', 'inline' ), 1298 ); 1299 $result .= wp_get_admin_notice( $message, $notice_args ); 1297 1300 } 1298 1301 1299 1302 if ( $some_invalid_menu_items ) { 1300 $result .= '<div class="notice notice-error notice-alt inline"><p>' 1301 . __( 'There are some invalid menu items. Please check or delete them.' ) 1302 . '</p></div>'; 1303 $message = __( 'There are some invalid menu items. Please check or delete them.' ); 1304 $notice_args = array( 1305 'type' => 'error', 1306 'additional_classes' => array( 'notice-alt', 'inline' ), 1307 ); 1308 $result .= wp_get_admin_notice( $message, $notice_args ); 1303 1309 } 1304 1310 1305 1311 $result .= '<ul class="menu" id="menu-to-edit"> '; … … 1480 1486 /** This action is documented in wp-includes/nav-menu.php */ 1481 1487 do_action( 'wp_update_nav_menu', $nav_menu_selected_id ); 1482 1488 1483 $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . 1484 sprintf( 1485 /* translators: %s: Nav menu title. */ 1486 __( '%s has been updated.' ), 1487 '<strong>' . $nav_menu_selected_title . '</strong>' 1488 ) . '</p></div>'; 1489 /* translators: %s: Nav menu title. */ 1490 $message = sprintf( __( '%s has been updated.' ), '<strong>' . $nav_menu_selected_title . '</strong>' ); 1491 $notice_args = array( 1492 'id' => 'message', 1493 'dismissible' => true, 1494 'additional_classes' => array( 'updated' ), 1495 ); 1489 1496 1497 $messages[] = wp_get_admin_notice( $message, $notice_args ); 1498 1490 1499 unset( $menu_items, $unsorted_menu_items ); 1491 1500 1492 1501 return $messages;