function build_zappbars($value, $layout, $position, $paged) { global $post; $xtra = ''; if ($position == null) { $position = 'top'; } $zb_name = array('button_a', 'button_b', 'button_c', 'button_d', 'button_e'); $html = '<div class="zappbar zb-' . $layout . ' ' . $position . '">'; $x = 0; foreach ($value as $val) { $html .= '<div class="zb ' . $zb_name[$x] . ' integrated-webcomic">'; if (array_filter($paged)) { if (function_exists('comicpress_display_comic') && comicpress_themeinfo('archive_display_order') == "asc") { $first_page = $paged[0]; $last_page = $paged[3]; } else { if (function_exists('comicpress_display_comic') && comicpress_themeinfo('archive_display_order') == "desc") { $first_page = $paged[3]; $last_page = $paged[0]; } else { $first_page = $paged[3]; $last_page = $paged[0]; } } if ($val[2] == 'first_page') { $val[2] = $first_page; } else { if ($val[2] == 'prev_page') { $val[2] = $paged[1]; } else { if ($val[2] == 'next_page') { $val[2] = $paged[2]; } else { if ($val[2] == 'last_page') { $val[2] = $last_page; } else { } } } } } if (get_post_type() == 'comic' || function_exists('ceo_pluginfo')) { if (ceo_pluginfo('navigate_only_chapters')) { if ($val[2] == 'prev_chapter') { $val[2] = ceo_get_previous_chapter(); } else { if ($val[2] == 'first_comic') { $val[2] = ceo_get_first_comic_in_chapter_permalink(); } else { if ($val[2] == 'prev_comic') { $val[2] = ceo_get_previous_comic_in_chapter_permalink(); } else { if ($val[2] == 'next_comic') { $val[2] = ceo_get_next_comic_in_chapter_permalink(); } else { if ($val[2] == 'last_comic') { $val[2] = ceo_get_last_comic_in_chapter_permalink(); } else { if ($val[2] == 'next_chapter') { $val[2] = ceo_get_next_chapter(); } else { if ($val[2] == 'comic_archive') { $val[2] = get_site_url() . '/comic'; } else { } } } } } } } } else { if ($val[2] == 'prev_chapter') { $val[2] = ceo_get_previous_chapter(); } else { if ($val[2] == 'first_comic') { $val[2] = ceo_get_first_comic_permalink(); } else { if ($val[2] == 'prev_comic') { $val[2] = ceo_get_previous_comic_permalink(); } else { if ($val[2] == 'next_comic') { $val[2] = ceo_get_next_comic_permalink(); } else { if ($val[2] == 'last_comic') { $val[2] = ceo_get_last_comic_permalink(); } else { if ($val[2] == 'next_chapter') { $val[2] = ceo_get_next_chapter(); } else { if ($val[2] == 'comic_archive') { $val[2] = get_site_url() . '/comic'; } else { } } } } } } } } } if (function_exists('comicpress_display_comic')) { if ($val[2] == 'prev_chapter') { $val[2] = comicpress_get_previous_storyline_start_permalink(); } else { if ($val[2] == 'first_comic') { $val[2] = comicpress_get_first_comic_permalink(); } else { if ($val[2] == 'prev_comic') { $val[2] = comicpress_get_previous_comic_permalink(); } else { if ($val[2] == 'next_comic') { $val[2] = comicpress_get_next_comic_permalink(); } else { if ($val[2] == 'last_comic') { $val[2] = comicpress_get_last_comic_permalink(); } else { if ($val[2] == 'next_chapter') { $val[2] = comicpress_get_next_storyline_start_permalink(); } else { if ($val[2] == 'comic_archive') { $val[2] = get_site_url() . '/?cat=' . comicpress_themeinfo('comiccat') . '/'; } else { } } } } } } } } if (preg_match('/webcomic/', get_post_type())) { // Yes, this is a very convoluted way of getting the URLs if ($val[2] == 'prev_chapter') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[previous_webcomic_storyline_link]'), $matches); $val[2] = $matches[2][0]; } else { if ($val[2] == 'first_comic') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[first_webcomic_link]'), $matches); $val[2] = $matches[2][0]; } else { if ($val[2] == 'prev_comic') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[previous_webcomic_link]'), $matches); $val[2] = $matches[2][0]; } else { if ($val[2] == 'next_comic') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[next_webcomic_link]'), $matches); $val[2] = $matches[2][0]; } else { if ($val[2] == 'last_comic') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[last_webcomic_link]'), $matches); $val[2] = $matches[2][0]; } else { if ($val[2] == 'next_chapter') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[next_webcomic_storyline_link]'), $matches); $val[2] = $matches[2][0]; } else { if ($val[2] == 'comic_archive') { preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', do_shortcode('[the_webcomic_collections]'), $matches); $val[2] = $matches[2][0]; } else { } } } } } } } } if (class_exists('woocommerce') && (is_product() || is_cart() || is_checkout() || is_account_page())) { global $woo_options, $woocommerce; if ($val[2] == 'woo_store') { $val[2] = get_permalink(woocommerce_get_page_id('shop')); } if ($val[2] == 'woo_cart' && (is_product() || is_cart() || is_checkout() || is_account_page())) { $val[2] = $woocommerce->cart->get_cart_url(); $cartcount = sprintf(_n('%d', '%d', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count); $label = '<span class="amount">' . $woocommerce->cart->get_cart_total() . '</span>'; if ($cartcount != '0') { $label .= '<span class="contents">' . $cartcount . '</span>'; } $val[1] = $label; } else { if ($val[2] == 'woo_review' && is_product()) { global $product; if (get_option('woocommerce_enable_review_rating') === 'yes' && ($count = $product->get_rating_count())) { $val[1] = $val[1] . '<span class="contents">' . $count . '</span>'; } } else { if ($val[2] == 'woo_account' && (is_product() || is_cart() || is_checkout() || is_account_page())) { $val[2] = get_permalink(get_option('woocommerce_myaccount_page_id')); if (is_user_logged_in()) { $who = wp_get_current_user(); if (strlen($who->display_name) > 10) { $val[1] = __('Account', 'woothemes'); } else { $val[1] = $who->display_name; } } else { $val[1] = __('Login', 'woothemes'); } } else { if (in_array($val[2], array('woo_search', 'woo_search_left', 'woo_search_right'))) { if ($val[2] == 'woo_search_left') { $shift = ' left'; } else { if ($val[2] == 'woo_search_right') { $shift = ' right'; } else { $shift = ' center'; } } $xtra = " searchbox" . $shift; $val[1] = $val[1] . '</span><span class="search out"> <form role="search" method="get" action="' . esc_url(home_url('/')) . '"> <label class="screen-reader-text" for="s">' . __('Search Products:', 'woothemes') . '</label> <input type="search" results=5 autosave="' . esc_url(home_url('/')) . '" class="input-text" placeholder="' . esc_attr__('Search Products', 'woothemes') . '" value="' . get_search_query() . '" name="s" /> <input type="submit" class="button" value="' . esc_attr__('Search', 'woothemes') . '" /> <input type="hidden" name="post_type" value="product" /> </form> </span>'; } else { } } } } } if ($val[2] == 'appmenu_left') { global $left_appmenu; $left_appmenu = 1; } if ($val[2] == 'appmenu_right') { global $right_appmenu; $right_appmenu = 1; } if ($val[2] == 'sidebar_left') { global $left_sidebar; $left_sidebar = 1; } if ($val[2] == 'sidebar_right') { global $right_sidebar; $right_sidebar = 1; } if ($val[2] == 'custom_email') { $zb_social = get_option('zappbar_social'); $val[2] = 'mailto:' . $zb_social['email_address']; } if ($val[2] == 'blogposts') { $cats = get_categories(); $pls = get_option('permalink_structure'); /* Page title is usually "Category Archives: First_Category_Name" but we want to trick it to only say "Category Archives:" so we inject cat_ID=1000 or category slug "all" which most likely do not exist, which leaves the name part of the title blank */ if ($pls == '') { $category = '/?cat=1000,'; } else { if ($pls == '/archives/%post_id%') { $category = '/archives/category/all,'; } else { $category = '/category/all,'; } } $val[2] = esc_url(home_url()) . $category; $c = 0; foreach ($cats as $cat) { if ($pls == '') { $val[2] .= $cat->cat_ID; } else { $val[2] .= $cat->slug; } if ($c < count($cats) - 1) { $val[2] .= ','; } $c++; } $val[2] .= '/'; } if ($val[2] == 'ryuzine_rack') { $val[2] = esc_url(home_url()) . '/ryuzine-rack/'; } if (in_array($val[2], array('search_box', 'search_left', 'search_right'))) { if ($val[2] == 'search_left') { $shift = ' left"'; } else { if ($val[2] == 'search_right') { $shift = ' right"'; } else { $shift = ' center'; } } $xtra = " searchbox" . $shift; $val[1] = $val[1] . '</span><span class="search out"> <form role="search" method="get" class="search-form" action="' . home_url('/') . '"> <label> <span class="screen-reader-text">Search for:</span> <input type="search" results=5 class="input-text" placeholder="Search Site" value="" name="s" title="Search for:" /> </label> <input type="submit" class="search-submit" value="Search" /> </form> </span>'; } // now all the share options if ($val[2] == 'commentform') { if (get_comments_number() > 0) { $count = '<span class="contents">' . get_comments_number() . '</span>'; } else { $count = ''; } $val[1] = $val[1] . $count; } else { if ($val[2] == 'share_this') { global $share_panel; $share_panel = 1; } else { if ($val[2] == 'share_fb') { $val[2] = 'http://www.facebook.com/sharer.php?u=' . urlencode(get_permalink($post->ID)) . '&t=' . urlencode(get_the_title($post->ID)) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_twitter') { $val[2] = 'http://twitter.com/share?text=' . urlencode(get_the_title($post->ID)) . '&url=' . urlencode(wp_get_shortlink($post->ID)) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_gplus') { $val[2] = 'https://plus.google.com/share?url=' . urlencode(get_permalink($post->ID)); $xtra = ' zb-social'; } else { if ($val[2] == 'share_reddit') { $val[2] = 'http://www.reddit.com/submit?url=' . urlencode(get_permalink($post->ID)) . '&title=' . urlencode(get_the_title($post->ID)) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_stumble') { $val[2] = 'http://www.stumbleupon.com/submit?url=' . urlencode(get_permalink($post->ID)) . '&title=' . urlencode(get_the_title($post->ID)) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_digg') { $val[2] = 'http://digg.com/submit?url=' . urlencode(get_permalink($post->ID)) . '&title=' . urlencode(get_the_title($post->ID)) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_linkedin') { $val[2] = 'http://www.linkedin.com/shareArticle?mini=true&title=' . urlencode(get_the_title($post->ID)) . '&url=' . urlencode(wp_get_shortlink($post->ID)) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_pinterest') { $val[2] = 'http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink($post->ID)) . '&media=' . urlencode(wp_get_attachment_url(get_post_thumbnail_id($post->ID))) . ''; $xtra = ' zb-social'; } else { if ($val[2] == 'share_delicious') { $val[2] = 'http://del.icio.us/post?url=' . urlencode(get_permalink($post->ID)) . '&title=' . urlencode(get_the_title($post->ID)) . ''; $xtra = ' zb-social'; } else { } } } } } } } } } } } $icon = explode('|', $val[0]); $html .= '<a href="' . $val[2] . '" class="button' . $xtra . '" target="_self"><div class="icon ' . $icon[0] . ' ' . $icon[1] . '"></div><br/><span class="zb-label">' . $val[1] . '</span></a>'; $html .= '</div>'; $x++; } $html .= '</div>'; echo $html; }
function ceo_display_comic_navigation() { global $post, $wp_query; if (ceo_pluginfo('navigate_only_chapters')) { $first_comic = ceo_get_first_comic_in_chapter_permalink(); $last_comic = ceo_get_last_comic_in_chapter_permalink(); $next_comic = ceo_get_next_comic_in_chapter_permalink(); $prev_comic = ceo_get_previous_comic_in_chapter_permalink(); } else { $first_comic = ceo_get_first_comic_permalink(); $last_comic = ceo_get_last_comic_permalink(); $next_comic = ceo_get_next_comic_permalink(); $prev_comic = ceo_get_previous_comic_permalink(); } $first_text = __('‹‹ First', 'comiceasel'); $last_text = __('Last ››', 'comiceasel'); $next_text = __('Next ›', 'comiceasel'); $prev_text = __('‹ Prev', 'comiceasel'); ?> <table id="comic-nav-wrapper"> <tr class="comic-nav-container"> <td class="comic-nav"><?php if (get_permalink() != $first_comic) { ?> <a href="<?php echo $first_comic; ?> " class="comic-nav-base comic-nav-first<?php if (get_permalink() == $first_comic) { ?> comic-nav-inactive<?php } ?> "><?php echo $first_text; ?> </a><?php } else { echo '<span class="comic-nav-base comic-nav-first comic-nav-void">' . $first_text . '</span>'; } ?> </td> <td class="comic-nav"><?php if ($prev_comic) { ?> <a href="<?php echo $prev_comic; ?> " class="comic-nav-base comic-nav-previous<?php if (!$prev_comic) { ?> comic-nav-inactive<?php } ?> "><?php echo $prev_text; ?> </a><?php } else { echo '<span class="comic-nav-base comic-nav-previous comic-nav-void ">' . $prev_text . '</span>'; } ?> </td> <?php if (ceo_pluginfo('enable_buy_comic') && !wp_is_mobile()) { if (strpos(ceo_pluginfo('buy_comic_url'), '?') !== false) { $bpsep = '&'; } else { $bpsep = '?'; } ?> <td class="comic-nav"><a href="<?php echo ceo_pluginfo('buy_comic_url') . $bpsep . 'id=' . $post->ID; ?> " class="comic-nav-base comic-nav-buycomic" title="Buy Comic"><?php _e('Buy!', 'comiceasel'); ?> </a></td> <?php } if (ceo_pluginfo('enable_comment_nav') && !wp_is_mobile()) { $commentscount = get_comments_number(); ?> <td class="comic-nav"><a href="<?php comments_link(); ?> " class="comic-nav-comments" title="<?php the_title(); ?> "><span class="comic-nav-comment-count"><?php echo sprintf(_n('Comment(%d)', 'Comments(%d)', $commentscount, 'comiceasel'), $commentscount); ?> </span></a></td> <?php } if (ceo_pluginfo('enable_random_nav') && !wp_is_mobile()) { $stay = ''; if (ceo_pluginfo('enable_chapter_only_random')) { $chapter = get_the_terms($post->ID, 'chapters'); if (!empty($chapter) && !is_wp_error($chapter)) { $stay = '&stay=' . reset($chapter)->term_id; } } ?> <td class="comic-nav"><a href="<?php bloginfo('url'); ?> ?random&nocache=1<?php echo $stay; ?> " class="comic-nav-random" title="Random Comic"><?php _e('Random', 'comiceasel'); ?> </a></td> <?php } ?> <td class="comic-nav"><?php if ($next_comic) { ?> <a href="<?php echo $next_comic; ?> " class="comic-nav-base comic-nav-next<?php if (!$next_comic) { ?> comic-nav-inactive<?php } ?> "><?php echo $next_text; ?> </a><?php } else { echo '<span class="comic-nav-base comic-nav-next comic-nav-void ">' . $next_text . '</span>'; } ?> </td> <td class="comic-nav"><?php if (get_permalink() != $last_comic) { ?> <a href="<?php echo $last_comic; ?> " class="comic-nav-base comic-nav-last<?php if (get_permalink() == $last_comic) { ?> comic-nav-inactive<?php } ?> "><?php echo $last_text; ?> </a><?php } else { echo '<span class="comic-nav-base comic-nav-last comic-nav-void ">' . $last_text . '</span>'; } ?> </td> <?php if (ceo_pluginfo('enable_chapter_nav')) { ?> <td class="comic-nav comic-nav-jumpto"><?php ceo_comic_archive_jump_to_chapter(true, '', false, ceo_pluginfo('default_nav_bar_chapter_goes_to_archive')); ?> </td> <?php } if (ceo_pluginfo('enable_comic_nav')) { ?> <td class="comic-nav comic-nav-jumptocomic"><?php ceo_list_jump_to_comic(); ?> </td> <?php } ?> </tr> <?php if (ceo_pluginfo('enable_embed_nav') && !wp_is_mobile()) { ?> <tr> <td class="comic-nav" colspan="15"> <?php $post_image_id = get_post_thumbnail_id($post->ID); $thumbnail = wp_get_attachment_image_src($post_image_id, 'full', false); if (is_array($thumbnail)) { $thumbnail = reset($thumbnail); echo $thumbnail; } ?> </td> </tr> <?php } ?> </table> <?php }
function display_comic_nav_wrapper($args, $instance) { global $post; extract($args, EXTR_SKIP); if (empty($post) || $post->post_type != 'comic') { return; } $prev_in_comic = $next_in_comic = $first_in_comic = $last_in_comic = $prev_comic = $next_comic = $first_comic = $last_comic = $previous_chap = $next_chap = false; if ($instance['previous_in']) { $prev_in_comic = ceo_get_previous_comic_in_chapter_permalink(); } if ($instance['next_in']) { $next_in_comic = ceo_get_next_comic_in_chapter_permalink(); } if ($instance['first_in']) { $first_in_comic = ceo_get_first_comic_in_chapter_permalink(); } if ($instance['last_in']) { $last_in_comic = ceo_get_last_comic_in_chapter_permalink(); } if ($instance['previous']) { $prev_comic = ceo_get_previous_comic_permalink(); } if ($instance['next']) { $next_comic = ceo_get_next_comic_permalink(); } if ($instance['first']) { $first_comic = ceo_get_first_comic_permalink(); } if ($instance['last']) { $last_comic = ceo_get_last_comic_permalink(); } if ($instance['previous_chap']) { $previous_chap = ceo_get_previous_chapter(); } if ($instance['next_chap']) { $next_chap = ceo_get_next_chapter(); } $this_permalink = get_permalink($post->ID); // echo $before_widget; ?> <div class="comic_navi_wrapper"> <table class="comic_navi"> <?php if (!isset($instance['comicchapter'])) { $instance['comicchapter'] = false; } ?> <?php if ($instance['comicchapter'] || $instance['comictitle']) { ?> <tr> <td class="comic_navi_title" colspan="3"> <?php if ($instance['comicchapter']) { $post_category = get_the_term_list($post->ID, 'chapters', '', ', ', ''); ?> <span class="navi-comicchapter"><?php echo $post_category; ?> </span> <?php if ($instance['comictitle']) { echo '- '; } } if ($instance['comictitle']) { ?> <span class="navi-comictitle"><a href="<?php the_permalink(); ?> " class="comic-nav-title">"<?php the_title(); ?> "</a></span> <?php } ?> </td> </tr> <?php } ?> <tr> <td class="comic_navi_left"> <?php do_action('before-comic-navigation'); if ($instance['first']) { if (!empty($first_comic) && $first_comic !== $this_permalink) { ?> <a href="<?php echo $first_comic; ?> " class="navi navi-first" title="<?php echo $instance['first_title']; ?> "><?php echo $instance['first_title']; ?> </a> <?php } else { ?> <span class="navi navi-first navi-void"><?php echo $instance['first_title']; ?> </span> <?php } } if ($instance['first_in']) { if (!empty($first_in_comic) && $first_in_comic !== $this_permalink) { ?> <a href="<?php echo $first_in_comic; ?> " class="navi navi-first-in" title="<?php echo $instance['first_in_title']; ?> "><?php echo $instance['first_in_title']; ?> </a> <?php } else { ?> <span class="navi navi-first-in navi-void"><?php echo $instance['first_in_title']; ?> </span> <?php } } if ($instance['previous']) { if (!empty($prev_comic)) { ?> <a href="<?php echo $prev_comic; ?> " class="navi comic-nav-previous navi-prev" title="<?php echo $instance['previous_title']; ?> "><?php echo $instance['previous_title']; ?> </a> <?php } else { ?> <span class="navi navi-prev navi-void"><?php echo $instance['previous_title']; ?> </span> <?php } } if ($instance['previous_in']) { if (!empty($prev_in_comic)) { ?> <a href="<?php echo $prev_in_comic; ?> " class="navi navi-prev-in" title="<?php echo $instance['previous_in_title']; ?> "><?php echo $instance['previous_in_title']; ?> </a> <?php } else { ?> <span class="navi navi-prev-in navi-void"><?php echo $instance['previous_in_title']; ?> </span> <?php } } if ($instance['previous_chap']) { if (!empty($previous_chap)) { ?> <a href="<?php echo $previous_chap; ?> " class="navi navi-prev-chap" title="<?php echo $instance['previous_chap_title']; ?> "><?php echo $instance['previous_chap_title']; ?> </a> <?php } else { ?> <span class="navi navi-prev-chap navi-void"><?php echo $instance['previous_chap_title']; ?> </span> <?php } } ?> </td> <td class="comic_navi_center"> <?php if ($instance['archives'] && !empty($instance['archive_path'])) { ?> <a href="<?php echo $instance['archive_path']; ?> " class="navi navi-archives navi-archive" title="<?php echo $instance['archives_title']; ?> "><?php echo $instance['archives_title']; ?> </a> <?php } if ($instance['random']) { $stay = ''; if (ceo_pluginfo('enable_chapter_only_random')) { $chapter = get_the_terms($post->ID, 'chapters'); if (!empty($chapter) && !is_wp_error($chapter)) { $stay = '&stay=' . reset($chapter)->term_id; } } ?> <a href="<?php echo home_url(); ?> /?random&nocache=1<?php echo $stay; ?> " class="navi navi-random" title="<?php echo $instance['random_title']; ?> "><?php echo $instance['random_title']; ?> </a> <?php } if (ceo_pluginfo('enable_buy_comic') && isset($instance['buycomic']) && $instance['buycomic']) { if (strpos(ceo_pluginfo('buy_comic_url'), '?') !== false) { $bpsep = '&'; } else { $bpsep = '?'; } ?> <a href="<?php echo ceo_pluginfo('buy_comic_url') . $bpsep . 'id=' . $post->ID; ?> " class="navi navi-buycomic" title="<?php echo $instance['buycomic_title']; ?> "><?php echo $instance['buycomic_title']; ?> </a> <?php } do_action('inside-comic-navigation'); if ($instance['comments']) { ?> <a href="<?php the_permalink(); ?> #comments" class="navi navi-comments" title="<?php echo $instance['comments_title']; ?> "><span class="navi-comments-count"><?php echo get_comments_number(); ?> </span><?php echo $instance['comments_title']; ?> </a> <?php } ?> </td> <td class="comic_navi_right"> <?php if ($instance['next_chap']) { if (!empty($next_chap)) { ?> <a href="<?php echo $next_chap; ?> " class="navi navi-next-chap" title="<?php echo $instance['next_chap_title']; ?> "><?php echo $instance['next_chap_title']; ?> </a> <?php } else { ?> <span class="navi navi-next-chap navi-void"><?php echo $instance['next_chap_title']; ?> </span> <?php } } if ($instance['next_in']) { if (!empty($next_in_comic)) { ?> <a href="<?php echo $next_in_comic; ?> " class="navi navi-next-in" title="<?php echo $instance['next_in_title']; ?> "><?php echo $instance['next_in_title']; ?> </a> <?php } else { ?> <span class="navi navi-next-in navi-void"><?php echo $instance['next_in_title']; ?> </span> <?php } } if ($instance['next']) { if (!empty($next_comic)) { ?> <a href="<?php echo $next_comic; ?> " class="navi comic-nav-next navi-next" title="<?php echo $instance['next_title']; ?> "><?php echo $instance['next_title']; ?> </a> <?php } else { ?> <span class="navi navi-next navi-void"><?php echo $instance['next_title']; ?> </span> <?php } } if ($instance['last_in']) { if (!empty($last_in_comic) && $last_in_comic !== $this_permalink) { ?> <a href="<?php echo $last_in_comic; ?> " class="navi navi-last-in" title="<?php echo $instance['last_in_title']; ?> "><?php echo $instance['last_in_title']; ?> </a> <?php } else { ?> <span class="navi navi-last-in navi-void"><?php echo $instance['last_in_title']; ?> </span> <?php } } if ($instance['last']) { if (!empty($last_comic) && $last_comic !== $this_permalink) { if (isset($instance['lastgohome']) && $instance['lastgohome']) { ?> <a href="/" class="navi navi-last" title="<?php echo $instance['last_title']; ?> "><?php echo $instance['last_title']; ?> </a> <?php } else { ?> <a href="<?php echo $last_comic; ?> " class="navi navi-last" title="<?php echo $instance['last_title']; ?> "><?php echo $instance['last_title']; ?> </a> <?php } ?> <?php } else { ?> <span class="navi navi-last navi-void"><?php echo $instance['last_title']; ?> </span> <?php } } do_action('after-comic-navigation'); ?> </td> </tr> <?php if ($instance['imageurl']) { ?> <tr> <td class="comic_navi_href" colspan="3"> <?php $post_image_id = get_post_thumbnail_id($post->ID); $thumbnail = wp_get_attachment_image_src($post_image_id, 'full', false); if (is_array($thumbnail) && !empty($thumbnail)) { $thumbnail = reset($thumbnail); echo '<span class="comic-navi-href-info">' . __('Image URL (for hotlinking/embedding): ', 'comiceasel') . $thumbnail . '</span>'; } ?> </td> </tr> <?php } ?> </table> </div> <?php // echo $after_widget; }