From 6f89c1a63a784f1e6e993ab7aa215621c3293949 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 19 Apr 2010 10:50:03 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 1 - 1 file changed, 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index d42ed30928..1590418c34 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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;