mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Avoid variable clash in export.php. see #14026 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a1ded4c270
commit
642e01ef4a
@ -28,13 +28,13 @@ if ( isset( $_GET['download'] ) ) {
|
||||
$author = isset($_GET['author']) ? $_GET['author'] : 'all';
|
||||
$taxonomy = array();
|
||||
foreach ( get_taxonomies( array( 'show_ui' => true ) ) as $tax )
|
||||
$taxonomy[ $tax ] = ! empty( $_GET['taxonomy'][ $tax ] ) ? $_GET['taxonomy'][ $tax ] : 'all';
|
||||
$post_type = isset($_GET['post_type']) ? stripslashes_deep($_GET['post_type']) : 'all';
|
||||
$status = isset($_GET['status']) ? stripslashes_deep($_GET['status']) : 'all';
|
||||
$taxonomy[ $tax ] = ! empty( $_GET['export_taxonomy'][ $tax ] ) ? $_GET['export_taxonomy'][ $tax ] : 'all';
|
||||
$post_type = isset($_GET['export_post_type']) ? stripslashes_deep($_GET['export_post_type']) : 'all';
|
||||
$status = isset($_GET['export_post_status']) ? stripslashes_deep($_GET['export_post_status']) : 'all';
|
||||
$mm_start = isset($_GET['mm_start']) ? $_GET['mm_start'] : 'all';
|
||||
$mm_end = isset($_GET['mm_end']) ? $_GET['mm_end'] : 'all';
|
||||
if( $mm_start != 'all' ) {
|
||||
$start_date = sprintf( "%04d-%02d-%02d", substr( $mm_start, 0, 4 ), substr( $mm_start, 5, 2 ), 1 );
|
||||
$start_date = sprintf( "%04d-%02d-%02d", substr( $MM._start, 0, 4 ), substr( $mm_start, 5, 2 ), 1 );
|
||||
} else {
|
||||
$start_date = 'all';
|
||||
}
|
||||
@ -108,7 +108,7 @@ foreach ( (array) $authors as $author ) {
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ( get_taxonomies( array( 'show_ui' => true ), 'objects' ) as $tax_obj ) {
|
||||
$term_dropdown = wp_dropdown_categories( array( 'taxonomy' => $tax_obj->name, 'hide_if_empty' => true, 'show_option_all' => __( 'All Terms' ), 'name' => 'taxonomy[' . $tax_obj->name . ']', 'id' => 'taxonomy-' . $tax_obj->name, 'class' => '', 'echo' => false ) );
|
||||
$term_dropdown = wp_dropdown_categories( array( 'taxonomy' => $tax_obj->name, 'hide_if_empty' => true, 'show_option_all' => __( 'All Terms' ), 'name' => 'export_taxonomy[' . $tax_obj->name . ']', 'id' => 'taxonomy-' . $tax_obj->name, 'class' => '', 'echo' => false ) );
|
||||
if ( $term_dropdown )
|
||||
echo '<tr><th><label for="taxonomy-' . $tax_obj->name . '">' . $tax_obj->labels->name . '</label></th><td>' . $term_dropdown . '</td></tr>';
|
||||
}
|
||||
@ -116,7 +116,7 @@ foreach ( (array) $authors as $author ) {
|
||||
<tr>
|
||||
<th><label for="post_type"><?php _e('Content Types'); ?></label></th>
|
||||
<td>
|
||||
<select name="post_type" id="post_type">
|
||||
<select name="export_post_type" id="post_type">
|
||||
<option value="all" selected="selected"><?php _e('All Content'); ?></option>
|
||||
<?php foreach ( get_post_types( array( 'public' => true, 'can_export' => true ), 'objects' ) as $post_type_obj ) { ?>
|
||||
<option value="<?php echo $post_type_obj->name; ?>"><?php echo $post_type_obj->labels->name; ?></option>
|
||||
@ -127,7 +127,7 @@ foreach ( (array) $authors as $author ) {
|
||||
<tr>
|
||||
<th><label for="status"><?php _e('Statuses'); ?></label></th>
|
||||
<td>
|
||||
<select name="status" id="status">
|
||||
<select name="export_post_status" id="status">
|
||||
<option value="all" selected="selected"><?php _e('All Statuses'); ?></option>
|
||||
<?php foreach ( get_post_stati( array( 'internal' => false ), 'objects' ) as $post_status_obj ) { ?>
|
||||
<option value="<?php echo $post_status_obj->name; ?>"><?php echo $post_status_obj->label; ?></option>
|
||||
|
Loading…
Reference in New Issue
Block a user