I know it's an old question, but an updated answer seems still relevant to give.
The original answer might have been the best option at the time but it misses checking if the post type supports changing author and fitting in the meta box style.
Main PHP
add_action('admin_menu', function (): void {
$type = getCurrentPostType();
if ($type) {
remove_meta_box('authordiv', $type, 'normal');
}
});
add_action('post_submitbox_misc_actions', function (): void {
global $post, $user_ID;
if (!empty($post)) {
$supportsAuthor = post_type_supports($post->post_type, 'author');
if ($supportsAuthor) {
$userId = empty($post->ID) ? $user_ID : $post->post_author;
$user = get_userdata($userId);
echo '... fetch some template here';
}
}
});
Helper PHP
function getCurrentPostType(): ?string {
// https://gist.github.com/bradvin/1980309
global $post, $typenow, $current_screen;
if ($post && $post->post_type) {
return $post->post_type;
} elseif ($typenow) {
return $typenow;
} elseif ($current_screen && $current_screen->post_type) {
return $current_screen->post_type;
} elseif (isset($_REQUEST['post_type'])) {
return sanitize_key($_REQUEST['post_type']);
} elseif (isset($_REQUEST['post'])) {
$p = get_post($_REQUEST['post']);
if ($p) {
return $p->post_type;
}
}
// Unknown
return null;
}
PHTML
<div class="misc-pub-section misc-pub-author" id="author">
<?=sprintf(__('Author: %s', 'aym'), "<b>{$user->display_name}</b>")?>
<a href="#author" class="edit-author hide-if-no-js" role="button" aria-label='<?=__('Edit author', 'aym')?>'>
<?=__('Edit', 'aym')?>
</a>
<div id="post-author-select" class="hide-if-js" style="display: none;">
<?php post_author_meta_box($post)?>
<p>
<a href="#author" class="save-post-author hide-if-no-js button">OK</a>
<a href="#author" class="cancel-post-author hide-if-no-js button-cancel">Cancel</a>
</p>
</div>
</div>
JavaScript
(function($) {
// Author select in admin edit sidebar
var $baseEl = $('#author');
var $select = $('select', $baseEl);
var $form = $('#post-author-select', $baseEl);
var previousValue = $select.val();
$('a[href="#author"]', $baseEl).on('click', function(e) {
e.preventDefault();
$form.slideToggle(300);
});
$('.save-post-author', $baseEl).on('click', function(e) {
e.preventDefault();
previousValue = $select.val();
$('b', $baseEl).text($("option:selected", $select).text());
$form.slideUp(300);
});
$('.cancel-post-author', $baseEl).on('click', function(e) {
e.preventDefault();
$select.val(previousValue);
$form.slideUp(300);
});
})(jQuery);
CSS
.misc-pub-author::before {
content: "\f110";
color: #82878c;
font: normal 20px/1 dashicons;
speak: none;
display: inline-block;
margin-left: -1px;
padding-right: 3px;
vertical-align: top;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#post-author-select {
padding-top: 5px;
}
#post-author-select select {
width: 100%;
}
p.s. If you encounter errors it could be because the original version I use is made in SCSS, TypeScript and PHP 7.2. And uses a custom template engine.