Make WordPress Core


Ignore:
Timestamp:
07/11/2009 09:17:09 AM (16 years ago)
Author:
westi
Message:

Call wp_dropdown_users() with echo=0 when outputting the quickedit and bulkedit forms so as to remove the need for output buffering. Fixes #10062 props johnbillion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r11703 r11709  
    10561056<?php endif; // $bulk
    10571057
    1058         ob_start();
    10591058        $authors = get_editable_user_ids( $current_user->id, true, $type ); // TODO: ROLE SYSTEM
    10601059        if ( $authors && count( $authors ) > 1 ) :
    1061             $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1);
     1060            $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1, 'echo' => 0);
    10621061            if ( $bulk )
    10631062                $users_opt['show_option_none'] = __('- No Change -');
    1064 ?>
    1065         <label>
    1066             <span class="title"><?php _e( 'Author' ); ?></span>
    1067             <?php wp_dropdown_users( $users_opt ); ?>
    1068         </label>
    1069 
    1070 <?php
     1063
     1064        $authors_dropdown  = '<label>';
     1065        $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
     1066        $authors_dropdown .= wp_dropdown_users( $users_opt );
     1067        $authors_dropdown .= '</label>';
     1068
    10711069        endif; // authors
    1072         $authors_dropdown = ob_get_clean();
    10731070?>
    10741071
Note: See TracChangeset for help on using the changeset viewer.