get_comment_to_edit

Definition:
function get_comment_to_edit( $id ) {}

Parameters

  • int $id: ID of comment to retrieve

Return values

returns:if found. False on failure.

Defined filters

  • comment_edit_pre
    apply_filters( 'comment_edit_pre', $comment->comment_content)

Source code

function get_comment_to_edit( $id ) {

	if ( !$comment = get_comment($id) )

		return false;



	$comment->comment_ID = (int) $comment->comment_ID;

	$comment->comment_post_ID = (int) $comment->comment_post_ID;



	$comment->comment_content = format_to_edit( $comment->comment_content );

	$comment->comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content);



	$comment->comment_author = format_to_edit( $comment->comment_author );

	$comment->comment_author_email = format_to_edit( $comment->comment_author_email );

	$comment->comment_author_url = format_to_edit( $comment->comment_author_url );

	$comment->comment_author_url = esc_url($comment->comment_author_url);



	return $comment;

}

1334

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 )

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: