WP_Customize_Setting::sanitize( string|array $value )

Sanitize an input.


Description Description


Parameters Parameters

$value

(string|array) (Required) The value to sanitize.


Top ↑

Return Return

(string|array|null|WP_Error) Sanitized value, or null/WP_Error if invalid.


Top ↑

Source Source

File: wp-includes/class-wp-customize-setting.php

	public function sanitize( $value ) {

		/**
		 * Filters a Customize setting value in un-slashed form.
		 *
		 * @since 3.4.0
		 *
		 * @param mixed                $value Value of the setting.
		 * @param WP_Customize_Setting $this  WP_Customize_Setting instance.
		 */
		return apply_filters( "customize_sanitize_{$this->id}", $value, $this );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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