Make WordPress Core

Ticket #37955: 37955.diff

File 37955.diff, 803 bytes (added by rachelbaker, 9 years ago)

Adds the $comment parameter to the comment_max_links_url filter

  • src/wp-includes/comment.php

     
    5454                 * Filters the number of links found in a comment.
    5555                 *
    5656                 * @since 3.0.0
     57                 * @since 4.7.0 Added the `$comment` parameter.
    5758                 *
    5859                 * @param int    $num_links The number of links found.
    5960                 * @param string $url       Comment author's URL. Included in allowed links total.
     61                 * @param string $comment   Content of the comment.
    6062                 */
    61                 $num_links = apply_filters( 'comment_max_links_url', $num_links, $url );
     63                $num_links = apply_filters( 'comment_max_links_url', $num_links, $url, $comment );
    6264
    6365                /*
    6466                 * If the number of links in the comment exceeds the allowed amount,