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

git-svn-id: https://develop.svn.wordpress.org/trunk@9484 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-11-03 06:07:39 +00:00
parent 6b2d5e1cee
commit 81a0168123
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -595,7 +595,8 @@ function wp_list_pages($args = '') {
'date_format' => get_option('date_format'),
'child_of' => 0, 'exclude' => '',
'title_li' => __('Pages'), 'echo' => 1,
'authors' => '', 'sort_column' => 'menu_order, post_title'
'authors' => '', 'sort_column' => 'menu_order, post_title',
'link_before' => '', 'link_after' => ''
);
$r = wp_parse_args( $args, $defaults );
@@ -643,7 +644,7 @@ function wp_list_pages($args = '') {
* @param array|string $args
*/
function wp_page_menu( $args = array() ) {
$defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true);
$defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
$args = wp_parse_args( $args, $defaults );
$args = apply_filters( 'wp_page_menu_args', $args );
@@ -658,7 +659,7 @@ function wp_page_menu( $args = array() ) {
$class = '';
if ( is_home() && !is_paged() )
$class = 'class="current_page_item"';
$menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $text . '</a></li>';
$menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $link_before . $text . $link_after . '</a></li>';
}
$list_args = $args;