xmlrpc_prepare_comment
Filters XML-RPC-prepared data for the given comment.
Использование
add_filter( 'xmlrpc_prepare_comment', 'wp_kama_xmlrpc_prepare_comment_filter', 10, 2 ); /** * Function for `xmlrpc_prepare_comment` filter-hook. * * @param array $_comment An array of prepared comment data. * @param WP_Comment $comment Comment object. * * @return array */ function wp_kama_xmlrpc_prepare_comment_filter( $_comment, $comment ){ // filter... return $_comment; }
- $_comment(массив)
- An array of prepared comment data.
- $comment(WP_Comment)
- Comment object.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
xmlrpc_prepare_comment
wp-includes/class-wp-xmlrpc-server.php 1216
return apply_filters( 'xmlrpc_prepare_comment', $_comment, $comment );