07/27/2017 at 3:22 pm
#430529
Keymaster
@ shanna
If you drop the code I gave in the theme’s functions file instead of using a Code Snippets as suggested, you need to after_setup_theme action instead of the plugins_loaded action to run the code. Like so:
add_action( 'after_setup_theme', 'cn_remove_code_pre_filters', 11 );
function cn_remove_code_pre_filters() {
remove_filter( 'content_save_pre', array( 'cnShortcode', 'clean' ) );
remove_filter( 'content_save_pre', array( 'cnShortcode', 'removeCodePreTags' ) );
}
The reason is that the plugins_loaded action has long since been fired and run by WP by the time the theme’s functions file is loaded so the code to remove the filters was never actually being run.
I edited the test site’s theme functions file to use the correct action. Removing those filters do remove the conflict as I suspected.
