Eliminate extra query.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-10-13 18:53:28 +00:00
parent 16411f9c7b
commit befa8f0f11
1 changed files with 1 additions and 8 deletions

View File

@ -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'];
}
}