Returns an array of allowed HTML tags and attributes for a given context.
Renvoie un tableau des balises et attributs HTML autorisés pour un contexte donné.
$context = ''
Sortie :
@param string|array $context The context for which to retrieve tags. Allowed values are 'post', @return array Array of allowed HTML tags and their allowed attributes.
add_filter('wp_kses_allowed_html', 'allow_custom_html');
function allow_custom_html($tags, $context) {
if ('post' === $context) {
$tags['custom'] = array('id' => true, 'class' => true);
}
return $tags;
}
Chargement des actualités...