Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_comments_link

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
510 /**
511  * Retrieves the link to the current post comments.
512  *
513  * @since 1.5.0
514  *
515  * @param int $post_id Optional post id
516  * @return string The link to the comments
517  */
518 function get_comments_link($post_id = 0) {
519      return apply_filters( 'get_comments_link', get_permalink( $post_id ) . '#comments', $post_id );
520 }
521
522 /**
523  * Displays the link to the current post comments.
524  *
525  * @since 0.71
526  *
527  * @param string $deprecated Not Used
528  * @param bool $deprecated_2 Not Used