Optimiation from Denis
git-svn-id: https://develop.svn.wordpress.org/trunk@2550 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4ea0b88e54
commit
d7c18937a1
|
@ -1189,11 +1189,9 @@ function update_post_caches(&$posts) {
|
||||||
|
|
||||||
function update_category_cache() {
|
function update_category_cache() {
|
||||||
global $cache_categories, $wpdb;
|
global $cache_categories, $wpdb;
|
||||||
$dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories");
|
$dogs = $wpdb->get_results("SELECT *, cat_ID as category_id FROM $wpdb->categories");
|
||||||
foreach ($dogs as $catt) {
|
foreach ($dogs as $catt)
|
||||||
$catt->category_id = $catt->cat_ID; // Alias.
|
|
||||||
$cache_categories[$catt->cat_ID] = $catt;
|
$cache_categories[$catt->cat_ID] = $catt;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_user_cache() {
|
function update_user_cache() {
|
||||||
|
|
Loading…
Reference in New Issue