init(); $addons = array(); if (is_dir($addons_dir = (dirname(__FILE__) . '/addons'))) { $entries = glob($addons_dir . '/*'); if (is_array($entries)) { foreach ($entries as $entry) { if (is_dir($entry)) { $classname = basename($entry); if (file_exists($entry . "/${classname}.inc")) { require_once($entry . "/${classname}.inc"); $classname = "ComicPressAddon${classname}"; if (class_exists($classname)) { $addons[] = new $classname(); end($addons)->init(&$comicpress); if (is_admin()) { if (is_array($_REQUEST['cp'])) { if (isset($_REQUEST['cp']['_nonce'])) { if (wp_verify_nonce($_REQUEST['cp']['_nonce'], 'comicpress')) { if (method_exists(end($addons), 'handle_update')) { end($addons)->handle_update(); } } } } add_action('admin_notices', array(end($addons), 'display_messages')); } } } } } } } } function in_comic_category() { global $post, $comicpress; return $comicpress->in_comic_category($post->ID); } /** * Display the list of Storyline categories. */ function comicpress_list_storyline_categories($args = "") { global $category_tree; $defaults = array( 'style' => 'list', 'title_li' => __('Storyline') ); $r = wp_parse_args($args, $defaults); extract($r); $categories_by_id = get_all_category_objects_by_id(); $output = ''; if ($style == "list") { $output .= '
  • '; } if ($title_li && ($style == "list")) { $output .= $title_li; } if ($style == "list") { $output .= "
  • ", $current_depth); } if ($style == "list") { $output .= ""; } echo $output; } /** * Display the comic transcript * Transcript must be entered into a custom field named "transcript" * @param string $displaymode, "raw" (straight from the field), "br" (includes html line breaks), "styled" (fully css styled with JavaScript expander) */ function the_transcript($displaymode = 'raw') { $transcript = get_post_meta( get_the_ID(), "transcript", true ); switch ($displaymode) { case "raw": echo $transcript; break; case "br": echo nl2br($transcript); break; case "styled": if (!empty($transcript)) { ?>
    ↓ Transcript


  • Latest Comics

  • ? Random Comic