From a1a5df805c92954a453666fc93eefb3cffc6b1ca Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 16 Sep 2019 19:55:56 +0000 Subject: [PATCH] Docs: Improve documentation for `get_bookmarks()`. Props pbiron. Fixes #48053. Built from https://develop.svn.wordpress.org/trunk@46152 git-svn-id: http://core.svn.wordpress.org/trunk@45964 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark.php | 14 +++++++++++--- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index fd2c926591..595768f6cd 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -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. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 7ef1c609e5..f31810bd76 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46151'; +$wp_version = '5.3-alpha-46152'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.