wp_kses_one_attr

SummerySummery

Filters one HTML attribute and ensures its value is allowed.

Syntax

wp_kses_one_attr( string $string, string $element )

DescriptionDescription

This function can escape data in some situations where wp_kses() must strip the whole attribute.

ParametersParameters

$string

(string) (Required) The 'whole' attribute, including name and value.

$element

(string) (Required) The HTML element name to which the attribute belongs.

ReturnReturn

(string) Filtered attribute.

SourceSource

File: wp-includes/kses.php


			

ChangelogChangelog

Changelog
Version Description
4.2.3 Introduced.
Scroll to Top