开发者 |
fatih-toprak
optimisthub |
---|---|
更新时间 | 2023年2月8日 01:03 |
PHP版本: | 7.1 及以上 |
WordPress版本: | 6.1.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Yes, this can be done using the svg_allowed_attributes
and svg_allowed_tags
filters. They take one argument that must be returned.
`
add_filter( 'optimisthub_svg_enabler_allowed_attributes', function ( $attributes )
{
$attributes[] = 'target'; // This would allow the target="" attribute.
return $attributes;
} );
add_filter( 'optimisthub_svg_enabler_allowed_tags', function ( $tags )
{
$tags[] = 'use'; // This would allow the element.
return $tags;
} );
`