Community Events Dashboard: Use wp_list_pluck rather than array_columns
array_columns is only available in PHP 5.5+ Introduced in [42726] See: #41112. git-svn-id: https://develop.svn.wordpress.org/trunk@42728 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
827b9056c9
commit
9377c9a873
@ -454,7 +454,7 @@ class WP_Community_Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$response_body['events'] = array_slice( $response_body['events'], 0, 3 );
|
$response_body['events'] = array_slice( $response_body['events'], 0, 3 );
|
||||||
$trimmed_event_types = array_column( $response_body['events'], 'type' );
|
$trimmed_event_types = wp_list_pluck( $response_body['events'], 'type' );
|
||||||
|
|
||||||
// Make sure the soonest upcoming WordCamps is pinned in the list.
|
// Make sure the soonest upcoming WordCamps is pinned in the list.
|
||||||
if ( ! in_array( 'wordcamp', $trimmed_event_types ) && $wordcamps ) {
|
if ( ! in_array( 'wordcamp', $trimmed_event_types ) && $wordcamps ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user