149
158
<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>
150
159
<p><?php _e('Once you’ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.'); ?></p>
152
<h3><?php _e( 'Choose what to export' ); ?></h3>
161
<h2><?php _e( 'Choose what to export' ); ?></h2>
153
162
<form method="get" id="export-filters">
164
<legend class="screen-reader-text"><?php _e( 'Content to export' ); ?></legend>
154
165
<input type="hidden" name="download" value="true" />
155
<p><label><input type="radio" name="content" value="all" checked="checked" /> <?php _e( 'All content' ); ?></label></p>
156
<p class="description"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts.' ); ?></p>
166
<p><label><input type="radio" name="content" value="all" checked="checked" aria-describedby="all-content-desc" /> <?php _e( 'All content' ); ?></label></p>
167
<p class="description" id="all-content-desc"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts.' ); ?></p>
158
169
<p><label><input type="radio" name="content" value="posts" /> <?php _e( 'Posts' ); ?></label></p>
159
170
<ul id="post-filters" class="export-filters">
161
<label><?php _e( 'Categories:' ); ?></label>
172
<label><span class="label-responsive"><?php _e( 'Categories:' ); ?></span>
162
173
<?php wp_dropdown_categories( array( 'show_option_all' => __('All') ) ); ?>
165
<label><?php _e( 'Authors:' ); ?></label>
177
<label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
167
179
$authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" );
168
180
wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) );
172
<label><?php _e( 'Date range:' ); ?></label>
173
<select name="post_start_date">
174
<option value="0"><?php _e( 'Start Date' ); ?></option>
175
<?php export_date_options(); ?>
177
<select name="post_end_date">
178
<option value="0"><?php _e( 'End Date' ); ?></option>
179
<?php export_date_options(); ?>
183
<label><?php _e( 'Status:' ); ?></label>
184
<select name="post_status">
186
<legend class="screen-reader-text"><?php _e( 'Date range:' ); ?></legend>
187
<label for="post-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label>
188
<select name="post_start_date" id="post-start-date">
189
<option value="0"><?php _e( '— Select —' ); ?></option>
190
<?php export_date_options(); ?>
192
<label for="post-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label>
193
<select name="post_end_date" id="post-end-date">
194
<option value="0"><?php _e( '— Select —' ); ?></option>
195
<?php export_date_options(); ?>
200
<label for="post-status" class="label-responsive"><?php _e( 'Status:' ); ?></label>
201
<select name="post_status" id="post-status">
185
202
<option value="0"><?php _e( 'All' ); ?></option>
186
203
<?php $post_stati = get_post_stati( array( 'internal' => false ), 'objects' );
187
204
foreach ( $post_stati as $status ) : ?>
194
211
<p><label><input type="radio" name="content" value="pages" /> <?php _e( 'Pages' ); ?></label></p>
195
212
<ul id="page-filters" class="export-filters">
197
<label><?php _e( 'Authors:' ); ?></label>
214
<label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
199
216
$authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" );
200
217
wp_dropdown_users( array( 'include' => $authors, 'name' => 'page_author', 'multi' => true, 'show_option_all' => __('All') ) );
204
<label><?php _e( 'Date range:' ); ?></label>
205
<select name="page_start_date">
206
<option value="0"><?php _e( 'Start Date' ); ?></option>
207
<?php export_date_options( 'page' ); ?>
209
<select name="page_end_date">
210
<option value="0"><?php _e( 'End Date' ); ?></option>
211
<?php export_date_options( 'page' ); ?>
215
<label><?php _e( 'Status:' ); ?></label>
216
<select name="page_status">
223
<legend class="screen-reader-text"><?php _e( 'Date range:' ); ?></legend>
224
<label for="page-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label>
225
<select name="page_start_date" id="page-start-date">
226
<option value="0"><?php _e( '— Select —' ); ?></option>
227
<?php export_date_options( 'page' ); ?>
229
<label for="page-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label>
230
<select name="page_end_date" id="page-end-date">
231
<option value="0"><?php _e( '— Select —' ); ?></option>
232
<?php export_date_options( 'page' ); ?>
237
<label for="page-status" class="label-responsive"><?php _e( 'Status:' ); ?></label>
238
<select name="page_status" id="page-status">
217
239
<option value="0"><?php _e( 'All' ); ?></option>
218
240
<?php foreach ( $post_stati as $status ) : ?>
219
241
<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
226
248
<p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
227
249
<?php endforeach; ?>
251
<p><label><input type="radio" name="content" value="attachment" /> <?php _e( 'Media' ); ?></label></p>
252
<ul id="attachment-filters" class="export-filters">
255
<legend class="screen-reader-text"><?php _e( 'Date range:' ); ?></legend>
256
<label for="attachment-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label>
257
<select name="attachment_start_date" id="attachment-start-date">
258
<option value="0"><?php _e( '— Select —' ); ?></option>
259
<?php export_date_options( 'attachment' ); ?>
261
<label for="attachment-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label>
262
<select name="attachment_end_date" id="attachment-end-date">
263
<option value="0"><?php _e( '— Select —' ); ?></option>
264
<?php export_date_options( 'attachment' ); ?>
231
* Fires after the export filters form.
273
* Fires at the end of the export filters form.