3 * WordPress Export Administration Panel
6 * @subpackage Administration
9 /** Load WordPress Bootstrap */
10 require_once ('admin.php');
12 if ( !current_user_can('edit_files') )
13 wp_die(__('You do not have sufficient permissions to export the content of this blog.'));
15 /** Load WordPress export API */
16 require_once('includes/export.php');
17 $title = __('Export');
19 if ( isset( $_GET['download'] ) ) {
20 $author = isset($_GET['author']) ? $_GET['author'] : 'all';
25 require_once ('admin-header.php');
29 <?php screen_icon(); ?>
30 <h2><?php echo esc_html( $title ); ?></h2>
32 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
33 <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>
34 <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>
35 <form action="" method="get">
36 <h3><?php _e('Options'); ?></h3>
38 <table class="form-table">
40 <th><label for="author"><?php _e('Restrict Author'); ?></label></th>
42 <select name="author" id="author">
43 <option value="all" selected="selected"><?php _e('All Authors'); ?></option>
45 $authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
46 foreach ( $authors as $id ) {
47 $o = get_userdata( $id );
48 echo "<option value='" . esc_attr($o->ID) . "'>$o->display_name</option>";
55 <p class="submit"><input type="submit" name="submit" class="button" value="<?php esc_attr_e('Download Export File'); ?>" />
56 <input type="hidden" name="download" value="true" />
64 include ('admin-footer.php');