Changeset 19626
- Timestamp:
- 12/22/2011 12:08:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/export.php
r19596 r19626 96 96 require_once ('admin-header.php'); 97 97 98 function export_date_options( ) {98 function export_date_options( $post_type = 'post' ) { 99 99 global $wpdb, $wp_locale; 100 100 101 $months = $wpdb->get_results( "101 $months = $wpdb->get_results( $wpdb->prepare( " 102 102 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 103 103 FROM $wpdb->posts 104 WHERE post_type = 'post'AND post_status != 'auto-draft'104 WHERE post_type = %s AND post_status != 'auto-draft' 105 105 ORDER BY post_date DESC 106 " );106 ", $post_type ) ); 107 107 108 108 $month_count = count( $months ); … … 183 183 <select name="page_start_date"> 184 184 <option value="0"><?php _e( 'Start Date' ); ?></option> 185 <?php export_date_options( ); ?>185 <?php export_date_options( 'page' ); ?> 186 186 </select> 187 187 <select name="page_end_date"> 188 188 <option value="0"><?php _e( 'End Date' ); ?></option> 189 <?php export_date_options( ); ?>189 <?php export_date_options( 'page' ); ?> 190 190 </select> 191 191 </li>
Note: See TracChangeset
for help on using the changeset viewer.