_walk_bookmarks

Private AccessPrivate Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

SummerySummery

The formatted output of a list of bookmarks.

Syntax

_walk_bookmarks( array $bookmarks, string|array $args = '' )

DescriptionDescription

The $bookmarks array must contain bookmark objects and will be iterated over to retrieve the bookmark to be used in the output.

The output is formatted as HTML with no way to change that format. However, what is between, before, and after can be changed. The link itself will be HTML.

This function is used internally by wp_list_bookmarks() and should not be used by themes.

ParametersParameters

$bookmarks

(array) (Required) List of bookmarks to traverse.

$args

(string|array) (Optional) Bookmarks arguments.

  • 'show_updated'
    (int|bool) Whether to show the time the bookmark was last updated. Accepts 1|true or 0|false. Default 0|false.
  • 'show_description'
    (int|bool) Whether to show the bookmark description. Accepts 1|true, Accepts 1|true or 0|false. Default 0|false.
  • 'show_images'
    (int|bool) Whether to show the link image if available. Accepts 1|true or 0|false. Default 1|true.
  • 'show_name'
    (int|bool) Whether to show link name if available. Accepts 1|true or 0|false. Default 0|false.
  • 'before'
    (string) The HTML or text to prepend to each bookmark. Default <li>.
  • 'after'
    (string) The HTML or text to append to each bookmark. Default </li>.
  • 'link_before'
    (string) The HTML or text to prepend to each bookmark inside the anchor tags.
  • 'link_after'
    (string) The HTML or text to append to each bookmark inside the anchor tags.
  • 'between'
    (string) The string for use in between the link, description, and image. Default "n".
  • 'show_rating'
    (int|bool) Whether to show the link rating. Accepts 1|true or 0|false. Default 0|false.

Default value: ''

ReturnReturn

(string) Formatted output in HTML

SourceSource

File: wp-includes/bookmark-template.php


			

ChangelogChangelog

Changelog
Version Description
2.1.0 Introduced.
Scroll to Top