From 27c7018cdcb6ffc60aaaf1994538df68d32c4887 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sat, 18 Nov 2006 23:13:15 +0000 Subject: [PATCH] Add IDs to export, and let it filter by authors. git-svn-id: https://develop.svn.wordpress.org/trunk@4485 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/export.php | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/wp-admin/export.php b/wp-admin/export.php index 1a35e51fc1..5c86b68236 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; ?>