Coding Standards: Remove redundant type casting to array in WP_Query::get_posts().

This brings some consistency with other instances of using `get_post_stati()` in core.

`get_post_stati()` always returns an array, so the type casting is not needed.

Follow-up to [13172].

See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51285 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-06-30 17:43:29 +00:00
parent 7041541417
commit f6f73c48ee
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1872,7 +1872,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
*/
$private_states = get_post_stati( array( 'private' => true ) );
$where .= " AND ( p.post_status = 'publish'";
foreach ( (array) $private_states as $state ) {
foreach ( $private_states as $state ) {
if ( current_user_can( $read_private_cap ) ) {
$where .= $wpdb->prepare( ' OR p.post_status = %s', $state );
} else {