post_author_meta_box()

 

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>
	<?php
	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',
		)
	);
}

参数:post_author_meta_box( object $post )

$post

(object)
(Required)

{acontent3}

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

20.00% (1) 次Baidu访问
20.00% (1) 次Google访问
60.00% (3) 次Sogou访问
  • 蜘蛛:Baidu,1次,更新时间:2019-04-22 14:34:20
  • 蜘蛛:Google,1次,更新时间:2019-04-23 01:49:44
  • 蜘蛛:Sogou,3次,更新时间:2019-05-10 21:49:17

参与评论