wc_sanitize_tooltip( string $var )
Sanitize a string destined to be a tooltip.
Description Description
Parameters Parameters
- $var
-
(Required) Data to sanitize.
Return Return
(string)
Source Source
File: includes/wc-formatting-functions.php
function wc_sanitize_tooltip( $var ) {
return htmlspecialchars(
wp_kses(
html_entity_decode( $var ),
array(
'br' => array(),
'em' => array(),
'strong' => array(),
'small' => array(),
'span' => array(),
'ul' => array(),
'li' => array(),
'ol' => array(),
'p' => array(),
)
)
);
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.3.10 | Introduced. |