post_author_meta_box

Display form field with list of authors.

Description

post_author_meta_box( (object) $post ); 

Parameters (1)

0. $post (object)
The post.

Usage

  1. if ( !function_exists( 'post_author_meta_box' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/meta-boxes.php'; 
  3.  
  4. // The post. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = post_author_meta_box($post); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/meta-boxes.php  
  1. function post_author_meta_box($post) { 
  2. global $user_ID; 
  3. ?> 
  4. <label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label> 
  5. <?php 
  6. 'who' => 'authors',  
  7. 'name' => 'post_author_override',  
  8. 'selected' => empty($post->ID) ? $user_ID : $post->post_author,  
  9. 'include_selected' => true,  
  10. 'show' => 'display_name_with_login',  
  11. ) );