From d8c335930fe8549a7d2ad8294ae646139a321f34 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 25 Apr 2011 19:25:45 +0000 Subject: [PATCH] Export commentmeta. Props duck_. see #12871 git-svn-id: https://develop.svn.wordpress.org/trunk@17700 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/export.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 2efd0405af..9638805885 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -384,14 +384,14 @@ function export_wp( $args = array() ) { get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); - if ( $postmeta ) : foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) : ?> + foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) : ?> meta_key; ?> meta_value ); ?> - + get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); - if ( $comments ) : foreach ( $comments as $c ) : ?> + foreach ( $comments as $c ) : ?> comment_ID; ?> comment_author ); ?> @@ -405,8 +405,15 @@ function export_wp( $args = array() ) { comment_type; ?> comment_parent; ?> user_id; ?> +get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) ); + foreach ( $c_meta as $meta ) : ?> + + meta_key; ?> + meta_value ); ?> + + - +