wc_kses_notice()
Filters out the same tags as wp_kses_post, but allows tabindex for <a> element.
Hooks from the function
Return
String
.
Usage
wc_kses_notice( $message );
- $message(string) (required)
- Content to filter through kses.
Changelog
Since 3.5.0 | Introduced. |
wc_kses_notice() wc kses notice code WC 9.3.3
function wc_kses_notice( $message ) { $allowed_tags = array_replace_recursive( wp_kses_allowed_html( 'post' ), array( 'a' => array( 'tabindex' => true, ), ) ); /** * Kses notice allowed tags. * * @since 3.9.0 * @param array[]|string $allowed_tags An array of allowed HTML elements and attributes, or a context name such as 'post'. */ return wp_kses( $message, apply_filters( 'woocommerce_kses_notice_allowed_tags', $allowed_tags ) ); }