I have a few custom thumbnail sizes and obviously one of them is used in the set_post_thumbnail_size, what directly affects the interface in the admin area.
What I’m looking to do is to intercept which admin page (for post-type) I’m in and set a different size in the above function, so basically I’d like to have that:
function setup_the_theme() {
add_theme_support( 'post-thumbnails' );
if ($post_type == 'type_A'){
set_post_thumbnail_size( 298, 167, true ); //portrait
} else {
set_post_thumbnail_size( 192, 108, true ); //landscape
}
add_image_size( 'top_articles', 298, 167, true ); //portrait
add_image_size( 'article_thumb', 203, 114, true ); //portrait
add_image_size( 'featured_articles', 60, 200, true ); //landscape
}
add_action( 'after_setup_theme', 'setup_the_theme' );
I suspect its too early in the cycle to know which post type i’m editing.