mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
0a68fc29d2
commit
15249d5c98
@ -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">
|
|
||||||
<option value="all" selected="selected"><?php _e('All'); ?></option>
|
|
||||||
<?php
|
<?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">
|
|
||||||
<option value="all" selected="selected"><?php _e('All'); ?></option>
|
|
||||||
<?php
|
<?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>
|
||||||
|
Loading…
Reference in New Issue
Block a user