<?php
function ludou_code_escape( $incoming_comment ) {
$incoming_comment = htmlspecialchars($incoming_comment, ENT_QUOTES);
return $incoming_comment;
}
add_filter( 'comment_text', 'ludou_code_escape' );
add_filter( 'comment_text_rss', 'ludou_code_escape' );
<?php
function ludou_code_escape( $incoming_comment ) {
$incoming_comment = strip_tags($incoming_comment);
return $incoming_comment;
}
add_filter( 'comment_text', 'ludou_code_escape' );
add_filter( 'comment_text_rss', 'ludou_code_escape' );
<?php
echo strip_tags("Hello world!");
?>
以上就是安达网络工作室关于《WordPress 防止恶意评论的方法》的一些看法。更多内容请查看本栏目更多内容!
comments-ajax.js在cdn缓存后,很多人遇到无奈(应用ajax)回复的成绩。对此,我之前的做法只是制止cdn缓存...
什么是自定义post? 不要想当然的以为这里的post就是就是指博客中的文章,它只不过是一个文章类的代理词...
在WordPress 中,__()函数和__e()函数被用来辨认php文件中被标示的、需求被翻译成其它言语或本地化的字符串...
4月更新过文章,文章ID停留在146,5月忙于考试,文章一篇都没写,后果6月前几天写文章的时分,ID从146间接跳...
WordPress 4.1 正式版公布,这次更新带来了2015主题(Twenty Fifteen),免干扰写作模式,暗藏各种芜杂以及...
为何要用 get_term_link?: 新类型的分类是无奈用 <?php echo get_category_link( $category_id ); ?> 输入...