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
This commit is contained in:
Boone Gorges 2015-02-13 16:52:27 +00:00
parent 7520057038
commit 6505278ea7
2 changed files with 4 additions and 3 deletions

View File

@ -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 ) {

View File

@ -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.