Skip to content

Instantly share code, notes, and snippets.

@jsit
Last active April 17, 2017 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsit/8724cf8e56a3e9aaf8e6efa1cff0e6b8 to your computer and use it in GitHub Desktop.
Save jsit/8724cf8e56a3e9aaf8e6efa1cff0e6b8 to your computer and use it in GitHub Desktop.
Allow WordPress editors to post unfiltered HTML
function allow_editors_to_post_html() {
$role_object = get_role( 'editor' );
$role_object->add_cap( 'unfiltered_html' );
}
add_filter( 'admin_init', 'allow_editors_to_post_html' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment