3 * WordPress Export Administration Panel
6 * @subpackage Administration
9 /** Load WordPress Bootstrap */
10 require_once ('admin.php');
12 /** Load WordPress export API */
13 require_once('includes/export.php');
14 $title = __('Export');
16 if ( isset( $_GET['download'] ) ) {
17 $author = isset($_GET['author']) ? $_GET['author'] : 'all';
22 require_once ('admin-header.php');
26 <?php screen_icon(); ?>
27 <h2><?php echo esc_html( $title ); ?></h2>
29 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
30 <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>
31 <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>
32 <form action="" method="get">
33 <h3><?php _e('Options'); ?></h3>
35 <table class="form-table">
37 <th><label for="author"><?php _e('Restrict Author'); ?></label></th>
39 <select name="author" id="author">
40 <option value="all" selected="selected"><?php _e('All Authors'); ?></option>
42 $authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
43 foreach ( $authors as $id ) {
44 $o = get_userdata( $id );
45 echo "<option value='" . esc_attr($o->ID) . "'>$o->display_name</option>";
52 <p class="submit"><input type="submit" name="submit" class="button" value="<?php esc_attr_e('Download Export File'); ?>" />
53 <input type="hidden" name="download" value="true" />
61 include ('admin-footer.php');