X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/48ab98cb1779cf2088c1351ac3dd3d0da6fb31d3..58b0523c599c731e868bd4bc05b0d686a98d254f:/wp-admin/nav-menus.php?ds=sidebyside diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 0dd34cf9..384a8566 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -20,7 +20,7 @@ if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' // Permissions Check if ( ! current_user_can('edit_theme_options') ) - wp_die( __( 'Cheatin’ uh?' ) ); + wp_die( __( 'Cheatin’ uh?' ), 403 ); wp_enqueue_script( 'nav-menu' ); @@ -231,7 +231,7 @@ switch ( $action ) { check_admin_referer( 'delete-menu_item_' . $menu_item_id ); if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) ) - $messages[] = '
' . __('The menu item has been successfully deleted.') . '
' . __('The menu item has been successfully deleted.') . '
' . $deletion->get_error_message() . '
' . $deletion->get_error_message() . '
' . __( 'The menu has been successfully deleted.' ) . '
' . __( 'The menu has been successfully deleted.' ) . '
' . $deletion->get_error_message() . '
' . $deletion->get_error_message() . '
' . __( 'Selected menus have been successfully deleted.' ) . '
' . __( 'Selected menus have been successfully deleted.' ) . '
' . $_nav_menu_selected_id->get_error_message() . '
' . $_nav_menu_selected_id->get_error_message() . '
' . __( 'Please enter a valid menu name.' ) . '
' . __( 'Please enter a valid menu name.' ) . '
' . __( 'Please enter a valid menu name.' ) . '
' . __( 'Please enter a valid menu name.' ) . '
' . $_nav_menu_selected_id->get_error_message() . '
' . $_nav_menu_selected_id->get_error_message() . '
' . __( 'Menu locations updated.' ) . '
' . __( 'Menu locations updated.' ) . '
' . __( 'This screen is used for managing your custom navigation menus.' ) . '
'; - $overview .= '' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a “Custom Menu” widget on the Widgets screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Fourteen', 'Twenty Thirteen' ) . '
'; + $overview .= '' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a “Custom Menu” widget on the Widgets screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Fifteen', 'Twenty Fourteen' ) . '
'; $overview .= '' . __( 'From this screen you can:' ) . '
'; $overview .= '' . __( 'Each custom menu may contain a mix of links to pages, categories, custom URLs or other content types. Menu links are added by selecting items from the expanding boxes in the left-hand column below.' ) . '
'; $editing_menus .= '' . __( 'Clicking the arrow to the right of any menu item in the editor will reveal a standard group of settings. Additional settings such as link target, CSS classes, link relationships, and link descriptions can be enabled and disabled via the Screen Options tab.' ) . '
'; $editing_menus .= '' . __('For more information:') . '
' . - '' . __('Documentation on Menus') . '
' . + '' . __('Documentation on Menus') . '
' . '' . __('Support Forums') . '
' ); @@ -562,7 +562,11 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> ' . sprintf( _n( 'Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . ''; + if ( 1 == $num_locations ) { + echo '' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '
'; + } else { + echo '' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '
'; + } ?>