Changeset 6076
- Timestamp:
- 09/11/07 18:35:21 (1 year ago)
- Files:
-
- trunk/wp-admin/export.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/export.php
r5910 r6076 66 66 67 67 $categories = (array) get_categories('get=all'); 68 $tags = (array) get_tags('get=all'); 68 69 69 70 function wxr_missing_parents($categories) { … … 125 126 126 127 echo '<wp:category_description>' . wxr_cdata($c->description) . '</wp:category_description>'; 128 } 129 130 function wxr_tag_name($t) { 131 if ( empty($t->name) ) 132 return; 133 134 echo '<wp:tag_name>' . wxr_cdata($t->name) . '</wp:tag_name>'; 135 } 136 137 function wxr_tag_description($t) { 138 if ( empty($t->description) ) 139 return; 140 141 echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>'; 127 142 } 128 143 … … 168 183 <?php if ( $cats ) : foreach ( $cats as $c ) : ?> 169 184 <wp:category><wp:category_nicename><?php echo $c->slug; ?></wp:category_nicename><wp:category_parent><?php echo $c->parent ? $cats[$c->parent]->name : ''; ?></wp:category_parent><?php wxr_cat_name($c); ?><?php wxr_category_description($c); ?></wp:category> 185 <?php endforeach; endif; ?> 186 <?php if ( $tags ) : foreach ( $tags as $t ) : ?> 187 <wp:tag><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name($t); ?><?php wxr_tag_description($t); ?></wp:tag> 170 188 <?php endforeach; endif; ?> 171 189 <?php do_action('rss2_head'); ?>
