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 ); ?> + + - +