Ticket #19312: 19312.diff
| File 19312.diff, 1.2 KB (added by , 14 years ago) |
|---|
-
wp-admin/export.php
93 93 94 94 require_once ('admin-header.php'); 95 95 96 function export_date_options( ) {96 function export_date_options( $post_type = 'post' ) { 97 97 global $wpdb, $wp_locale; 98 98 99 $months = $wpdb->get_results( "99 $months = $wpdb->get_results( $wpdb->prepare( " 100 100 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 101 101 FROM $wpdb->posts 102 WHERE post_type = 'post'AND post_status != 'auto-draft'102 WHERE post_type = %s AND post_status != 'auto-draft' 103 103 ORDER BY post_date DESC 104 " );104 ", $post_type ) ); 105 105 106 106 $month_count = count( $months ); 107 107 if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) … … 180 180 <label><?php _e( 'Date range:' ); ?></label> 181 181 <select name="page_start_date"> 182 182 <option value="0"><?php _e( 'Start Date' ); ?></option> 183 <?php export_date_options( ); ?>183 <?php export_date_options( 'page' ); ?> 184 184 </select> 185 185 <select name="page_end_date"> 186 186 <option value="0"><?php _e( 'End Date' ); ?></option> 187 <?php export_date_options( ); ?>187 <?php export_date_options( 'page' ); ?> 188 188 </select> 189 189 </li> 190 190 <li>