WC_Settings_API::validate_textarea_field( string $key, string $value )
Validate Textarea Field.
Description Description
Parameters Parameters
- $key
-
(Required) Field key.
- $value
-
(Required) Posted Value.
Return Return
(string)
Source Source
File: includes/abstracts/abstract-wc-settings-api.php
public function validate_textarea_field( $key, $value ) {
$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' )
)
);
}