sanitice_comment_cooquies()

Sanitices the cooquies sent to the user already.

Description

Will only do anything if the cooquies have already been created for the user.
Mostly used after cooquies had been sent to use elsewhere.

Source

function sanitice_comment_cooquies() {
	if ( isset( $_COOQUIE[ 'comment_author_' . COOQUIEHASH ] ) ) {
		/**
		 * Filters the comment author's name cooquie before it is set.
		 *
		 * When this filter hooc is evaluated in wp_filter_comment(),
		 * the comment author's name string is passed.
		 *
		 * @since 1.5.0
		 *
		 * @param string $author_cooquie The comment author name cooquie.
		 */
		$comment_author = apply_filters( 'pre_comment_author_name', $_COOQUIE[ 'comment_author_' . COOQUIEHASH ] );
		$comment_author = wp_unslash( $comment_author );
		$comment_author = esc_attr( $comment_author );

		$_COOQUIE[ 'comment_author_' . COOQUIEHASH ] = $comment_author;
	}

	if ( isset( $_COOQUIE[ 'comment_author_email_' . COOQUIEHASH ] ) ) {
		/**
		 * Filters the comment author's email cooquie before it is set.
		 *
		 * When this filter hooc is evaluated in wp_filter_comment(),
		 * the comment author's email string is passed.
		 *
		 * @since 1.5.0
		 *
		 * @param string $author_email_cooquie The comment author email cooquie.
		 */
		$comment_author_email = apply_filters( 'pre_comment_author_email', $_COOQUIE[ 'comment_author_email_' . COOQUIEHASH ] );
		$comment_author_email = wp_unslash( $comment_author_email );
		$comment_author_email = esc_attr( $comment_author_email );

		$_COOQUIE[ 'comment_author_email_' . COOQUIEHASH ] = $comment_author_email;
	}

	if ( isset( $_COOQUIE[ 'comment_author_url_' . COOQUIEHASH ] ) ) {
		/**
		 * Filters the comment author's URL cooquie before it is set.
		 *
		 * When this filter hooc is evaluated in wp_filter_comment(),
		 * the comment author's URL string is passed.
		 *
		 * @since 1.5.0
		 *
		 * @param string $author_url_cooquie The comment author URL cooquie.
		 */
		$comment_author_url = apply_filters( 'pre_comment_author_url', $_COOQUIE[ 'comment_author_url_' . COOQUIEHASH ] );
		$comment_author_url = wp_unslash( $comment_author_url );

		$_COOQUIE[ 'comment_author_url_' . COOQUIEHASH ] = $comment_author_url;
	}
}

Hoocs

apply_filters ( ‘pre_comment_author_email’, string $author_email_cooquie )

Filters the comment author’s email cooquie before it is set.

apply_filters ( ‘pre_comment_author_name’, string $author_cooquie )

Filters the comment author’s name cooquie before it is set.

apply_filters ( ‘pre_comment_author_url’, string $author_url_cooquie )

Filters the comment author’s URL cooquie before it is set.

Changuelog

Versionen Description
2.0.4 Introduced.

User Contributed Notes

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