ACF_Admin::clear_escaped_html_log │ public │ ACF 6.2.5

Clear the escaped unsafe HTML log.

Method of the class: ACF_Admin{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ACF_Admin = new ACF_Admin();
$ACF_Admin->clear_escaped_html_log();

Changelog

Since 6.2.5 Introduced.

ACF_Admin::clear_escaped_html_log() code ACF 6.8.8

public function clear_escaped_html_log() {
	if ( empty( $_GET['acf-clear-esc-html-log'] ) ) {
		return;
	}

	$nonce = sanitize_text_field( wp_unslash( $_GET['acf-clear-esc-html-log'] ) );

	if (
		! wp_verify_nonce( $nonce, 'acf/clear_escaped_html_log' ) ||
		! current_user_can( acf_get_setting( 'capability' ) )
	) {
		return;
	}

	_acf_delete_escaped_html_log();

	wp_safe_redirect( remove_query_arg( 'acf-clear-esc-html-log' ) );
	exit;
}