Simplify sanitize_key() and use it in more places. see #14910

git-svn-id: https://develop.svn.wordpress.org/trunk@15635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-09-20 15:28:58 +00:00
parent a6d9954621
commit df6d5550db
3 changed files with 4 additions and 8 deletions

View File

@@ -1456,9 +1456,9 @@ class WP_Query {
if ( !empty($qv['post_type']) ) {
if ( is_array($qv['post_type']) )
$qv['post_type'] = array_map('sanitize_user', $qv['post_type'], array(true));
$qv['post_type'] = array_map('sanitize_key', $qv['post_type']);
else
$qv['post_type'] = sanitize_user($qv['post_type'], true);
$qv['post_type'] = sanitize_key($qv['post_type']);
}
if ( !empty($qv['post_status']) )