Advertisements

edit_comment_link

Definition:
function edit_comment_link( $link = null, $before = '', $after = '' ) {}

Display or retrieve edit comment link with formatting.

Parameters

  • string $link: Optional. Anchor text.
  • string $before: Optional. Display before edit link.
  • string $after: Optional. Display after edit link.

Return values

returns:HTML content, if $echo is set to false.

Defined filters

  • edit_comment_link
    apply_filters( 'edit_comment_link', $link, $comment->comment_ID )

Source code

function edit_comment_link( $link = null, $before = '', $after = '' ) {

	global $comment;



	if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )

		return;



	if ( null === $link )

		$link = __('Edit This');



	$link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '" title="' . esc_attr__( 'Edit comment' ) . '">' . $link . '</a>';

	echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after;

}

998

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: