function ceo_display_comic($size = 'full')
{
    global $post;
    if (post_password_required()) {
        return __('This comic is password protected.', 'comiceasel');
    }
    $output = '';
    if (ceo_the_above_html()) {
        $output .= html_entity_decode(ceo_the_above_html()) . "\r\n";
    }
    if ($motion_artist_comic = get_post_meta($post->ID, 'ma-directory', true)) {
        $output .= ceo_display_motion_artist_comic($motion_artist_comic);
    } elseif ($flash_file = get_post_meta($post->ID, "flash_file", true)) {
        $output .= ceo_display_flash_comic($post, $flash_file);
    } elseif (($media_url = get_post_meta($post->ID, 'media_url', true)) && !defined('CEO_FEATURE_MEDIA_EMBED')) {
        $output .= '<center>';
        global $content_width;
        $old_content_width = $content_width;
        $media_width = get_post_meta($post->ID, 'media_width', true);
        if (!empty($media_width)) {
            $content_width = $media_width;
        }
        $output .= wp_oembed_get($media_url);
        $content_width = $old_content_width;
        $output .= '</center>';
    } else {
        $comic_galleries = get_post_meta($post->ID, 'comic-gallery', true);
        if ($comic_galleries) {
            $output .= ceo_display_comic_gallery($size);
        } else {
            $output .= ceo_display_featured_image_comic($size);
        }
    }
    if (ceo_the_below_html()) {
        $output .= html_entity_decode(ceo_the_below_html()) . "\r\n";
    }
    if ($output) {
        return apply_filters('ceo_comics_display_comic', $output);
    } else {
        return apply_filters('ceo_comics_display_comic', __('<!-- No HTML, Gallery, Motion Artist Comic or Featured Image Found. //-->', 'comiceasel'));
    }
}
function ceo_display_comic($size = 'full')
{
    global $post;
    if (post_password_required()) {
        return __('This comic is password protected.', 'comiceasel');
    }
    $refer_only = get_post_meta($post->ID, 'refer-only', 'true');
    if (!empty($refer_only) && !defined('CEO_DISABLE_REFER_ONLY')) {
        $ref_only_msg = '';
        $refer_only_msg = get_post_meta($post->ID, 'refer-only-msg', 'true') ? get_post_meta($post->ID, 'refer-only-msg', 'true') : __('Read post message below to find out how to view this.', 'comic-easel');
        if (ceo_get_referer() !== $refer_only) {
            return apply_filters('ceo_refer_only_msg', $refer_only_msg);
        }
    }
    $output = '';
    if (ceo_the_above_html()) {
        $output .= html_entity_decode(ceo_the_above_html()) . "\r\n";
    }
    if ($flash_file = get_post_meta($post->ID, "flash_file", true)) {
        $output .= ceo_display_flash_comic($post, $flash_file);
    } elseif (($media_url = get_post_meta($post->ID, 'media_url', true)) && !defined('CEO_FEATURE_MEDIA_EMBED')) {
        $output .= '<center>';
        global $content_width;
        $old_content_width = $content_width;
        $media_width = get_post_meta($post->ID, 'media_width', true);
        if (!empty($media_width)) {
            $content_width = $media_width;
        }
        $output .= wp_oembed_get($media_url);
        $content_width = $old_content_width;
        $output .= '</center>';
    } else {
        $comic_galleries = get_post_meta($post->ID, 'comic-gallery', true);
        if ($comic_galleries) {
            $output .= ceo_display_comic_gallery($size);
        } else {
            $output .= ceo_display_featured_image_comic($size);
        }
    }
    if (ceo_the_below_html()) {
        $output .= html_entity_decode(ceo_the_below_html()) . "\r\n";
    }
    if ($output) {
        return apply_filters('ceo_comics_display_comic', $output);
    } else {
        return apply_filters('ceo_comics_display_comic', __('<!-- No HTML, Gallery or Featured Image Found. //-->', 'comiceasel'));
    }
}