wp/wp-admin/nav-menus.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   497 	'subMenuFocus'            => __( '%1$s. Sub item number %2$d under %3$s.' ),
   497 	'subMenuFocus'            => __( '%1$s. Sub item number %2$d under %3$s.' ),
   498 	/* translators: %s: Item name. */
   498 	/* translators: %s: Item name. */
   499 	'menuItemDeletion'        => __( 'item %s' ),
   499 	'menuItemDeletion'        => __( 'item %s' ),
   500 	/* translators: %s: Item name. */
   500 	/* translators: %s: Item name. */
   501 	'itemsDeleted'            => __( 'Deleted menu item: %s.' ),
   501 	'itemsDeleted'            => __( 'Deleted menu item: %s.' ),
       
   502 	'itemAdded'               => __( 'Menu item added' ),
       
   503 	'itemRemoved'             => __( 'Menu item removed' ),
       
   504 	'movedUp'                 => __( 'Menu item moved up' ),
       
   505 	'movedDown'               => __( 'Menu item moved down' ),
       
   506 	'movedTop'                => __( 'Menu item moved to the top' ),
       
   507 	'movedLeft'               => __( 'Menu item moved out of submenu' ),
       
   508 	'movedRight'              => __( 'Menu item is now a sub-item' ),
   502 );
   509 );
   503 wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n );
   510 wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n );
   504 
   511 
   505 /*
   512 /*
   506  * Redirect to add screen if there are no menus and this users has either zero,
   513  * Redirect to add screen if there are no menus and this users has either zero,
   597 
   604 
   598 if ( ! $locations_screen ) : // Main tab.
   605 if ( ! $locations_screen ) : // Main tab.
   599 	$overview  = '<p>' . __( 'This screen is used for managing your navigation menus.' ) . '</p>';
   606 	$overview  = '<p>' . __( 'This screen is used for managing your navigation menus.' ) . '</p>';
   600 	$overview .= '<p>' . sprintf(
   607 	$overview .= '<p>' . sprintf(
   601 		/* translators: 1: URL to Widgets screen, 2 and 3: The names of the default themes. */
   608 		/* translators: 1: URL to Widgets screen, 2 and 3: The names of the default themes. */
   602 		__( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the navigation 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.' ),
   609 		__( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the navigation 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.' ),
   603 		admin_url( 'widgets.php' ),
   610 		admin_url( 'widgets.php' ),
   604 		'Twenty Twenty',
   611 		'Twenty Twenty',
   605 		'Twenty Twenty-One'
   612 		'Twenty Twenty-One'
   606 	) . '</p>';
   613 	) . '</p>';
   607 	$overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
   614 	$overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
   616 		)
   623 		)
   617 	);
   624 	);
   618 
   625 
   619 	$menu_management  = '<p>' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '</p>';
   626 	$menu_management  = '<p>' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '</p>';
   620 	$menu_management .= '<ul><li>' . __( 'To edit an existing menu, <strong>choose a menu from the drop down and click Select</strong>' ) . '</li>';
   627 	$menu_management .= '<ul><li>' . __( 'To edit an existing menu, <strong>choose a menu from the drop down and click Select</strong>' ) . '</li>';
   621 	$menu_management .= '<li>' . __( 'If you haven&#8217;t yet created any menus, <strong>click the &#8217;create a new menu&#8217; link</strong> to get started' ) . '</li></ul>';
   628 	$menu_management .= '<li>' . __( 'If you have not yet created any menus, <strong>click the &#8217;create a new menu&#8217; link</strong> to get started' ) . '</li></ul>';
   622 	$menu_management .= '<p>' . __( 'You can assign theme locations to individual menus by <strong>selecting the desired settings</strong> at the bottom of the menu editor. To assign menus to all theme locations at once, <strong>visit the Manage Locations tab</strong> at the top of the screen.' ) . '</p>';
   629 	$menu_management .= '<p>' . __( 'You can assign theme locations to individual menus by <strong>selecting the desired settings</strong> at the bottom of the menu editor. To assign menus to all theme locations at once, <strong>visit the Manage Locations tab</strong> at the top of the screen.' ) . '</p>';
   623 
   630 
   624 	get_current_screen()->add_help_tab(
   631 	get_current_screen()->add_help_tab(
   625 		array(
   632 		array(
   626 			'id'      => 'menu-management',
   633 			'id'      => 'menu-management',
   643 			'content' => $editing_menus,
   650 			'content' => $editing_menus,
   644 		)
   651 		)
   645 	);
   652 	);
   646 else : // Locations tab.
   653 else : // Locations tab.
   647 	$locations_overview  = '<p>' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '</p>';
   654 	$locations_overview  = '<p>' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '</p>';
   648 	$locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s drop down.</strong> When you&#8217;re finished, <strong>click Save Changes</strong>' ) . '</li>';
   655 	$locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s drop down.</strong> When you are finished, <strong>click Save Changes</strong>' ) . '</li>';
   649 	$locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
   656 	$locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
   650 	$locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that theme location' ) . '</li></ul>';
   657 	$locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that theme location' ) . '</li></ul>';
   651 
   658 
   652 	get_current_screen()->add_help_tab(
   659 	get_current_screen()->add_help_tab(
   653 		array(
   660 		array(
   833 		<?php elseif ( $menu_count < 2 ) : ?>
   840 		<?php elseif ( $menu_count < 2 ) : ?>
   834 		<span class="add-edit-menu-action">
   841 		<span class="add-edit-menu-action">
   835 			<?php
   842 			<?php
   836 			printf(
   843 			printf(
   837 				/* translators: %s: URL to create a new menu. */
   844 				/* translators: %s: URL to create a new menu. */
   838 				__( 'Edit your menu below, or <a href="%s">create a new menu</a>. Don&#8217;t forget to save your changes!' ),
   845 				__( 'Edit your menu below, or <a href="%s">create a new menu</a>. Do not forget to save your changes!' ),
   839 				esc_url(
   846 				esc_url(
   840 					add_query_arg(
   847 					add_query_arg(
   841 						array(
   848 						array(
   842 							'action' => 'edit',
   849 							'action' => 'edit',
   843 							'menu'   => 0,
   850 							'menu'   => 0,
   898 			<span class="submit-btn"><input type="submit" class="button" value="<?php esc_attr_e( 'Select' ); ?>"></span>
   905 			<span class="submit-btn"><input type="submit" class="button" value="<?php esc_attr_e( 'Select' ); ?>"></span>
   899 			<span class="add-new-menu-action">
   906 			<span class="add-new-menu-action">
   900 				<?php
   907 				<?php
   901 				printf(
   908 				printf(
   902 					/* translators: %s: URL to create a new menu. */
   909 					/* translators: %s: URL to create a new menu. */
   903 					__( 'or <a href="%s">create a new menu</a>. Don&#8217;t forget to save your changes!' ),
   910 					__( 'or <a href="%s">create a new menu</a>. Do not forget to save your changes!' ),
   904 					esc_url(
   911 					esc_url(
   905 						add_query_arg(
   912 						add_query_arg(
   906 							array(
   913 							array(
   907 								'action' => 'edit',
   914 								'action' => 'edit',
   908 								'menu'   => 0,
   915 								'menu'   => 0,