Created
May 13, 2018 16:06
-
-
Save smartdeal/bb8c39795a70bb244c3a357c1881bc39 to your computer and use it in GitHub Desktop.
[Remove default image sizes] #WP #WP_functions
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
/wp-admin/options.php | |
medium_large_size_w | |
function dco_remove_default_image_sizes( $sizes) { | |
return array_diff( $sizes, array( | |
'thumbnail', | |
'medium', | |
'medium_large', | |
'large', | |
) ); | |
} | |
add_filter('intermediate_image_sizes', 'dco_remove_default_image_sizes'); | |
add_action('after_setup_theme', function() { | |
echo '<pre>'; | |
print_r(wp_get_additional_image_sizes()); | |
echo '</pre>'; | |
die(); | |
}, 999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment