Ticket #4904: wp-app-cat.patch
File wp-app-cat.patch, 1.4 KB (added by , 17 years ago) |
---|
-
wp-app.php
195 195 $categories = ""; 196 196 $cats = get_categories("hierarchical=0&hide_empty=0"); 197 197 foreach ((array) $cats as $cat) { 198 $categories .= " <category term=\"" . attribute_escape($cat-> cat_name) . "\" />\n";198 $categories .= " <category term=\"" . attribute_escape($cat->name) . "\" />\n"; 199 199 } 200 200 $output = <<<EOD 201 201 <app:categories xmlns:app="$this->ATOMPUB_NS" … … 232 232 $post_category = array(); 233 233 234 234 foreach($wp_cats as $cat) { 235 if(in_array($cat-> cat_name, $catnames))236 array_push($post_category, $cat-> cat_ID);235 if(in_array($cat->name, $catnames)) 236 array_push($post_category, $cat->term_id); 237 237 } 238 238 239 239 $publish = (isset($entry->draft) && trim($entry->draft) == 'yes') ? false : true; … … 810 810 <?php } ?> 811 811 <link rel="edit" href="<?php $this->the_entry_url() ?>" /> 812 812 <?php foreach(get_the_category() as $category) { ?> 813 <category scheme="<?php bloginfo_rss('home') ?>" term="<?php echo $category-> cat_name?>" />813 <category scheme="<?php bloginfo_rss('home') ?>" term="<?php echo $category->name?>" /> 814 814 <?php } ?> 815 815 <?php list($content_type, $content) = $this->prep_content(get_the_excerpt()); ?> 816 816 <summary type="<?php echo $content_type ?>"><?php echo $content ?></summary>