WordPress.org

Make WordPress Core

Ticket #13293: t13293-twentyten-square-brackets-syntax.diff

File t13293-twentyten-square-brackets-syntax.diff, 765 bytes (added by demetris, 5 years ago)

Square brackets syntax for filtering wp_page_menu_args from Twenty Ten

  • wp-content/themes/twentyten/functions.php

     
    209209 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link 
    210210 */ 
    211211function twentyten_page_menu_args($args) { 
    212         $args = array( 
    213                 'sort_column' => 'menu_order, post_title', 
    214                 'menu_class'  => 'menu', 
    215                 'echo'        => true,           
    216                 'show_home' => true              
    217         ); 
     212        $args['sort_column']    = 'menu_order, post_title'; 
     213        $args['menu_class']             = 'menu'; 
     214        $args['echo']                   = true; 
     215        $args['show_home']              = true; 
     216 
    218217        return $args; 
    219218} 
    220219add_filter('wp_page_menu_args', 'twentyten_page_menu_args');