Example #1
0
 function comicpress_comic_feed()
 {
     global $post;
     $output = '<p>';
     $output .= '<a href="' . get_permalink() . '" title="' . comicpress_the_hovertext($post) . '">' . comicpress_display_comic_thumbnail('rss', $post, true) . '</a>';
     $output .= '</p>';
     return apply_filters('comicpress_comic_feed', $output);
 }
function ryuzine_display_comic()
{
    global $post;
    $output = '';
    // ComicPress 2.x
    if (function_exists('comicpress_the_hovertext')) {
        $comics = get_comic_path('comic', $post);
        if (is_array($comics)) {
            foreach ($comics as $comic) {
                $cdn_url = comicpress_themeinfo('cdn_url');
                if (!empty($cdn_url)) {
                    $thumbnail = trailingslashit($cdn_url) . comicpress_clean_url($comic);
                } else {
                    $thumbnail = comicpress_themeinfo('baseurl') . comicpress_clean_url($comic);
                }
                $hovertext = comicpress_the_hovertext($post);
            }
        }
    }
    // Comic Easel (ComicPress 4)
    if (function_exists('ceo_the_hovertext')) {
        $post_image_id = get_post_thumbnail_id($post->ID);
        if ($post_image_id) {
            // If there's a featured image.
            $hovertext = ceo_the_hovertext();
            $thumbnail = wp_get_attachment_image_src($post_image_id, 'full', false);
            if (is_array($thumbnail)) {
                $thumbnail = reset($thumbnail);
            }
        }
    }
    // MangaPress
    if (defined('MP_FOLDER')) {
        $post_image_id = get_post_thumbnail_id($post->ID);
        if ($post_image_id) {
            $hovertext = '';
            $thumbnail = wp_get_attachment_image_src($post_image_id, 'full', false);
            if (is_array($thumbnail)) {
                $thumbnail = reset($thumbnail);
            }
        }
    }
    $output .= '<img src="' . $thumbnail . '" alt="' . $hovertext . '" title="' . $hovertext . '" />';
    return apply_filters('ryuzine_display_comic', $output);
}
Example #3
0
 function comicpress_comic_clicks_next($output)
 {
     global $post, $wp_query;
     if (is_search() || is_archive() || is_feed()) {
         return $output;
     }
     $hovertext = comicpress_the_hovertext($post);
     $next_comic = comicpress_get_next_comic_permalink();
     $class = '';
     if (comicpress_themeinfo('rascal_says')) {
         $the_title = get_the_title($post);
         $class = 'class="tt"';
     } else {
         $the_title = comicpress_the_hovertext($post);
     }
     $output = "<a {$class} href=\"{$next_comic}\" title=\"{$the_title}\">{$output}</a>\r\n";
     return $output;
 }