Use wp_dropdown_users() in export.php again, due to [16974]. See #15786

git-svn-id: http://svn.automattic.com/wordpress/trunk@16975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-12-16 00:02:36 +00:00
parent 0a68fc29d2
commit 15249d5c98

View File

@ -136,16 +136,10 @@ function export_date_options() {
</li> </li>
<li> <li>
<label><?php _e( 'Authors:' ); ?></label> <label><?php _e( 'Authors:' ); ?></label>
<select name="author" id="author"> <?php
<option value="all" selected="selected"><?php _e('All'); ?></option>
<?php
$authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" ); $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" );
$authors = $wpdb->get_results( "SELECT ID, display_name FROM $wpdb->users WHERE ID IN (" . implode( ',', $authors ) . ") ORDER BY display_name" ); wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) );
foreach ( (array) $authors as $author ) { ?>
echo "<option value='{$author->id}'>{$author->display_name}</option>\n";
}
?>
</select>
</li> </li>
<li> <li>
<label><?php _e( 'Date range:' ); ?></label> <label><?php _e( 'Date range:' ); ?></label>
@ -174,16 +168,10 @@ function export_date_options() {
<ul id="page-filters" class="export-filters"> <ul id="page-filters" class="export-filters">
<li> <li>
<label><?php _e( 'Authors:' ); ?></label> <label><?php _e( 'Authors:' ); ?></label>
<select name="author" id="author"> <?php
<option value="all" selected="selected"><?php _e('All'); ?></option>
<?php
$authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" ); $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" );
$authors = $wpdb->get_results( "SELECT ID, display_name FROM $wpdb->users WHERE ID IN (" . implode( ',', $authors ) . ") ORDER BY display_name" ); wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) );
foreach ( (array) $authors as $author ) { ?>
echo "<option value='{$author->id}'>{$author->display_name}</option>\n";
}
?>
</select>
</li> </li>
<li> <li>
<label><?php _e( 'Date range:' ); ?></label> <label><?php _e( 'Date range:' ); ?></label>