Make WordPress Core


Ignore:
Timestamp:
05/18/2008 08:08:18 PM (16 years ago)
Author:
ryan
Message:

add_meta_box() for edit page form. Props DD32. see #6964

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r7930 r7948  
    348348if ( $authors && count( $authors ) > 1 ) :
    349349function post_author_meta_box($post) {
    350 ?>
    351 <label class="hidden" for="post_author_override"><?php _e('Post Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post_ID) ? $user_ID : $post->post_author) ); ?>
     350    global $current_user, $user_ID;
     351    $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     352    if ( $post->post_author && !in_array($post->post_author, $authors) )
     353        $authors[] = $post->post_author;
     354?>
     355<label class="hidden" for="post_author_override"><?php _e('Post Author'); ?></label><?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?>
    352356<?php
    353357}
Note: See TracChangeset for help on using the changeset viewer.