diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php
index 5262bd1df..f4a186b64 100644
--- a/wp-includes/bookmark-template.php
+++ b/wp-includes/bookmark-template.php
@@ -32,6 +32,10 @@
* bookmarks.
* 'after' - Default is '' (string). The html or text to append to each
* bookmarks.
+ * 'link_before' - Default is '' (string). The html or text to prepend to each
+ * bookmarks inside the tag.
+ * 'link_after' - Default is '' (string). The html or text to append to each
+ * bookmarks inside the tag.
* 'between' - Default is '\n' (string). The string for use in between the link,
* description, and image.
* 'show_rating' - Default is 0 (integer). Whether to show the link rating.
@@ -49,7 +53,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
'show_updated' => 0, 'show_description' => 0,
'show_images' => 1, 'show_name' => 1,
'before' => '
Pages:' (string). The html or text to prepend to each + * bookmarks. + * 'after' - Default is '
' (string). The html or text to append to each + * bookmarks. + * 'more_file' - Default is '' (string) Page the links should point to. Defaults to + * the current page. + * 'link_before' - Default is '' (string). The html or text to prepend to each + * Pages link inside the tag. + * 'link_after' - Default is '' (string). The html or text to append to each + * Pages link inside the tag. * * @since 1.2.0 + * @access private * - * @param unknown_type $args - * @return unknown + * @param array $bookmarks List of bookmarks to traverse + * @param string|array $args Optional. Overwrite the defaults. + * @return string Formatted output in HTML */ function wp_link_pages($args = '') { $defaults = array( 'before' => '' . __('Pages:'), 'after' => '
', + 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 'more_file' => '', 'echo' => 1 @@ -419,8 +452,11 @@ function wp_link_pages($args = '') { else $output .= ''; } + } + $output .= $link_before; $output .= $j; + $output .= $link_after; if ( ($i != $page) || ((!$more) && ($page==1)) ) $output .= ''; } @@ -431,23 +467,23 @@ function wp_link_pages($args = '') { $i = $page - 1; if ( $i && $more ) { if ( 1 == $i ) { - $output .= '' . $previouspagelink . ''; + $output .= '' . $link_before. $previouspagelink . $link_after . ''; } else { if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) - $output .= '' . $previouspagelink . ''; + $output .= '' . $link_before. $previouspagelink . $link_after . ''; else - $output .= '' . $previouspagelink . ''; + $output .= '' . $link_before. $previouspagelink . $link_after . ''; } } $i = $page + 1; if ( $i <= $numpages && $more ) { if ( 1 == $i ) { - $output .= '' . $nextpagelink . ''; + $output .= '' . $link_before. $nextpagelink . $link_after . ''; } else { if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) - $output .= '' . $nextpagelink . ''; + $output .= '' . $link_before. $nextpagelink . $link_after . ''; else - $output .= '' . $nextpagelink . ''; + $output .= '' . $link_before. $nextpagelink . $link_after . ''; } } $output .= $after;