Ticket #10968: post-template.php.diff
File post-template.php.diff, 1.5 KB (added by , 15 years ago) |
---|
-
wp-includes/post-template.php
804 804 * <li><strong>show_home</strong> - If you set this argument, then it will 805 805 * display the link to the home page. The show_home argument really just needs 806 806 * to be set to the value of the text of the link.</li> 807 * <li><strong>container_element</strong> - If you set this argument, it will 808 * replace the div-element containing the menu with the specified HTML element. 809 * Defaults to 'div'.</li> 807 810 * </ul> 808 811 * 809 812 * @since 2.7.0 … … 811 814 * @param array|string $args 812 815 */ 813 816 function wp_page_menu( $args = array() ) { 814 $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '' );817 $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '', 'container_element' => 'div'); 815 818 $args = wp_parse_args( $args, $defaults ); 816 819 $args = apply_filters( 'wp_page_menu_args', $args ); 817 820 … … 847 850 if ( $menu ) 848 851 $menu = '<ul>' . $menu . '</ul>'; 849 852 850 $menu = '< div class="' . esc_attr($args['menu_class']) . '">' . $menu . "</div>\n";853 $menu = '<'.$list_args['container_element'].' class="' . $args['menu_class'] . '">' . $menu . '</'.$list_args['container_element'].'>'."\n"; 851 854 $menu = apply_filters( 'wp_page_menu', $menu, $args ); 852 855 if ( $args['echo'] ) 853 856 echo $menu;