Update WP and plugins

This commit is contained in:
Oliver Davies 2019-04-16 20:56:22 +01:00
parent 10a4713229
commit 1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions

View file

@ -97,7 +97,7 @@ class WP_List_Util {
return array();
}
$count = count( $args );
$count = count( $args );
$filtered = array();
foreach ( $this->output as $key => $obj ) {
@ -115,7 +115,7 @@ class WP_List_Util {
( 'OR' == $operator && $matched > 0 ) ||
( 'NOT' == $operator && 0 == $matched )
) {
$filtered[$key] = $obj;
$filtered[ $key ] = $obj;
}
}
@ -140,6 +140,8 @@ class WP_List_Util {
* `$list` will be preserved in the results.
*/
public function pluck( $field, $index_key = null ) {
$newlist = array();
if ( ! $index_key ) {
/*
* This is simple. Could at some point wrap array_column()
@ -147,11 +149,14 @@ class WP_List_Util {
*/
foreach ( $this->output as $key => $value ) {
if ( is_object( $value ) ) {
$this->output[ $key ] = $value->$field;
$newlist[ $key ] = $value->$field;
} else {
$this->output[ $key ] = $value[ $field ];
$newlist[ $key ] = $value[ $field ];
}
}
$this->output = $newlist;
return $this->output;
}
@ -159,7 +164,6 @@ class WP_List_Util {
* When index_key is not set for a particular item, push the value
* to the end of the stack. This is how array_column() behaves.
*/
$newlist = array();
foreach ( $this->output as $value ) {
if ( is_object( $value ) ) {
if ( isset( $value->$index_key ) ) {