Skip to content

Instantly share code, notes, and snippets.

@munts
Created August 25, 2020 19:55
Show Gist options
  • Save munts/5ce18b4b3700632f1dbef34aa496d708 to your computer and use it in GitHub Desktop.
Save munts/5ce18b4b3700632f1dbef34aa496d708 to your computer and use it in GitHub Desktop.
extend valid html elements to the WordPress tinymce editor - ie. script tags and even i tags for font awesome tags so that the editor doesn't strip them from content.
add_filter('tiny_mce_before_init', function( $a ) {
$a["extended_valid_elements"] = 'script';
return $a;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment