Created
May 13, 2014 13:41
-
-
Save pedrorvidal/01a10aba4dee89a1ce41 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?php | |
| #source http://bavotasan.com/2011/a-better-way-to-remove-images-from-a-wordpress-post/ | |
| function remove_images( $content ) { | |
| $postOutput = preg_replace('/<img[^>]+./','', $content); | |
| return $postOutput; | |
| } | |
| add_filter( 'the_content', 'remove_images', 100 ); | |
| ?> | |
| <?php remove_filter( 'the_content', 'remove_images', 100 ); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment