Created
March 28, 2018 18:31
-
-
Save zmonteca/c4559db1af046a47ac0172eb25a484a3 to your computer and use it in GitHub Desktop.
wp_calculate_image_sizes
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 | |
function _s_silence_content_image_sizes_attr($size, $image_src) | |
{ | |
if (get_page_template_slug() === 'template-full_width.php') { | |
//Do something here | |
} | |
if (!is_array($size) && $size == 'hero-image') { | |
return false; | |
} | |
} | |
add_filter('wp_calculate_image_sizes', '_s_silence_content_image_sizes_attr', 10 , 2); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment