In detail there’s the constant CUSTOM_TAGS
that allowes defining $allowedposttags, $allowedtags, $allowedentitynames
.
Then you can simply set CUSTOM_TAGS
to true and define the globals in a function hooked before kses gets included.
The first available hook to fire an action that defines $allowedposttags
would be muplugins_loaded
, but I don’t know if kses is loaded before or after it.
// Set custom tags to override $allowedposttags, $allowedtags, $allowedentitynames
if ( ! defined( 'CUSTOM_TAGS' ) )
define( 'CUSTOM_TAGS', true );
You also got the wp_kses_hook()
that contains a self explanatory filter:
apply_filters('pre_kses', $string, $allowed_html, $allowed_protocols);