Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 function widget($args, $instance)
 {
     global $wp_query, $post;
     Protect();
     extract($args, EXTR_SKIP);
     $this_post_id = $post->ID;
     // Check if the category is a comic category.
     $in_comic_cat = false;
     if (comicpress_in_comic_category(array($instance['thumbcat'])) > 0) {
         $in_comic_cat = true;
     }
     if ($instance['first']) {
         $order = 'ASC';
     } else {
         $order = 'DESC';
     }
     $comic_query = 'showposts=1&order=' . $order . '&cat=' . $instance['thumbcat'];
     if ($instance['random']) {
         $comic_query .= '&orderby=rand';
     }
     if (!empty($post) && $instance['random']) {
         $comic_query .= '&exclude=' . $post->ID;
     }
     $found_posts =& get_posts($comic_query);
     $archive_image = null;
     foreach ($found_posts as $post) {
         setup_postdata($post);
         $temp_query = $wp_query->is_single;
         $wp_query->is_single = true;
         if ($in_comic_cat) {
             echo $before_widget;
             $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
             if (!empty($title)) {
                 echo $before_title . $title . $after_title;
             }
             echo "<a href=\"" . get_permalink($post->ID) . "\" title=\"" . $post->post_title . "\">" . comicpress_display_comic_thumbnail('mini', $post, true, 0, false) . "</a>\r\n";
             echo $after_widget;
         } else {
             if (function_exists('has_post_thumbnail')) {
                 if (has_post_thumbnail($post->ID)) {
                     echo $before_widget;
                     $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
                     if (!empty($title)) {
                         echo $before_title . $title . $after_title;
                     }
                     echo "<a href=\"" . get_permalink($post->ID) . "\" rel=\"bookmark\" title=\"Permanent Link to " . get_the_title() . "\">" . get_the_post_thumbnail($post->ID, 'medium') . "</a>\r\n";
                     echo $after_widget;
                 }
             }
         }
         $wp_query->is_single = $temp_query;
         $temp_query = null;
     }
     UnProtect();
 }
Ejemplo n.º 3
0
    function comicpress_display_the_content($is_comic = false)
    {
        global $post, $wp_query;
        if (is_archive() || is_search()) {
            if ($is_comic) {
                ?>
				<div class="comicarchiveframeinpost">
					<a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                echo comicpress_display_comic_thumbnail('archive', $post, true);
                ?>
</a>
				</div>
			<?php 
            }
            if (comicpress_themeinfo('excerpt_or_content_archive') != 'excerpt' && $post->post_type == 'post') {
                the_content(__('&darr; Read the rest of this entry...', 'comicpress'));
            } else {
                the_excerpt();
            }
        } else {
            if (!is_single()) {
                global $more;
                $more = 0;
            }
            the_content(__('&darr; Read the rest of this entry...', 'comicpress'));
            if (comicpress_themeinfo('transcript_in_posts') && $is_comic) {
                comicpress_the_transcript('styled');
            }
        }
        wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">Pages:</span> ', 'after' => '</div>', 'next_or_number' => 'number'));
    }
Ejemplo n.º 4
0
					<div class="comicthumbdate"><?php 
            echo get_the_time('M jS, Y');
            ?>
</div>
					<div class="comicarchiveframe" style="width: <?php 
            echo $mini_comic_width;
            ?>
px;">
						<a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            echo the_title();
            ?>
"><?php 
            echo comicpress_display_comic_thumbnail('mini', $post, true);
            ?>
</a><br />
					</div>
				</div>
				<?php 
        }
        ?>
				<div class="clear"></div>
			</div>
			<?php 
        if (comicpress_themeinfo('enable_caps')) {
            ?>
<div class="post-foot"></div><?php 
        }
        ?>
Ejemplo n.º 5
0
<br />
			<?php 
    _e('Print Status: ', 'comicpress');
    echo $buyprint_status;
    ?>
<br />
	<?php 
    if (comicpress_themeinfo('buy_print_sell_original')) {
        _e('Original Status: ', 'comicpress');
        echo $buyorig_status . "<br />\r\n";
    }
    ?>
			<br />
			<div class="print-thumbnail">
			<?php 
    echo comicpress_display_comic_thumbnail('archive', $post);
    ?>
			</div>
			<table class="buystriptable">
			<tr>
				<td align="left" valign="top">
					<div class="buyprint-us-form">
					<h4 class="buyprint-title">Print</h4>
						$<?php 
    echo $buy_print_amount;
    ?>
<br />
					<?php 
    if ($buyprint_status == 'Available') {
        ?>