Changeset 16975
- Timestamp:
- 12/16/2010 12:02:36 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/export.php
r16972 r16975 137 137 <li> 138 138 <label><?php _e( 'Authors:' ); ?></label> 139 <select name="author" id="author"> 140 <option value="all" selected="selected"><?php _e('All'); ?></option> 141 <?php 139 <?php 142 140 $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" ); 143 $authors = $wpdb->get_results( "SELECT ID, display_name FROM $wpdb->users WHERE ID IN (" . implode( ',', $authors ) . ") ORDER BY display_name" ); 144 foreach ( (array) $authors as $author ) { 145 echo "<option value='{$author->id}'>{$author->display_name}</option>\n"; 146 } 147 ?> 148 </select> 141 wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) ); 142 ?> 149 143 </li> 150 144 <li> … … 175 169 <li> 176 170 <label><?php _e( 'Authors:' ); ?></label> 177 <select name="author" id="author"> 178 <option value="all" selected="selected"><?php _e('All'); ?></option> 179 <?php 171 <?php 180 172 $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" ); 181 $authors = $wpdb->get_results( "SELECT ID, display_name FROM $wpdb->users WHERE ID IN (" . implode( ',', $authors ) . ") ORDER BY display_name" ); 182 foreach ( (array) $authors as $author ) { 183 echo "<option value='{$author->id}'>{$author->display_name}</option>\n"; 184 } 185 ?> 186 </select> 173 wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) ); 174 ?> 187 175 </li> 188 176 <li>
Note: See TracChangeset
for help on using the changeset viewer.