wp_filter_comment [ WordPress Function ]
wp_filter_comment ( $commentdata )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_delete_comment, wp_insert_comment, wp_trash_comment, wp_list_comments, wp_new_comment
Filters and sanitizes comment data.
Sets the comment data 'filtered' field to true when finished. This can be checked as to whether the comment should be filtered and to keep from filtering the same comment more than once.
Source
<?php
function wp_filter_comment($commentdata) {
if ( isset($commentdata['user_ID']) )
$commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']);
elseif ( isset($commentdata['user_id']) )
$commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_id']);
$commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );
$commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']);
$commentdata['comment_content'] = apply_filters('pre_comment_content', $commentdata['comment_content']);
$commentdata['comment_author_IP'] = apply_filters('pre_comment_user_ip', $commentdata['comment_author_IP']);
$commentdata['comment_author_url'] = apply_filters('pre_comment_author_url', $commentdata['comment_author_url']);
$commentdata['comment_author_email'] = apply_filters('pre_comment_author_email', $commentdata['comment_author_email']);
$commentdata['filtered'] = true;
return $commentdata;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/wp filter comment « WordPress Codex
Description. Filters and sanitizes comment data. Sets the comment data 'filtered' field to true when finished. This can be checked as to whether the comment ...
codex.wordpress.org - WordPress › Support » Help with add_filter for wp_filter_comment()
Hi Guys, I am currently having problems trying to influence the wp_filter_comment() function. I want my plugin to intercept the post comment function to change ...
wordpress.org - 常用函数-wp_filter_comment() | WordPress啦!
常用函数-wp_filter_comment(). 说明. 过滤审查评论资料。 完成后将评论资料' filtered'字段设为true。这一动作可判断评论是否应被过滤,以及是否应该阻止同一 评论被 ...
www.wordpress.la - <?php class FV_MT_Import { var $posts = array (); var $file; var $id ...
... $comment['comment_date'])) { $comment['comment_post_ID'] = $post_id; $ comment = wp_filter_comment($comment); wp_insert_comment($comment); ...
foliovision.com