diff --git a/wp-admin/export.php b/wp-admin/export.php index 1a35e51fc..5c86b6823 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -15,6 +15,25 @@ require_once ('admin-header.php');

+

+ + + + + + +
+ +

@@ -25,14 +44,22 @@ require_once ('admin-header.php'); get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC"); + +$where = ''; +if ( isset( $_GET['author'] ) && $_GET['author'] != 'all' ) { + $author_id = (int) $_GET['author']; + $where = " WHERE post_author = '$author_id' "; +} + +$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); ?> @@ -71,6 +98,7 @@ $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt A post_content ?>]]> +ID; ?> post_date; ?> post_date_gmt; ?> comment_status; ?> @@ -94,6 +122,7 @@ if ( $postmeta ) { $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID"); if ( $comments ) { foreach ( $comments as $c ) { ?> +comment_ID; ?> comment_author; ?> comment_author_email; ?> comment_author_url; ?>