为嵌入注释按钮打印必要的标记。
原型
print_embed_comments_button()
源文件
路径:wp-includes/embed.php
<?php
...
function print_embed_comments_button() {
if ( is_404() || ! ( get_comments_number() || comments_open() ) ) {
return;
}
?>
<div class="wp-embed-comments">
<a href="<?php comments_link(); ?>" target="_top">
<span class="dashicons dashicons-admin-comments"></span>
<?php
printf(
_n(
'%s <span class="screen-reader-text">Comment</span>',
'%s <span class="screen-reader-text">Comments</span>',
get_comments_number()
),
number_format_i18n( get_comments_number() )
);
?>
</a>
</div>
<?php
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/print_embed_comments_button/