Created
November 28, 2011 22:45
-
-
Save pdewouters/1402439 to your computer and use it in GitHub Desktop.
wrap all post content images with extra tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// behold the magic of regular expressions | |
// goes with http://www.cssplay.co.uk/menu/css3-photo-curl.html | |
function chiro_filter_images($content){ | |
return preg_replace('/<img (.*) \/>\s*/iU', '<b class="curl"><b><img \1 /></b></b>', $content); | |
} | |
add_filter('the_content', 'chiro_filter_images'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment