Changeset 6149 for trunk/wp-admin/export.php
- Timestamp:
- 09/21/2007 06:34:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/export.php
r6130 r6149 140 140 141 141 echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>'; 142 } 143 144 function wxr_post_taxonomy() { 145 $categories = get_the_category(); 146 $tags = get_the_tags(); 147 $cat_names = array(); 148 $tag_names = array(); 149 $the_list = ''; 150 $filter = 'rss'; 151 152 if ( !empty($categories) ) foreach ( (array) $categories as $category ) { 153 $cat_name = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); 154 $the_list .= "\n\t\t<category><![CDATA[$cat_name]]></category>\n"; 155 } 156 157 if ( !empty($tags) ) foreach ( (array) $tags as $tag ) { 158 $tag_name = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter); 159 $the_list .= "\n\t\t<category domain=\"tag\"><![CDATA[$tag_name]]></category>\n"; 160 } 161 162 echo $the_list; 142 163 } 143 164 … … 202 223 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate> 203 224 <dc:creator><?php the_author() ?></dc:creator> 204 <?php the_category_rss() ?>225 <?php wxr_post_taxonomy() ?> 205 226 206 227 <guid isPermaLink="false"><?php the_guid(); ?></guid>
Note: See TracChangeset
for help on using the changeset viewer.