WordPress.org

Ready to get started?Download WordPress

Plugin Directory

L//H WPAUTOP Extended

A small extension to the current wpautop function for the occasional need to prevent a certain HTML tags to be wrapped in paragraphs.

This plugin basically just consists of one function, that extends the functionality of WordPress own wpautop function.

On several occasions a theme developer might feel the need, that a certain HTML Tag should not be wrapped in paragraphs. This plugin deactivates the standard wpautop function and replaces it with an extended version of that plugin. Upon activation of this plugin you'll have access to the 'lh_wpautop_block_elements' filter, which gives you the ability to extend, modify and enhance the array of standard elements, which are per default not wrapped in <p> tags.

With that plugin you could place this function into the theme functions.php, Images and Iframes will no longer be wrapped in paragraphs.

<?php 
function add_block_elements($block_elements){
        $block_elements[] = "iframe";
        $block_elements[] = "img";

        return $block_elements;
}
add_filter("wpautop_block_elements", add_block_elements);
?>

This Plugin is brought to you by Luehrsen // Heinrich

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-1-9
Downloads: 233

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1