get_edit_comment_link

The timeline below displays how wordpress function get_edit_comment_link has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Retrieves the edit comment link.
 *
 * @since 2.3.0
 *
 * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object.
 * @return string|void The edit comment link URL for the given comment.
 */
function get_edit_comment_link($comment_id = 0)
{
    $comment = get_comment($comment_id);
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID;
    /**
     * Filters the comment edit link.
     *
     * @since 2.3.0
     *
     * @param string $location The edit link.
     */
    return apply_filters('get_edit_comment_link', $location);
}

WordPress Version: 4.4

/**
 * Retrieve edit comment link.
 *
 * @since 2.3.0
 *
 * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object.
 * @return string|void The edit comment link URL for the given comment.
 */
function get_edit_comment_link($comment_id = 0)
{
    $comment = get_comment($comment_id);
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID;
    /**
     * Filter the comment edit link.
     *
     * @since 2.3.0
     *
     * @param string $location The edit link.
     */
    return apply_filters('get_edit_comment_link', $location);
}

WordPress Version: 4.3

/**
 * Retrieve edit comment link.
 *
 * @since 2.3.0
 *
 * @param int $comment_id Optional. Comment ID.
 * @return string|void The edit comment link URL for the given comment.
 */
function get_edit_comment_link($comment_id = 0)
{
    $comment = get_comment($comment_id);
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID;
    /**
     * Filter the comment edit link.
     *
     * @since 2.3.0
     *
     * @param string $location The edit link.
     */
    return apply_filters('get_edit_comment_link', $location);
}

WordPress Version: 4.1

/**
 * Retrieve edit comment link.
 *
 * @since 2.3.0
 *
 * @param int $comment_id Optional. Comment ID.
 * @return string The edit comment link URL for the given comment.
 */
function get_edit_comment_link($comment_id = 0)
{
    $comment = get_comment($comment_id);
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID;
    /**
     * Filter the comment edit link.
     *
     * @since 2.3.0
     *
     * @param string $location The edit link.
     */
    return apply_filters('get_edit_comment_link', $location);
}

WordPress Version: 3.9

/**
 * Retrieve edit comment link.
 *
 * @since 2.3.0
 *
 * @param int $comment_id Optional. Comment ID.
 * @return string
 */
function get_edit_comment_link($comment_id = 0)
{
    $comment = get_comment($comment_id);
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID;
    /**
     * Filter the comment edit link.
     *
     * @since 2.3.0
     *
     * @param string $location The edit link.
     */
    return apply_filters('get_edit_comment_link', $location);
}

WordPress Version: 3.7

/**
 * Retrieve edit comment link.
 *
 * @since 2.3.0
 *
 * @param int $comment_id Optional. Comment ID.
 * @return string
 */
function get_edit_comment_link($comment_id = 0)
{
    $comment = get_comment($comment_id);
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    $location = admin_url('comment.php?action=editcomment&c=') . $comment->comment_ID;
    return apply_filters('get_edit_comment_link', $location);
}