admin管理员组

文章数量:1130349

I am having a trouble in disabling formatting for specific shortcode. For example, I have:

[MyTag]"hi"[/MyTag]

However, the output is “hi“ (note the formatted quotes). I want to disable any kind of formatting (and keep untouched) everything for that shortcode. But the below:

remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'convert_chars');

completely removes formatting from content and all other shortcodes. I ONLY want to affect [MyTag] shortcodes only. How can i achieve that?

I am having a trouble in disabling formatting for specific shortcode. For example, I have:

[MyTag]"hi"[/MyTag]

However, the output is “hi“ (note the formatted quotes). I want to disable any kind of formatting (and keep untouched) everything for that shortcode. But the below:

remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'convert_chars');

completely removes formatting from content and all other shortcodes. I ONLY want to affect [MyTag] shortcodes only. How can i achieve that?

本文标签: How can I disable(remove) wpautop (wptexturizeconvertchars) for specific shortcodes only