Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: edit_comment_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
1004      global $comment;
1005
1006      if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
1007           return;
1008
1009      if ( null === $link )
1010           $link = __('Edit This');
1011
1012      $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '" title="' . esc_attr__( 'Edit comment' ) . '">' . $link . '</a>';
1013      echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after;
1014 }
1015
1016 /**
1017  * Display edit bookmark (literally a URL external to blog) link.
1018  *
1019  * @since 2.7.0
1020  *
1021  * @param int $link Optional. Bookmark ID.
1022  * @return string