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:
ryan
2006-02-28 08:00:39 +00:00
parent 740d8f1c1f
commit 6eadde74ac
3 changed files with 52 additions and 62 deletions

View File

@@ -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) {