X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/67f24b02807a1ff7e9d1a97453ed84c404c0af0f..refs/tags/wordpress-2.9:/wp-admin/includes/export.php
diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php
index 641e1738..921a2377 100644
--- a/wp-admin/includes/export.php
+++ b/wp-admin/includes/export.php
@@ -24,7 +24,7 @@ define('WXR_VERSION', '1.0');
* @param unknown_type $author
*/
function export_wp($author='') {
-global $wpdb, $post_ids, $post;
+global $wpdb, $post_ids, $post, $wp_taxonomies;
do_action('export_wp');
@@ -46,6 +46,13 @@ $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_dat
$categories = (array) get_categories('get=all');
$tags = (array) get_tags('get=all');
+$custom_taxonomies = $wp_taxonomies;
+unset($custom_taxonomies['category']);
+unset($custom_taxonomies['post_tag']);
+unset($custom_taxonomies['link_category']);
+$custom_taxonomies = array_keys($custom_taxonomies);
+$terms = (array) get_terms($custom_taxonomies, 'get=all');
+
/**
* {@internal Missing Short Description}}
*
@@ -182,6 +189,34 @@ function wxr_tag_description($t) {
echo '' . wxr_cdata($t->description) . '';
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param object $t Term Object
+ */
+function wxr_term_name($t) {
+ if ( empty($t->name) )
+ return;
+
+ echo '' . wxr_cdata($t->name) . '';
+}
+
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param object $t Term Object
+ */
+function wxr_term_description($t) {
+ if ( empty($t->description) )
+ return;
+
+ echo '' . wxr_cdata($t->description) . '';
+}
+
/**
* {@internal Missing Short Description}}
*
@@ -221,7 +256,7 @@ echo '\n";
-
+
@@ -255,6 +290,9 @@ echo '\n";
slug; ?>
+
+
+ taxonomy; ?>slug; ?>parent ? $custom_taxonomies[$t->parent]->name : ''; ?>
\n";
// Don't export revisions. They bloat the export.
if ( 'revision' == $post->post_type )
continue;
- setup_postdata($post); ?>
+ setup_postdata($post);
+
+ $is_sticky = 0;
+ if ( is_sticky( $post->ID ) )
+ $is_sticky = 1;
+
+?>
-
post_title); ?>
@@ -291,6 +335,7 @@ echo '\n";
menu_order; ?>
post_type; ?>
post_password; ?>
+
post_type == 'attachment') { ?>
ID); ?>
@@ -313,7 +358,7 @@ if ( $comments ) { foreach ( $comments as $c ) { ?>
comment_ID; ?>
comment_author); ?>
comment_author_email; ?>
-comment_author_url; ?>
+comment_author_url ); ?>
comment_author_IP; ?>
comment_date; ?>
comment_date_gmt; ?>