Automattic\WooCommerce\EmailEditor\Integrations\Utils
Html_Processing_Helper::get_allowed_caption_html
Elements and attributes allowed in captions, in wp_kses() format.
Attribute values are narrowed further by validate_caption_attribute().
Method of the class: Html_Processing_Helper{}
No Hooks.
Returns
array<string,. array<string, bool>> Allowed HTML for wp_kses().
Usage
$result = Html_Processing_Helper::get_allowed_caption_html(): array;
Html_Processing_Helper::get_allowed_caption_html() Html Processing Helper::get allowed caption html code WC 11.1.2
private static function get_allowed_caption_html(): array {
$common_attributes = array(
'class' => true,
'style' => true,
'data-*' => true,
);
return array(
'a' => array_merge(
$common_attributes,
array(
'href' => true,
'target' => true,
'rel' => true,
)
),
'br' => $common_attributes,
'em' => $common_attributes,
'kbd' => $common_attributes,
'mark' => $common_attributes,
's' => $common_attributes,
'span' => $common_attributes,
'strong' => $common_attributes,
'sub' => $common_attributes,
'sup' => $common_attributes,
);
}