mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
link_before and link_after from thee17. fixes #5652
git-svn-id: https://develop.svn.wordpress.org/trunk@9202 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -32,6 +32,10 @@
|
||||
* bookmarks.
|
||||
* 'after' - Default is '</li>' (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 <a> tag.
|
||||
* 'link_after' - Default is '' (string). The html or text to append to each
|
||||
* bookmarks inside the <a> 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' => '<li>', 'after' => '</li>', '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 .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
|
||||
|
||||
$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 .= '</a>';
|
||||
|
||||
if ( $show_updated && $bookmark->recently_updated )
|
||||
|
||||
Reference in New Issue
Block a user