首页 WordPress函数大全 get_bookmarks()

get_bookmarks()

2020-05-01 / 6836阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_bookmarks( string|array $args = '' )

Retrieves the list of bookmarks

描述

Attempts to retrieve from the cache first based>

参数

$args

(string|array)
(Optional)
String or array of arguments to retrieve bookmarks.

  • 'orderby'
    (string) 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'.
  • 'order'
    (string) Whether to order bookmarks in ascending or descending order. Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'.
  • 'limit'
    (int) Amount of bookmarks to display. Accepts any positive number or -1 for all. Default -1.
  • 'category'
    (string) Comma-separated list of category ids to include links from.
  • 'category_name'
    (string) Category to retrieve links for by name.
  • 'hide_invisible'
    (int|bool) Whether to show or hide links marked as 'invisible'. Accepts 1|true or 0|false. Default 1|true.
  • 'show_updated'
    (int|bool) Whether to display the time the bookmark was last updated. Accepts 1|true or 0|false. Default 0|false.
  • 'include'
    (string) Comma-separated list of bookmark IDs to include.
  • 'exclude'
    (string) Comma-separated list of bookmark IDs to exclude.
  • 'search'
    (string) Search terms. Will be SQL-formatted with wildcards before and after and searched in 'link_url', 'link_name' and 'link_description'.

Default value: ''

返回

(object[]) List of bookmark row objects.

大家谈论
    我的见解