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.

Author:Hendrik Luehrsen (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:3.5
Plugin version:1.0
Added to WordPress repository:09-01-2013
Last updated:09-01-2013
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://www.wordpress.org/
Total downloads:518
Active installs:10+
plugin download
Click to start download

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