Docs: Improve documentation for get_bookmarks().

Props pbiron.
Fixes #48053.

git-svn-id: https://develop.svn.wordpress.org/trunk@46152 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-09-16 19:54:15 +00:00
parent 444834f5a0
commit 9218e2cc50

View File

@ -106,11 +106,16 @@ function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
* @param string|array $args {
* Optional. String or array of arguments to retrieve bookmarks.
*
* @type string $orderby How to order the links by. Accepts post fields. Default 'name'.
* @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 1+ or -1 for all.
* Default -1.
* @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.
@ -120,6 +125,9 @@ function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
* 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.
* }
* @return array List of bookmark row objects.
*/