Make WordPress Core


Ignore:
Timestamp:
09/11/2015 06:20:56 AM (8 years ago)
Author:
wonderboymusic
Message:

After [33961], pass $comment to get_comment_link() where possible to avoid extra cache/db lookups.

See #33638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-comments-post.php

    r33891 r34042  
    152152do_action( 'set_comment_cookies', $comment, $user );
    153153
    154 $location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
     154$location = empty($_POST['redirect_to']) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment_id;
    155155
    156156/**
Note: See TracChangeset for help on using the changeset viewer.