• Is there a way to remove kses filter via plugin, without hacking code?

    I tryed
    remove_filter(‘content_save_pre’, ‘wp_filter_post_kses’);

    But it’s not working, and wp_filter_post_kses is still called

    I also tryed to use

    add_action(‘init’,’kses_remove_filters’);

    But nothing happened.

    I need to extend allowed protocols, but the call at wp_kses (inside wp_filter_post_kses) use the original array ($allowed_protocols) that is not global, so to do that I was tryng to override the original call.

    Also a way to extend $allowed_protocols is a solution for me..

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • alpha2zee

    (@alpha2zee)

    Try using htmLawed, a highly modified version of the kses filter with many extra features.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    remove_filter would work, if you called it in the right place. kses is not turned on until the init filter.

    Anyway, this should work. The key is to delay it until after the init action hook enables kses.

    function disable_kses_content() {
    remove_filter('content_save_pre', 'wp_filter_post_kses');
    }
    add_action('init','disable_kses_content',20);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘remove kses filter’ is closed to new replies.