Ticket #25528: nav-menus-hook-docs.diff
File nav-menus-hook-docs.diff, 2.9 KB (added by , 12 years ago) |
---|
-
src/wp-admin/nav-menus.php
3 3 * WordPress Administration for Navigation Menus 4 4 * Interface functions 5 5 * 6 * @version 2.0.0 6 * @link http://codex.wordpress.org/Navigation_Menus 7 * @since 2.0.0 7 8 * 8 9 * @package WordPress 9 10 * @subpackage Administration 10 11 */ 11 12 12 /** Load WordPress Administration Bootstrap */ 13 /** 14 * Load WordPress Administration Bootstrap 15 */ 13 16 require_once( dirname( __FILE__ ) . '/admin.php' ); 14 17 15 // Load all the nav menu interface functions 18 /** 19 * Load all the nav menu interface functions 20 */ 16 21 require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' ); 17 22 18 23 if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' ) ) … … 461 466 $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id ); 462 467 } 463 468 469 /** 470 * Appends a menu-max-depth-n class to the admin body classes where n represents the max level of the nav menu. 471 * 472 * @global int $_wp_nav_menu_max_depth Number of levels of the nav menu. 473 * 474 * @param string $classes Admin body tag classes. 475 * @return string Body classes. 476 */ 464 477 function wp_nav_menu_max_depth($classes) { 465 478 global $_wp_nav_menu_max_depth; 466 479 return "$classes menu-max-depth-$_wp_nav_menu_max_depth"; … … 529 542 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 530 543 ); 531 544 532 // Get the admin header 545 /** 546 * Get the admin header 547 */ 533 548 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 534 549 ?> 535 550 <div class="wrap"> … … 602 617 <input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> 603 618 </form> 604 619 </div><!-- #menu-locations-wrap --> 605 <?php do_action( 'after_menu_locations_table' ); ?> 620 <?php 621 /** 622 * Fires actions to be run after displaying the menu locations table. 623 * 624 * @since 3.6 625 */ 626 do_action( 'after_menu_locations_table' ); 627 ?> 606 628 <?php else : ?> 607 629 <div class="manage-menus"> 608 630 <?php if ( $menu_count < 2 ) : ?> … … 627 649 foreach ( array_keys( $menu_locations, $_nav_menu->term_id ) as $menu_location_key ) { 628 650 $locations_assigned_to_this_menu[] = $locations[ $menu_location_key ]; 629 651 } 652 653 /** 654 * Filter the nav menu assigned locations. 655 * 656 * @since 3.6 657 */ 630 658 $assigned_locations = array_slice( $locations_assigned_to_this_menu, 0, absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) ) ); 631 659 632 660 // Adds ellipses following the number of locations defined in $assigned_locations … … 762 790 </div><!-- /#nav-menus-frame --> 763 791 <?php endif; ?> 764 792 </div><!-- /.wrap--> 765 <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?> 793 <?php 794 /** 795 * Load the admin footer template. 796 */ 797 include( ABSPATH . 'wp-admin/admin-footer.php' ); 798 ?>