get_bookmarks


get_bookmarks ( $args = '' )

Parameters:
  • (string|array) args { Optional. String or array of arguments to retrieve bookmarks. @type string $orderby How to order the links by. Accepts 'id', 'link_id', 'name', 'link_name', 'url', 'link_url', 'visible', 'link_visible', 'rating', 'link_rating', 'owner', 'link_owner', 'updated', 'link_updated', 'notes', 'link_notes', 'description', 'link_description', 'length' and 'rand'. When `$orderby` is 'length', orders by the character length of 'link_name'. Default 'name'. @type string $order Whether to order bookmarks in ascending or descending order. Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'. @type int $limit Amount of bookmarks to display. Accepts any positive number or -1 for all. Default -1. @type string $category Comma-separated list of category IDs to include links from. Default empty. @type string $category_name Category to retrieve links for by name. Default empty. @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts 1|true or 0|false. Default 1|true. @type int|bool $show_updated Whether to display the time the bookmark was last updated. Accepts 1|true or 0|false. Default 0|false. @type string $include Comma-separated list of bookmark IDs to include. Default empty. @type string $exclude Comma-separated list of bookmark IDs to exclude. Default empty. @type string $search Search terms. Will be SQL-formatted with wildcards before and after and searched in 'link_url', 'link_name' and 'link_description'. Default empty. }
Returns:
  • (object[]) List of bookmark row objects.
Defined at:

Description

Retrieves the list of bookmarksAttempts to retrieve from the cache first based on MD5 hash of arguments. If that fails, then the query will be built from the arguments and executed. The results will be stored to the cache.

Related Functions

get_bookmark, get_bookmark_field, wp_list_bookmarks, edit_bookmark_link, _walk_bookmarks

Top Google Results

User discussions

wpseek mobile