widgets['WP_Widget_Recent_Comments'])) { remove_action( 'wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style') ); } } // Remove injected CSS from gallery // ================================================================= // function bnw_gallery_style($css) { return preg_replace( "!!s", '', $css ); } // RANDOM CLEANUP ITEMS // ================================================================= // // remove the p from around imgs (http://css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/) function bnw_filter_ptags_on_images($content){ return preg_replace('/

\s*()?\s*()\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); }