2 require_once ('admin.php');
3 require_once('includes/export.php');
5 $parent_file = 'edit.php';
7 if ( isset( $_GET['download'] ) ) {
8 export_wp( $_GET['author'] );
12 require_once ('admin-header.php');
16 <h2><?php _e('Export'); ?></h2>
17 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
18 <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>
19 <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>
20 <form action="" method="get">
21 <h3><?php _e('Options'); ?></h3>
23 <table class="form-table">
25 <th><?php _e('Restrict Author'); ?></th>
27 <select name="author">
28 <option value="all" selected="selected"><?php _e('All Authors'); ?></option>
30 $authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
31 foreach ( $authors as $id ) {
32 $o = get_userdata( $id );
33 echo "<option value='$o->ID'>$o->display_name</option>";
40 <p class="submit"><input type="submit" name="submit" value="<?php _e('Download Export File'); ?>" />
41 <input type="hidden" name="download" value="true" />
49 include ('admin-footer.php');