Post and page management filter additions from mdawaffe. see #3945

git-svn-id: https://develop.svn.wordpress.org/trunk@5587 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-05-29 04:28:10 +00:00
parent c4bb18caa6
commit 442ef7253a
5 changed files with 101 additions and 58 deletions

View File

@@ -116,22 +116,13 @@ addLoadEvent(focusit);
<?php endif; ?>
<?php
$authors = get_editable_authors( $current_user->id ); // TODO: ROLE SYSTEM
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
if ( $authors && count( $authors ) > 1 ) :
?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post Author'); ?></h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
<?php
foreach ($authors as $o) :
$o = get_userdata( $o->ID );
if ( $post->post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
else $selected = '';
echo "<option value='" . (int) $o->ID . "' $selected>" . wp_specialchars( $o->display_name ) . "</option>";
endforeach;
?>
</select>
<?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post_ID) ? $user_ID : $post->post_author) ); ?>
</div>
</fieldset>
<?php endif; ?>