From 6505278ea73aa68db554293ab163a9f00d421f22 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 13 Feb 2015 16:52:27 +0000 Subject: [PATCH] Improve documentation for return value of `wp_list_pluck()`. `wp_list_pluck()` will preserve the original array keys if no `$index_key` parameter is provided. This changeset updates the documentation accordingly. Props adamsilverstein. Fixes #31316. Built from https://develop.svn.wordpress.org/trunk@31451 git-svn-id: http://core.svn.wordpress.org/trunk@31432 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b5327ed788..0050d10b7c 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3172,8 +3172,9 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) { * @param int|string $field Field from the object to place instead of the entire object * @param int|string $index_key Optional. Field from the object to use as keys for the new array. * Default null. - * @return array Array of found values. If $index_key is set, an array of found values with keys - * corresponding to $index_key. + * @return array Array of found values. If `$index_key` is set, an array of found values with keys + * corresponding to `$index_key`. If `$index_key` is null, array keys from the original + * `$list` will be preserved in the results. */ function wp_list_pluck( $list, $field, $index_key = null ) { if ( ! $index_key ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index d48b34f2c0..4b55c00b9a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31450'; +$wp_version = '4.2-alpha-31451'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.