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.

git-svn-id: https://develop.svn.wordpress.org/trunk@11709 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-07-11 09:17:09 +00:00
parent ab1fbdb40a
commit 64fd3c3e59
1 changed files with 6 additions and 9 deletions

View File

@ -1055,21 +1055,18 @@ function inline_edit_row( $type ) {
<?php endif; // $bulk <?php endif; // $bulk
ob_start();
$authors = get_editable_user_ids( $current_user->id, true, $type ); // TODO: ROLE SYSTEM $authors = get_editable_user_ids( $current_user->id, true, $type ); // TODO: ROLE SYSTEM
if ( $authors && count( $authors ) > 1 ) : if ( $authors && count( $authors ) > 1 ) :
$users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1); $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1, 'echo' => 0);
if ( $bulk ) if ( $bulk )
$users_opt['show_option_none'] = __('- No Change -'); $users_opt['show_option_none'] = __('- No Change -');
?>
<label>
<span class="title"><?php _e( 'Author' ); ?></span>
<?php wp_dropdown_users( $users_opt ); ?>
</label>
<?php $authors_dropdown = '<label>';
$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
$authors_dropdown .= wp_dropdown_users( $users_opt );
$authors_dropdown .= '</label>';
endif; // authors endif; // authors
$authors_dropdown = ob_get_clean();
?> ?>
<?php if ( !$bulk ) : echo $authors_dropdown; ?> <?php if ( !$bulk ) : echo $authors_dropdown; ?>