Make WordPress Core

Changeset 9484


Ignore:
Timestamp:
11/03/2008 06:07:39 AM (17 years ago)
Author:
ryan
Message:

link_before and link_after for wp_list_pages(). Props thee17. fixes #8041

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r9299 r9484  
    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) ) {
  • trunk/wp-includes/post-template.php

    r9273 r9484  
    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
     
    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 );
     
    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
Note: See TracChangeset for help on using the changeset viewer.