Use array_intersect_assoc()
git-svn-id: https://develop.svn.wordpress.org/trunk@12047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d580bc1971
commit
2d890657ea
@ -451,7 +451,7 @@ function get_post_types( $args = array(), $output = 'names' ) {
|
||||
$post_types[] = $post_type->name;
|
||||
else
|
||||
$post_types[] = $post_type;
|
||||
} elseif ( array_intersect((array) $post_type, $args) ) {
|
||||
} elseif ( array_intersect_assoc((array) $post_type, $args) ) {
|
||||
if ( $do_names )
|
||||
$post_types[] = $post_type->name;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user