post_author_meta_box( object $post )

Display form field with list of authors.

Description Description

Parameters Parameters


(object) (Required)

Top ↑

Source Source

File: wp-admin/includes/meta-boxes.php

function post_author_meta_box($post) {
	global $user_ID;
<label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label>
	wp_dropdown_users( array(
		'who' => 'authors',
		'name' => 'post_author_override',
		'selected' => empty($post->ID) ? $user_ID : $post->post_author,
		'include_selected' => true,
		'show' => 'display_name_with_login',
	) );

Top ↑

Changelog Changelog

Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.