Thread Starter
mp0001
(@mp0001)
I can also confirm I have tried the following code snippet:
add_filter( 'wp_kses_allowed_html', 'wt_cli_allow_custom_attributes', 20, 2);
function wt_cli_allow_custom_attributes($tags, $context)
{
$cli_allowed = array('data-*' => true);
if( isset($tags['a']) && is_array($tags['a']) ) {
$tags['a'] = array_merge($tags['a'], $cli_allowed);
}
return $tags;
}