Ticket #30170: export-start-end-date.patch
File export-start-end-date.patch, 781 bytes (added by , 10 years ago) |
---|
-
export.php
76 76 if ( $args['author'] ) 77 77 $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_author = %d", $args['author'] ); 78 78 79 // Swap start and end dates if, and only if, start date is more recent than end date 80 if ( $args['start_date'] && $args['end_date'] && $args['start_date'] > $args['end_date'] ) { 81 $swap = $args['start_date']; 82 $args['start_date'] = $args['end_date']; 83 $args['end_date'] = $swap; 84 } 85 79 86 if ( $args['start_date'] ) 80 87 $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date >= %s", date( 'Y-m-d', strtotime($args['start_date']) ) ); 81 88