Last active
January 4, 2026 00:13
-
-
Save jsit/8724cf8e56a3e9aaf8e6efa1cff0e6b8 to your computer and use it in GitHub Desktop.
Allow WordPress editors to post unfiltered HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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