mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-09 00:51:35 +01:00
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 {
|
} else {
|
||||||
$q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db');
|
$q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db');
|
||||||
$reqtag = is_term( $q['tag'], 'post_tag' );
|
$q['tag_slug__in'][] = $q['tag'];
|
||||||
if ( !empty($reqtag) )
|
|
||||||
$reqtag = $reqtag['term_id'];
|
|
||||||
else
|
|
||||||
$reqtag = 0;
|
|
||||||
|
|
||||||
$q['tag_id'] = $reqtag;
|
|
||||||
$q['tag__in'][] = $reqtag;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user