2006-10-25 18:55:05 -04:00
|
|
|
<?php
|
|
|
|
require_once ('admin.php');
|
2007-11-15 00:32:33 -05:00
|
|
|
require_once('includes/export.php');
|
2006-11-18 02:31:29 -05:00
|
|
|
$title = __('Export');
|
|
|
|
$parent_file = 'edit.php';
|
2006-10-25 18:55:05 -04:00
|
|
|
|
2008-02-05 01:47:27 -05:00
|
|
|
if ( isset( $_GET['download'] ) ) {
|
2007-11-15 00:32:33 -05:00
|
|
|
export_wp( $_GET['author'] );
|
|
|
|
die();
|
|
|
|
}
|
2006-10-25 18:55:05 -04:00
|
|
|
|
|
|
|
require_once ('admin-header.php');
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="wrap">
|
|
|
|
<h2><?php _e('Export'); ?></h2>
|
|
|
|
<div class="narrow">
|
2006-12-05 02:15:12 -05:00
|
|
|
<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
|
2006-10-25 18:55:05 -04:00
|
|
|
<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.'); ?></p>
|
2006-12-26 19:51:00 -05:00
|
|
|
<p><?php _e('Once you’ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>
|
2006-10-25 18:55:05 -04:00
|
|
|
<form action="" method="get">
|
2006-11-18 18:13:15 -05:00
|
|
|
<h3><?php _e('Optional options'); ?></h3>
|
|
|
|
|
2008-02-23 21:07:51 -05:00
|
|
|
<table class="niceblue">
|
2006-11-18 18:13:15 -05:00
|
|
|
<tr>
|
|
|
|
<th><?php _e('Restrict Author:'); ?></th>
|
|
|
|
<td>
|
|
|
|
<select name="author">
|
2008-02-13 19:57:29 -05:00
|
|
|
<option value="all" selected="selected"><?php _e('All Authors'); ?></option>
|
2006-11-18 18:13:15 -05:00
|
|
|
<?php
|
2007-08-21 14:27:45 -04:00
|
|
|
$authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
|
2006-11-18 18:13:15 -05:00
|
|
|
foreach ( $authors as $id ) {
|
|
|
|
$o = get_userdata( $id );
|
|
|
|
echo "<option value='$o->ID'>$o->display_name</option>";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2008-02-20 14:30:55 -05:00
|
|
|
<p class="submit"><input type="submit" name="submit" value="<?php _e('Download Export File'); ?>" />
|
2006-10-25 18:55:05 -04:00
|
|
|
<input type="hidden" name="download" value="true" />
|
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
include ('admin-footer.php');
|
2006-11-17 20:27:22 -05:00
|
|
|
?>
|