WordPress.org

Make WordPress Core

Ticket #15786: raw.15786.diff

File raw.15786.diff, 881 bytes (added by scribu, 7 years ago)

Revert to straight HTML + raw query

  • wp-admin/export.php

     
    136136        </li>
    137137        <li>
    138138                <label><?php _e( 'Authors:' ); ?></label>
    139                 <?php wp_dropdown_users( array( 'name' => 'post_author', 'multi' => true, 'show_option_all' => __('All') ) ); ?>
     139                <select name="author" id="author">
     140                <option value="all" selected="selected"><?php _e('All Authors'); ?></option>
     141                <?php
     142                $authors = $wpdb->get_results( "SELECT DISTINCT u.id, u.display_name FROM $wpdb->users u INNER JOIN $wpdb->posts p WHERE u.id = p.post_author ORDER BY u.display_name" );
     143                foreach ( (array) $authors as $author ) {
     144                        echo "<option value='{$author->id}'>{$author->display_name}</option>\n";
     145                }
     146                ?>
     147                </select>
    140148        </li>
    141149        <li>
    142150                <label><?php _e( 'Date range:' ); ?></label>