Skip to content

Instantly share code, notes, and snippets.

View KimBranzell's full-sized avatar
👑

Kim Branzell KimBranzell

👑
View GitHub Profile
@jonkpirateboy
jonkpirateboy / chooseimagesize.php
Last active August 29, 2015 14:19
Make custom image sizes chooseable from admin
function fmd_image_sizes() {
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'bigger_thumbnail', 300, 300, true ); //will be visible in admin
add_image_size( 'carousel', 1300, 380, true ); //will not be visible in admin
}
}
add_action( 'init', 'fmd_image_sizes' );
function fmd_chooseable_image_sizes( $sizes ) {
return array_merge( $sizes, array(