Why is wp_kses not keeping style attributes as expected?
This is an older question, but here’s the answer for future generations: WordPress will check the styles against a list of allowed properties and it will still strip the style attribute if none of the styles are safe. The default allow list is: text-align margin color float border background background-color border-bottom border-bottom-color border-bottom-style border-bottom-width border-collapse … Read more