mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 00:52:55 +01:00
Eliminate extra query.
git-svn-id: https://develop.svn.wordpress.org/trunk@6245 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
27bc4a130f
commit
cf584c357f
@ -998,14 +998,7 @@ class WP_Query {
|
||||
}
|
||||
} else {
|
||||
$q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db');
|
||||
$reqtag = is_term( $q['tag'], 'post_tag' );
|
||||
if ( !empty($reqtag) )
|
||||
$reqtag = $reqtag['term_id'];
|
||||
else
|
||||
$reqtag = 0;
|
||||
|
||||
$q['tag_id'] = $reqtag;
|
||||
$q['tag__in'][] = $reqtag;
|
||||
$q['tag_slug__in'][] = $q['tag'];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user