WC_Settings_API::validate_text_field( string $key, string $value )

Validate Text Field.


Description Description

Make sure the data is escaped correctly, etc.


Parameters Parameters

$key

(Required) Field key.

$value

(Required) Posted Value.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-settings-api.php

	public function validate_text_field( $key, $value ) {
		$value = is_null( $value ) ? '' : $value;
		return wp_kses_post( trim( stripslashes( $value ) ) );
	}


Top ↑

User Contributed Notes User Contributed Notes

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