Created
April 30, 2015 12:57
-
-
Save thadallender/9c73546ebd01e3782fe3 to your computer and use it in GitHub Desktop.
Add classes to images on single entries in Sell Media
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 | |
/** | |
* Add more classes to main images appearing on single entries in Sell Media. | |
* Change 'lightbox' below to whatever classes you want to add. | |
*/ | |
function sell_media_filter_single_image_class( $classes ) { | |
if ( is_singular( 'sell_media_item' ) ) { | |
$classes[] = 'lightbox'; | |
} | |
return $classes; | |
} | |
add_filter( 'sell_media_image_class', 'sell_media_filter_single_image_class' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment