comment_max_links_url
Filters the number of links found in a comment.
Использование
add_filter( 'comment_max_links_url', 'wp_kama_comment_max_links_url_filter', 10, 3 ); /** * Function for `comment_max_links_url` filter-hook. * * @param int $num_links The number of links found. * @param string $url Comment author's URL. Included in allowed links total. * @param string $comment Content of the comment. * * @return int */ function wp_kama_comment_max_links_url_filter( $num_links, $url, $comment ){ // filter... return $num_links; }
- $num_links(int)
- The number of links found.
- $url(строка)
- Comment author's URL. Included in allowed links total.
- $comment(строка)
- Content of the comment.
Список изменений
С версии 3.0.0 | Введена. |
С версии 4.7.0 | Added the $comment parameter. |
Где вызывается хук
comment_max_links_url
wp-includes/comment.php 65
$num_links = apply_filters( 'comment_max_links_url', $num_links, $url, $comment );