WordPress at Your Fingertips
function is not described

WC_REST_Controller::validate_setting_textarea_field() public WC 3.0.0

Validate textarea based settings.

{} It's a method of the class: WC_REST_Controller{}

No Hooks.

Return

String.

Usage

$WC_REST_Controller = new WC_REST_Controller();
$WC_REST_Controller->validate_setting_textarea_field( $value, $setting );
$value(string) (required)
Value.
$setting(array) (required)
Setting.

Changelog

Since 3.0.0 Introduced.

Code of WC_REST_Controller::validate_setting_textarea_field() WC 5.9.0

public function validate_setting_textarea_field( $value, $setting ) {
	$value = is_null( $value ) ? '' : $value;
	return wp_kses(
		trim( stripslashes( $value ) ),
		array_merge(
			array(
				'iframe' => array(
					'src'   => true,
					'style' => true,
					'id'    => true,
					'class' => true,
				),
			),
			wp_kses_allowed_html( 'post' )
		)
	);
}