Created
June 19, 2012 13:33
-
-
Save nacin/2954193 to your computer and use it in GitHub Desktop.
HTML Category Descriptions
This file contains 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
<?php | |
add_action( 'init', 'jquery_unfiltered_html_for_term_descriptions' ); | |
add_action( 'set_current_user', 'jquery_unfiltered_html_for_term_descriptions' ); | |
function jquery_unfiltered_html_for_term_descriptions() { | |
remove_filter( 'pre_term_description', 'wp_filter_kses' ); | |
remove_filter( 'pre_term_description', 'wp_filter_post_kses' ); | |
if ( ! current_user_can( 'unfiltered_html' ) ) | |
add_filter( 'pre_term_description', 'wp_filter_post_kses' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment