Last active
March 21, 2016 04:14
-
-
Save thomasgriffin/971e2ebc33118ea49bdc to your computer and use it in GitHub Desktop.
Remove lightbox image sizes generated by OptinMonster.
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_filter( 'intermediate_image_sizes', 'tgm_om_filter_image_sizes' ); | |
function tgm_om_filter_image_sizes( $sizes ) { | |
$om_sizes = array( 'optin-monster-lightbox-theme-balance', 'optin-monster-lightbox-theme-bullseye', 'optin-monster-lightbox-theme-case-study', 'optin-monster-lightbox-theme-clean-slate', 'optin-monster-lightbox-theme-transparent' ); | |
foreach ( $sizes as $i => $size ) { | |
if ( in_array( $size, $om_sizes ) ) { | |
unset( $sizes[ $i ] ); | |
} | |
} | |
return $sizes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment