在评论底部显示错误消息。
原型
comment_footer_die( string $msg )
参数
$msg
(string)
(Required)
错误信息。假设包含HTML并进行清理。
源文件
路径:wp-admin/includes/comment.php
<?php
...
function comment_footer_die( $msg ) {
echo "<div class='wrap'><p>$msg</p></div>";
include( ABSPATH . 'wp-admin/admin-footer.php' );
die;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/comment_footer_die/