Changeset 12109 for trunk/wp-admin/includes/export.php
- Timestamp:
- 10/26/2009 01:57:55 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/export.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/export.php
r12100 r12109 25 25 */ 26 26 function export_wp($author='') { 27 global $wpdb, $post_ids, $post ;27 global $wpdb, $post_ids, $post, $wp_taxonomies; 28 28 29 29 do_action('export_wp'); … … 46 46 $categories = (array) get_categories('get=all'); 47 47 $tags = (array) get_tags('get=all'); 48 49 $custom_taxonomies = $wp_taxonomies; 50 unset($custom_taxonomies['category']); 51 unset($custom_taxonomies['post_tag']); 52 unset($custom_taxonomies['link_category']); 53 $custom_taxonomies = array_keys($custom_taxonomies); 54 $terms = (array) get_terms($custom_taxonomies, 'get=all'); 48 55 49 56 /** … … 181 188 182 189 echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>'; 190 } 191 192 /** 193 * {@internal Missing Short Description}} 194 * 195 * @since unknown 196 * 197 * @param object $t Term Object 198 */ 199 function wxr_term_name($t) { 200 if ( empty($t->name) ) 201 return; 202 203 echo '<wp:term_name>' . wxr_cdata($t->name) . '</wp:term_name>'; 204 } 205 206 /** 207 * {@internal Missing Short Description}} 208 * 209 * @since unknown 210 * 211 * @param object $t Term Object 212 */ 213 function wxr_term_description($t) { 214 if ( empty($t->description) ) 215 return; 216 217 echo '<wp:term_description>' . wxr_cdata($t->description) . '</wp:term_description>'; 183 218 } 184 219 … … 256 291 <?php if ( $tags ) : foreach ( $tags as $t ) : ?> 257 292 <wp:tag><wp:tag_slug><?php echo $t->slug; ?></wp:tag_slug><?php wxr_tag_name($t); ?><?php wxr_tag_description($t); ?></wp:tag> 293 <?php endforeach; endif; ?> 294 <?php if ( $terms ) : foreach ( $terms as $t ) : ?> 295 <wp:term><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $custom_taxonomies[$t->parent]->name : ''; ?></wp:term_parent><?php wxr_term_name($t); ?><?php wxr_term_description($t); ?></wp:term> 258 296 <?php endforeach; endif; ?> 259 297 <?php do_action('rss2_head'); ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)