WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp kses check attr val

Description

Performs different checks for attribute values.

The currently implemented checks are 'maxlen', 'minlen', 'maxval', 'minval' and 'valueless' with even more checks to come soon.

Usage

<?php wp_kses_check_attr_val$value$vless$checkname$checkvalue ?>

Parameters

$value
(string) (required) Attribute value
Default: None
$vless
(string) (required) Whether the value is valueless or not. Use 'y' or 'n'
Default: None
$checkname
(string) (required) What $checkvalue is checking for.
Default: None
$checkvalue
(mixed) (required) What constraint the value should pass
Default: None

Return Values

(boolean) 
Whether check passes (true) or not (false)

Examples

Notes

Change Log

Since: 1.0.0

Source File

wp_kses_check_attr_val() is located in wp-includes/kses.php.

Related

See also index of Function Reference and index of Template Tags.