mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
wpdb::has_cap() from mdawaffe. fixes #7609
git-svn-id: https://develop.svn.wordpress.org/trunk@8740 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1046,7 +1046,7 @@ class WP_Query {
|
||||
}
|
||||
|
||||
if ( !empty($q['category__not_in']) ) {
|
||||
if ( $wpdb->supports_subqueries() ) {
|
||||
if ( $wpdb->has_cap( 'subqueries' ) ) {
|
||||
$cat_string = "'" . implode("', '", $q['category__not_in']) . "'";
|
||||
$whichcat .= " AND $wpdb->posts.ID NOT IN (SELECT $wpdb->term_relationships.object_id FROM $wpdb->term_relationships WHERE $wpdb->term_relationships.term_taxonomy_id IN ($cat_string) )";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user