我会通过调查wp_get_post_revisions
所以把这个放在你的functions.php
:
function show_revisions( $revisions ){
echo \'<ul>\';
foreach( $revisions as $revision ):
// Gets the author if there is one.
// Prints (??) if there isn\'t one.
$author = empty( ucfirst( get_the_author_meta( \'display_name\', $post_author ) ) ) ? \'(??)\' : ucfirst( get_the_author_meta( \'display_name\', $revision->post_author ) );
echo \'<li>\';
echo \'<p>Author:\' . $author . \'</p>\';
echo \'</li>\';
endforeach;
echo \'</ul>\';
}
然后把这个放在你的
single.php
和/或
page.php
和/或您希望显示作者列表的任何位置:
$revisions = wp_get_post_revisions();
show_revisions( $revisions );