strip P tags off images wordpress

include in functions.php

function filter_ptags_on_images($content){
    return preg_replace('/

s*()?s*()s*()?s*

/iU', '123', $content); } add_filter('the_content', 'filter_ptags_on_images');
Advertisements