home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-admin / export.php < prev    next >
Encoding:
PHP Script  |  2008-05-04  |  1.4 KB  |  51 lines

  1. <?php
  2. require_once ('admin.php');
  3. require_once('includes/export.php');
  4. $title = __('Export');
  5. $parent_file = 'edit.php';
  6.  
  7. if ( isset( $_GET['download'] ) ) {
  8.     export_wp( $_GET['author'] );
  9.     die();
  10. }
  11.  
  12. require_once ('admin-header.php');
  13. ?>
  14.  
  15. <div class="wrap">
  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>
  22.  
  23. <table class="form-table">
  24. <tr>
  25. <th><label for="author"><?php _e('Restrict Author'); ?></label></th>
  26. <td>
  27. <select name="author" id="author">
  28. <option value="all" selected="selected"><?php _e('All Authors'); ?></option>
  29. <?php
  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>";
  34. }
  35. ?>
  36. </select>
  37. </td>
  38. </tr>
  39. </table>
  40. <p class="submit"><input type="submit" name="submit" value="<?php _e('Download Export File'); ?>" />
  41. <input type="hidden" name="download" value="true" />
  42. </p>
  43. </form>
  44. </div>
  45.  
  46. <?php
  47.  
  48.  
  49. include ('admin-footer.php');
  50. ?>
  51.