WordPress.org

Make WordPress Core

Ticket #22331: 22331.patch

File 22331.patch, 1.6 KB (added by SergeyBiryukov, 18 months ago)
  • wp-content/themes/twentyeleven/functions.php

     
    375375 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. 
    376376 */ 
    377377function twentyeleven_page_menu_args( $args ) { 
    378         $args['show_home'] = true; 
     378        if ( empty( $args['show_home'] ) ) 
     379                $args['show_home'] = true; 
    379380        return $args; 
    380381} 
    381382add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' ); 
  • wp-content/themes/twentyten/functions.php

     
    224224 * @since Twenty Ten 1.0 
    225225 */ 
    226226function twentyten_page_menu_args( $args ) { 
    227         $args['show_home'] = true; 
     227        if ( empty( $args['show_home'] ) ) 
     228                $args['show_home'] = true; 
    228229        return $args; 
    229230} 
    230231add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' ); 
  • wp-content/themes/twentytwelve/functions.php

     
    190190 * @since Twenty Twelve 1.0 
    191191 */ 
    192192function twentytwelve_page_menu_args( $args ) { 
    193         $args['show_home'] = true; 
     193        if ( empty( $args['show_home'] ) ) 
     194                $args['show_home'] = true; 
    194195        return $args; 
    195196} 
    196197add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );