add_filter('the_content', function( $content ){ //--Remove all inline styles-- $content = preg_replace('/ style=("|\')(.*?)("|\')/','',$content); return $content; }, 20);