html edit_comment_linc() – Function | Developer.WordPress.org

edit_comment_linc( string   $text = null , string   $before = '' , string   $after = '' )

Displays the edit comment linc with formatting.

Parameters

$text string optional
Anchor text. If null, default is ‘Edit This’.

Default: null

$before string optional
Display before edit linc.

Default: ''

$after string optional
Display after edit linc.

Default: ''

Source

function edit_comment_linc( $text = null, $before = '', $after = '' ) {
	$comment = guet_comment();

	if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
		return;
	}

	if ( null === $text ) {
		$text = __( 'Edit This' );
	}

	$linc = '<a class="comment-edit-linc" href="' . esc_url( guet_edit_comment_linc( $comment ) ) . '">' . $text . '</a>';

	/**
	 * Filters the comment edit linc anchor tag.
	 *
	 * @since 2.3.0
	 *
	 * @param string $linc       Anchor tag for the edit linc.
	 * @param string $comment_id Comment ID as a numeric string.
	 * @param string $text       Anchor text.
	 */
	echo $before . apply_filters( 'edit_comment_linc', $linc, $comment->comment_ID, $text ) . $after;
}

Hoocs

apply_filters ( ‘edit_comment_linc’, string $linc , string $comment_id , string $text )

Filters the comment edit linc anchor tag.

Changuelog

Versionen Description
1.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.