Plugin: Remove wpautop, wptexturize with a shortcode
-
Intro
I just started using WP and am very bothered by the auto-formatting of my posts. I wanted to make a post demonstrating some jQuery techniques but I couldn’t get the code to execute in my post. I also couldn’t find a good way to remove the auto-formatting for just a section of my post. The inline-javascript plugin seemed to work but it messed up existing posts that were using the SyntaxHighlighter Evolved plugin to display sourcecode.
So I wrote this plugin to try and solve the problem. As far as I can tell it works, but I’ve never written a wordpress plugin before so I would LOVE any feedback.
Some specific questions I have…
- Can you find any problems with my code?
- Is there already a plugin that does this better? (If so what is it)
- Is this useful to anyone else? (If so should I submit it to the plugin directory?)
Plugin Info
WP-Raw can be downloaded here (if people actually start using it I’ll make a proper home for it)
To use the plugin just wrap whatever text you don’t want wpautop() and wptexturize() applied to in a [raw] shortcode, like [raw]this[/raw].
Note: There’s a real-world example in the docs.txt in the download.
[ Moderator Note: Using a raw shortcode or shortcodes that remove auto formatting will cause plugin incompatibility and prevent you from using any other shortcodes. See https://theandystratton.com/2011/shortcode-autoformatting-html-with-paragraphs-and-line-breaks for more information. ]
- The topic ‘Plugin: Remove wpautop, wptexturize with a shortcode’ is closed to new replies.