wp_comment_trashnotice

函式
wp_comment_trashnotice ( No parameters )

wp_comment_trashnotice: 這是一個動作鉤子,當一個評論被移到垃圾桶時,它被用來在評論頁面上新增一個通知。它可以用來定製通知或新增額外的功能。

輸出評論的’撤銷移動到回收站’文字。

function wp_comment_trashnotice() {
	?>
<div class="hidden" id="trash-undo-holder">
	<div class="trash-undo-inside">
		<?php
		/* translators: %s: Comment author, filled by Ajax. */
		printf( __( 'Comment by %s moved to the Trash.' ), '<strong></strong>' );
		?>
		<span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span>
	</div>
</div>
<div class="hidden" id="spam-undo-holder">
	<div class="spam-undo-inside">
		<?php
		/* translators: %s: Comment author, filled by Ajax. */
		printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' );
		?>
		<span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span>
	</div>
</div>
	<?php
}

常見問題

FAQs
檢視更多 >