<?php



//update_option('large_size_w', 1024);
//update_option('large_size_h', 768);
//update_option('large_size_crop', 1);


//update_option('medium_large_size_w', 768);
//update_option('medium_large_size_h', 576);
//update_option('medium_large_size_crop', 1);

//update_option('medium_size_w', 450);
//update_option('medium_size_h', 337);
//update_option('medium_size_crop', 1);


//update_option('thumbnail_size_w', 100);
//update_option('thumbnail_size_h', 75);
//update_option('thumbnail_size_crop', 1);

add_action('init', 'remove_select_image_sizes');


function remove_select_image_sizes()
{
    foreach (get_intermediate_image_sizes() as $size) {
        if (!in_array($size, array('large', 'medium_large', 'medium'))) {
            remove_image_size($size);
        }
    }


    add_image_size('large', 1920, 1440, true);
    add_image_size('medium_large', 1024, 768, true);
    add_image_size('medium', 768, 576, true);
    add_image_size('thumbnail', 450, 337, true);



}
