WordPress.org

Make WordPress Core

Changeset 34071


Ignore:
Timestamp:
09/12/2015 03:15:14 AM (4 years ago)
Author:
wonderboymusic
Message:

Comments: comment_link() currently takes no arguments, yet get_comment_link() does. Allow comment_link() to optionally take the same arguments.

See #33638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/feed.php

    r33913 r34071  
    292292 *
    293293 * @since 1.5.0
    294  */
    295 function comment_link() {
     294 * @since 4.4.0 Introduced the `$comment` argument.
     295 *
     296 * @param int|WP_Comment $comment Optional comment object or id. Defaults to global comment object.
     297 */
     298function comment_link( $comment = null ) {
    296299    /**
    297300     * Filter the current comment's permalink.
     
    303306     * @param string $comment_permalink The current comment permalink.
    304307     */
    305     echo esc_url( apply_filters( 'comment_link', get_comment_link() ) );
     308    echo esc_url( apply_filters( 'comment_link', get_comment_link( $comment ) ) );
    306309}
    307310
Note: See TracChangeset for help on using the changeset viewer.