mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user