Add get_category_by_path(). Remove old fullpath stuff.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -181,16 +181,6 @@ class WP_Object_Cache {
|
||||
if ($dogs = $wpdb->get_results("SELECT * FROM $wpdb->categories")) {
|
||||
foreach ($dogs as $catt)
|
||||
$this->cache['category'][$catt->cat_ID] = $catt;
|
||||
|
||||
foreach ($this->cache['category'] as $catt) {
|
||||
$curcat = $catt->cat_ID;
|
||||
$fullpath = '/'.$this->cache['category'][$catt->cat_ID]->category_nicename;
|
||||
while ($this->cache['category'][$curcat]->category_parent != 0) {
|
||||
$curcat = $this->cache['category'][$curcat]->category_parent;
|
||||
$fullpath = '/'.$this->cache['category'][$curcat]->category_nicename.$fullpath;
|
||||
}
|
||||
$this->cache['category'][$catt->cat_ID]->fullpath = $fullpath;
|
||||
}
|
||||
}
|
||||
} else
|
||||
if ('options' == $group) {
|
||||
|
||||
Reference in New Issue
Block a user