public function pluck($field, $index_key = null)
    {
        $list = new WP_List_Util($this->all());

        return new static($list->pluck($field, $index_key));
    }
public function pluck($field, $index_key = null)
    {
        $list = new WP_List_Util($this->all());

        return new static($list->pluck($field, $index_key));
    }
public function pluck ( $ field , $ index_key = null ) { $ list = new WP_List_Util ( $ this -> all ( ) ) ; return new static ( $ list -> pluck ( $ field , $ index_key ) ) ; }
Creates a new collection with specific values from the current collection items.

@since 1.0.0

@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 Collection If `$index_key` is set, an array of found values with keys
corresponding to `$index_key`. If $index_key is null, array keys will be preserved.
Creates a new collection with specific values from the current collection items .