Last active
June 23, 2016 09:02
-
-
Save chuckreynolds/730d63c90e50512bdffa04ac03589e77 to your computer and use it in GitHub Desktop.
Adds classes to attached images when saving a new image in the post editor. Doesn't add for old 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 | |
function foo_no_print_class( $class ) { | |
return $class . ' print-no'; | |
} | |
add_filter( 'get_image_tag_class', 'foo_no_print_class' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment