2006-10-26 00:55:05 +02:00
< ? php
2008-08-11 22:26:31 +02:00
/**
* WordPress Export Administration Panel
*
* @ package WordPress
* @ subpackage Administration
*/
/** Load WordPress Bootstrap */
2006-10-26 00:55:05 +02:00
require_once ( 'admin.php' );
2008-08-11 22:26:31 +02:00
/** Load WordPress export API */
2007-11-15 06:32:33 +01:00
require_once ( 'includes/export.php' );
2006-11-18 08:31:29 +01:00
$title = __ ( 'Export' );
2006-10-26 00:55:05 +02:00
2008-02-05 07:47:27 +01:00
if ( isset ( $_GET [ 'download' ] ) ) {
2007-11-15 06:32:33 +01:00
export_wp ( $_GET [ 'author' ] );
die ();
}
2006-10-26 00:55:05 +02:00
require_once ( 'admin-header.php' );
?>
< div class = " wrap " >
2008-10-17 22:06:22 +02:00
< h2 >< ? php echo wp_specialchars ( $title ); ?> </h2>
2008-10-17 22:02:03 +02:00
2006-12-05 08:15:12 +01:00
< p >< ? php _e ( 'When you click the button below WordPress will create an XML file for you to save to your computer.' ); ?> </p>
2008-03-09 23:14:49 +01:00
< 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>
2006-12-27 01:51:00 +01:00
< 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>
2006-10-26 00:55:05 +02:00
< form action = " " method = " get " >
2008-02-27 20:18:21 +01:00
< h3 >< ? php _e ( 'Options' ); ?> </h3>
2006-11-19 00:13:15 +01:00
2008-02-27 20:18:21 +01:00
< table class = " form-table " >
2006-11-19 00:13:15 +01:00
< tr >
2008-05-04 12:37:06 +02:00
< th >< label for = " author " >< ? php _e ( 'Restrict Author' ); ?> </label></th>
2006-11-19 00:13:15 +01:00
< td >
2008-05-04 12:37:06 +02:00
< select name = " author " id = " author " >
2008-02-14 01:57:29 +01:00
< option value = " all " selected = " selected " >< ? php _e ( 'All Authors' ); ?> </option>
2006-11-19 00:13:15 +01:00
< ? php
2007-08-21 20:27:45 +02:00
$authors = $wpdb -> get_col ( " SELECT post_author FROM $wpdb->posts GROUP BY post_author " );
2006-11-19 00:13:15 +01:00
foreach ( $authors as $id ) {
$o = get_userdata ( $id );
echo " <option value=' $o->ID '> $o->display_name </option> " ;
}
?>
</ select >
</ td >
</ tr >
</ table >
2008-02-20 20:30:55 +01:00
< p class = " submit " >< input type = " submit " name = " submit " value = " <?php _e('Download Export File'); ?> " />
2006-10-26 00:55:05 +02:00
< input type = " hidden " name = " download " value = " true " />
</ p >
</ form >
</ div >
< ? php
include ( 'admin-footer.php' );
2008-08-11 22:26:31 +02:00
?>