web/wp-admin/nav-menus.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
    20 
    20 
    21 // Permissions Check
    21 // Permissions Check
    22 if ( ! current_user_can('edit_theme_options') )
    22 if ( ! current_user_can('edit_theme_options') )
    23 	wp_die( __( 'Cheatin’ uh?' ) );
    23 	wp_die( __( 'Cheatin’ uh?' ) );
    24 
    24 
    25 // jQuery
       
    26 wp_enqueue_script( 'jquery-ui-draggable' );
       
    27 wp_enqueue_script( 'jquery-ui-droppable' );
       
    28 wp_enqueue_script( 'jquery-ui-sortable' );
       
    29 
       
    30 // Nav Menu functions
       
    31 wp_enqueue_script( 'nav-menu' );
    25 wp_enqueue_script( 'nav-menu' );
    32 
       
    33 // Metaboxes
       
    34 wp_enqueue_script( 'common' );
       
    35 wp_enqueue_script( 'wp-lists' );
       
    36 wp_enqueue_script( 'postbox' );
       
    37 
    26 
    38 if ( wp_is_mobile() )
    27 if ( wp_is_mobile() )
    39 	wp_enqueue_script( 'jquery-touch-punch' );
    28 	wp_enqueue_script( 'jquery-touch-punch' );
    40 
    29 
    41 // Container for any messages displayed to the user
    30 // Container for any messages displayed to the user
   448 get_current_screen()->add_help_tab( array(
   437 get_current_screen()->add_help_tab( array(
   449 'id'		=> 'overview',
   438 'id'		=> 'overview',
   450 'title'		=> __('Overview'),
   439 'title'		=> __('Overview'),
   451 'content'	=>
   440 'content'	=>
   452 	'<p>' . __('This feature allows you to use a custom menu in place of your theme&#8217;s default menus.') . '</p>' .
   441 	'<p>' . __('This feature allows you to use a custom menu in place of your theme&#8217;s default menus.') . '</p>' .
   453 	'<p>' . __('Custom menus may contain links to pages, categories, custom links or other content types (use the Screen Options tab to decide which ones to show on the screen). You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.') . '</p>' .
   442 	'<p>' . __('Custom menus may contain links to pages, categories, custom links or other content types (use the Screen Options tab to decide which ones to show on the screen). You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu location, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.') . '</p>' .
   454 	'<p>' . __('If your theme does not support the custom menus feature yet (the default themes, Twenty Eleven and Twenty Ten, do), you can learn about adding this support by following the Documentation link to the side.') . '</p>'
   443 	'<p>' . sprintf( __('If your theme does not support the custom menus feature (the default themes, %1$s and %2$s, do), you can learn about adding this support by following the Documentation link to the side.'), 'Twenty Twelve', 'Twenty Eleven' ) . '</p>'
   455 ) );
   444 ) );
   456 get_current_screen()->add_help_tab( array(
   445 get_current_screen()->add_help_tab( array(
   457 'id'		=> 'create-menus',
   446 'id'		=> 'create-menus',
   458 'title'		=> __('Create Menus'),
   447 'title'		=> __('Create Menus'),
   459 'content'	=>
   448 'content'	=>
   460 	'<p>' . __('To create a new custom menu, click on the + tab, give the menu a name, and click Create Menu. Next, add menu items from the appropriate boxes. You&#8217;ll be able to edit the information for each menu item, and can drag and drop to put them in order. You can also drag a menu item a little to the right to make it a submenu, to create menus with hierarchy. Drop the item into its new nested placement when the dotted rectangle target shifts over, also a little to the right. Don&#8217;t forget to click Save when you&#8217;re finished.') . '</p>'
   449 	'<p>' . __('To create a new custom menu, click on the + tab, give the menu a name, and click Create Menu. Next, add menu items from the appropriate boxes. You&#8217;ll be able to edit the information for each menu item, and can drag and drop to change their order. You can also drag a menu item a little to the right to make it a submenu. Don&#8217;t forget to click Save Menu when you&#8217;re finished.') . '</p>'
   461 ) );
   450 ) );
   462 
   451 
   463 get_current_screen()->set_help_sidebar(
   452 get_current_screen()->set_help_sidebar(
   464 	'<p><strong>' . __('For more information:') . '</strong></p>' .
   453 	'<p><strong>' . __('For more information:') . '</strong></p>' .
   465 	'<p>' . __('<a href="http://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>' .
   454 	'<p>' . __('<a href="http://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>' .