WordPress.org

Make WordPress Core

Ticket #10266: post-template.diff

File post-template.diff, 648 bytes (added by nathanrice, 6 years ago)

post-template.php diff file to add menu_order as the default sorting method for wp_page_menu

  • post-template.php

     
    805805 * @param array|string $args 
    806806 */ 
    807807function wp_page_menu( $args = array() ) { 
    808         $defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => ''); 
     808        $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => ''); 
    809809        $args = wp_parse_args( $args, $defaults ); 
    810810        $args = apply_filters( 'wp_page_menu_args', $args ); 
    811811