diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 5262bd1dfe..f4a186b64a 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' => '
  • ', 'after' => '
  • ', 'between' => "\n", - 'show_rating' => 0 + 'show_rating' => 0, 'link_before' => '', 'link_after' => '' ); $r = wp_parse_args( $args, $defaults ); @@ -93,6 +97,8 @@ function _walk_bookmarks($bookmarks, $args = '' ) { $target = ' target="' . $target . '"'; $output .= '
    '; + + $output .= $link_before; if ( $bookmark->link_image != null && $show_images ) { if ( strpos($bookmark->link_image, 'http') !== false ) @@ -103,6 +109,8 @@ function _walk_bookmarks($bookmarks, $args = '' ) { if ($show_name) $output .= $name; + $output .= $link_after; + $output .= ''; if ( $show_updated && $bookmark->recently_updated ) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 2324a16975..06dd7b47ab 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -377,18 +377,51 @@ function sticky_class( $post_id = null ) { } /** - * {@internal Missing Short Description}} + * Page Template Functions for usage in Themes * - * {@internal Missing Long Description}} + * @package WordPress + * @subpackage Template + */ + +/** + * The formatted output of a list of Pages. + * + * Displays page-links for paginated posts (i.e. includes the Quicktag one or + * more times). This works in much the same way as link_pages(), the difference being that + * arguments are given in query string format. This tag must be within The_Loop. + * + * The defaults for overwriting are: + * 'next_or_number' - Default is 'number' (string). Indicates whether page numbers should be + * used. Valid values are number and next. + * 'nextpagelink' - Default is 'Next Page' (string). Text for link to next page. + * of the bookmark. + * 'previouspagelink' - Default is 'Previous Page' (string). Text for link to previous page. + * available. + * 'pagelink' - Default is '%' (String).Format string for page numbers. The % in the + * parameter string will be replaced with the page number, so Page % generates + * "Page 1", "Page 2", etc. Defaults to %, just the page number. + * 'before' - Default is '

    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;