| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Summary view] [Print] [Text view]
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 if ( !current_user_can('edit_files') ) 13 wp_die(__('You do not have sufficient permissions to export the content of this blog.')); 14 15 /** Load WordPress export API */ 16 require_once ('includes/export.php'); 17 $title = __('Export'); 18 19 if ( isset( $_GET['download'] ) ) { 20 $author = isset($_GET['author']) ? $_GET['author'] : 'all'; 21 export_wp( $author ); 22 die(); 23 } 24 25 require_once ('admin-header.php'); 26 ?> 27 28 <div class="wrap"> 29 <?php screen_icon(); ?> 30 <h2><?php echo esc_html( $title ); ?></h2> 31 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> 37 38 <table class="form-table"> 39 <tr> 40 <th><label for="author"><?php _e('Restrict Author'); ?></label></th> 41 <td> 42 <select name="author" id="author"> 43 <option value="all" selected="selected"><?php _e('All Authors'); ?></option> 44 <?php 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>"; 49 } 50 ?> 51 </select> 52 </td> 53 </tr> 54 </table> 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" /> 57 </p> 58 </form> 59 </div> 60 61 <?php 62 63 64 include ('admin-footer.php'); 65 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |