我不确定这是否是内置的,但您可以尝试向函数中添加类似的内容。php
function set_publisher( $new_status, $old_status, $post ) {
$publisher_id = get_current_user_id();
if ( $new_status == \'publish\' && $publisher_id > 0) {
update_post_meta($post->ID, \'post_publisher\', $publisher_id);
}
}
add_action( \'transition_post_status\', \'set_publisher\', 10, 3 );
然后当你想得到你使用的出版商
$publisher = get_user_by(\'id\', get_post_meta(get_the_ID(), \'post_publisher\', true));