Created
June 29, 2019 08:14
-
-
Save colettesnow/a1cb64ca244ebe377667fa70653a8374 to your computer and use it in GitHub Desktop.
WordPress snippet: Disable pining to Pinterest of post content images.
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
<?php | |
add_filter( 'the_content', function( $content ) { | |
return str_replace( '<img ', '<img nopin="nopin" ', $content ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment