Projects : mp-wp : mp-wp_genesis
1 | <?php |
2 | /** |
3 | * WordPress Export Administration Panel |
4 | * |
5 | * @package WordPress |
6 | * @subpackage Administration |
7 | */ |
8 | |
9 | /** Load WordPress Bootstrap */ |
10 | require_once ('admin.php'); |
11 | |
12 | /** Load WordPress export API */ |
13 | require_once('includes/export.php'); |
14 | $title = __('Export'); |
15 | |
16 | if ( isset( $_GET['download'] ) ) { |
17 | $author = isset($_GET['author']) ? $_GET['author'] : 'all'; |
18 | export_wp( $author ); |
19 | die(); |
20 | } |
21 | |
22 | require_once ('admin-header.php'); |
23 | ?> |
24 | |
25 | <div class="wrap"> |
26 | <?php screen_icon(); ?> |
27 | <h2><?php echo wp_specialchars( $title ); ?></h2> |
28 | |
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> |
34 | |
35 | <table class="form-table"> |
36 | <tr> |
37 | <th><label for="author"><?php _e('Restrict Author'); ?></label></th> |
38 | <td> |
39 | <select name="author" id="author"> |
40 | <option value="all" selected="selected"><?php _e('All Authors'); ?></option> |
41 | <?php |
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='$o->ID'>$o->display_name</option>"; |
46 | } |
47 | ?> |
48 | </select> |
49 | </td> |
50 | </tr> |
51 | </table> |
52 | <p class="submit"><input type="submit" name="submit" class="button" value="<?php _e('Download Export File'); ?>" /> |
53 | <input type="hidden" name="download" value="true" /> |
54 | </p> |
55 | </form> |
56 | </div> |
57 | |
58 | <?php |
59 | |
60 | |
61 | include ('admin-footer.php'); |
62 | ?> |