Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (43 sloc) 1.39 KB
require_once ('admin.php');
$title = __('Export');
$parent_file = 'edit.php';
if ( isset( $_GET['download'] ) ) {
export_wp( $_GET['author'] );
require_once ('admin-header.php');
<div class="wrap">
<h2><?php _e('Export'); ?></h2>
<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p>
<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>
<form action="" method="get">
<h3><?php _e('Options'); ?></h3>
<table class="form-table">
<th><?php _e('Restrict Author'); ?></th>
<select name="author">
<option value="all" selected="selected"><?php _e('All Authors'); ?></option>
$authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
foreach ( $authors as $id ) {
$o = get_userdata( $id );
echo "<option value='$o->ID'>$o->display_name</option>";
<p class="submit"><input type="submit" name="submit" value="<?php _e('Download Export File'); ?>" />
<input type="hidden" name="download" value="true" />
include ('admin-footer.php');
Jump to Line
Something went wrong with that request. Please try again.