<?php

// show featured images in dashboard
add_image_size( 'admin-post-featured-image', 120, 120, false );

// Add the posts and pages columns filter. They both use the same function.
add_filter('manage_posts_columns', 'add_post_admin_thumbnail_column', 2);
add_filter('manage_pages_columns', 'add_post_admin_thumbnail_column', 2);

// Add the column
function add_post_admin_thumbnail_column($columns){
    $columns['thumb'] = __('Featured Image');
    return $columns;
}

// Manage Post and Page Admin Panel Columns
add_action('manage_posts_custom_column', 'show_post_thumbnail_column', 5, 2);
add_action('manage_pages_custom_column', 'show_post_thumbnail_column', 5, 2);

// Get featured-thumbnail size post thumbnail and display it
function show_post_thumbnail_column($columns, $id){
    switch($columns){
        case 'thumb':
        if( function_exists('the_post_thumbnail') ) {
            echo the_post_thumbnail( 'admin-post-featured-image' );
        }
        else
            echo 'hmm… your theme doesn\'t support featured image…';
        break;
    }
}