Make WordPress Core

Ticket #8041: 8041.diff

File 8041.diff, 2.1 KB (added by thee17, 17 years ago)
  • classes.php

     
    11681168                        $css_class .= ' current_page_parent';
    11691169                }
    11701170
    1171                 $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '</a>';
     1171                $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>';
    11721172
    11731173                if ( !empty($show_date) ) {
    11741174                        if ( 'modified' == $show_date )
  • post-template.php

     
    595595                'date_format' => get_option('date_format'),
    596596                'child_of' => 0, 'exclude' => '',
    597597                'title_li' => __('Pages'), 'echo' => 1,
    598                 'authors' => '', 'sort_column' => 'menu_order, post_title'
     598                'authors' => '', 'sort_column' => 'menu_order, post_title',
     599                'link_before' => '', 'link_after' => ''
    599600        );
    600601
    601602        $r = wp_parse_args( $args, $defaults );
     
    643644 * @param array|string $args
    644645 */
    645646function wp_page_menu( $args = array() ) {
    646         $defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true);
     647        $defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
    647648        $args = wp_parse_args( $args, $defaults );
    648649        $args = apply_filters( 'wp_page_menu_args', $args );
    649650
     
    658659                $class = '';
    659660                if ( is_home() && !is_paged() )
    660661                        $class = 'class="current_page_item"';
    661                 $menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $text . '</a></li>';
     662                $menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $link_before . $text . $link_after . '</a></li>';
    662663        }
    663664
    664665        $list_args = $args;