From 68bbc0e43d3a38098972ec0d857877cba4e2b3ab Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 6 Mar 2015 08:05:25 +0000 Subject: [PATCH] Correct the `$number` argument description in `get_terms()` to reflect that an empty string or 0 will return all possible results, not -1. Previously, it was noted that -1 would return all possible results. However, as the value of `$number` is passed through `absint()`, -1 would actually be converted to 1, thereby producing unexpected results. Props iandunn. Fixes #31526. Built from https://develop.svn.wordpress.org/trunk@31638 git-svn-id: http://core.svn.wordpress.org/trunk@31619 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 4b1c1f1400..b0643a59fb 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1591,8 +1591,9 @@ function get_term_to_edit( $id, $taxonomy ) { * @type array|string $exclude_tree Array or comma/space-separated string of term ids to exclude * along with all of their descendant terms. If $include is * non-empty, $exclude_tree is ignored. Default empty array. - * @type int $number Maximum number of terms to return. Accepts 1+ or -1 (all). - * Default -1. + * @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any + * positive number. Default ''|0 (all). + * Default ''|0 (all). * @type int $offset The number by which to offset the terms query. Default empty. * @type string $fields Term fields to query for. Accepts 'all' (returns an array of * term objects), 'ids' or 'names' (returns an array of integers diff --git a/wp-includes/version.php b/wp-includes/version.php index 15bf170bf3..202660bcb7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31637'; +$wp_version = '4.2-alpha-31638'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.