mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
Remove double-query for Author ID. Props simonwheatley. Fixes #12048
git-svn-id: https://develop.svn.wordpress.org/trunk@14160 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c79e18467b
commit
6f89c1a63a
@ -2080,7 +2080,6 @@ class WP_Query {
|
||||
}
|
||||
}
|
||||
$q['author_name'] = sanitize_title($q['author_name']);
|
||||
$q['author'] = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_nicename='".$q['author_name']."'");
|
||||
$q['author'] = get_user_by('slug', $q['author_name']);
|
||||
if ( $q['author'] )
|
||||
$q['author'] = $q['author']->ID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user