lundi 29 décembre 2014

Why is wp_kses not keeping style attributes as expected?


Here is my php code:



$allowed_html = array(
'div' => array(
'title' => array(),
'class' => array(),
'style' => array()
)
);

$str = '<div title='Click to continue' style='display:table'>This is a button</div>';
wp_kses($str, $allowed_html );


I want to keep the style attribute. $str is just an example.


Thank you, MMK.





Aucun commentaire:

Enregistrer un commentaire