Skip to content

Instantly share code, notes, and snippets.

@mehh
Created March 4, 2019 16:52
Show Gist options
  • Select an option

  • Save mehh/2dcb8cf57557b4a75f0945fe55bd015f to your computer and use it in GitHub Desktop.

Select an option

Save mehh/2dcb8cf57557b4a75f0945fe55bd015f to your computer and use it in GitHub Desktop.

Revisions

  1. mehh created this gist Mar 4, 2019.
    5 changes: 5 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    add_filter('the_content', function( $content ){
    //--Remove all inline styles--
    $content = preg_replace('/ style=("|\')(.*?)("|\')/','',$content);
    return $content;
    }, 20);