'‹‹ ' . __('First', 'comicpress'), 'previous' => '‹ ' . __('Previous', 'comicpress'), 'next' => __('Next', 'comicpress') . ' ›', 'last' => __('Last', 'comicpress') . ' ››' ); if ($comicpress->needs_storyline_nav()) { $nav_fields = array_merge( array('prior' => '‹‹ ' . __('Prior Storyline', 'comicpress')), $nav_fields, array('upcoming' => __('Upcoming Storyline', 'comicpress') . ' ››') ); foreach ($comicpress->get_sorted_post_categories() as $category_id) { $prev_next_categories = $comicpress->get_previous_next_categories($category_id); foreach ($prev_next_categories as $master_id => $cat_list) { foreach ($cat_list as $which => $id) { switch ($which) { case "previous": $terminal_post = $comicpress->get_last_comic($id); $which_field = "prior"; break; case "next": $terminal_post = $comicpress->get_first_comic($id); $which_field = "upcoming"; break; } if (is_object($terminal_post)) { $nav_comics[$which_field] = $terminal_post; $nav_comics["show_${which_field}"] =true; } if (count($terminal_post) == 2) { break; } } } } } ?>