Eliminate extra query.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16411f9c7b
commit
befa8f0f11
|
@ -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…
Reference in New Issue