raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * WordPress Export Administration Panel
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 * @subpackage Administration
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 /** Load WordPress Bootstrap */
mp-wp_genesis 10 require_once ('admin.php');
mp-wp_genesis 11
mp-wp_genesis 12 /** Load WordPress export API */
mp-wp_genesis 13 require_once('includes/export.php');
mp-wp_genesis 14 $title = __('Export');
mp-wp_genesis 15
mp-wp_genesis 16 if ( isset( $_GET['download'] ) ) {
mp-wp_genesis 17 $author = isset($_GET['author']) ? $_GET['author'] : 'all';
mp-wp_genesis 18 export_wp( $author );
mp-wp_genesis 19 die();
mp-wp_genesis 20 }
mp-wp_genesis 21
mp-wp_genesis 22 require_once ('admin-header.php');
mp-wp_genesis 23 ?>
mp-wp_genesis 24
mp-wp_genesis 25 <div class="wrap">
mp-wp_genesis 26 <?php screen_icon(); ?>
mp-wp_genesis 27 <h2><?php echo wp_specialchars( $title ); ?></h2>
mp-wp_genesis 28
mp-wp_genesis 29 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
mp-wp_genesis 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>
mp-wp_genesis 31 <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>
mp-wp_genesis 32 <form action="" method="get">
mp-wp_genesis 33 <h3><?php _e('Options'); ?></h3>
mp-wp_genesis 34
mp-wp_genesis 35 <table class="form-table">
mp-wp_genesis 36 <tr>
mp-wp_genesis 37 <th><label for="author"><?php _e('Restrict Author'); ?></label></th>
mp-wp_genesis 38 <td>
mp-wp_genesis 39 <select name="author" id="author">
mp-wp_genesis 40 <option value="all" selected="selected"><?php _e('All Authors'); ?></option>
mp-wp_genesis 41 <?php
mp-wp_genesis 42 $authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
mp-wp_genesis 43 foreach ( $authors as $id ) {
mp-wp_genesis 44 $o = get_userdata( $id );
mp-wp_genesis 45 echo "<option value='$o->ID'>$o->display_name</option>";
mp-wp_genesis 46 }
mp-wp_genesis 47 ?>
mp-wp_genesis 48 </select>
mp-wp_genesis 49 </td>
mp-wp_genesis 50 </tr>
mp-wp_genesis 51 </table>
mp-wp_genesis 52 <p class="submit"><input type="submit" name="submit" class="button" value="<?php _e('Download Export File'); ?>" />
mp-wp_genesis 53 <input type="hidden" name="download" value="true" />
mp-wp_genesis 54 </p>
mp-wp_genesis 55 </form>
mp-wp_genesis 56 </div>
mp-wp_genesis 57
mp-wp_genesis 58 <?php
mp-wp_genesis 59
mp-wp_genesis 60
mp-wp_genesis 61 include ('admin-footer.php');
mp-wp_genesis 62 ?>