'widget_comicpress_graphical_navigation', 'description' => __('Displays Graphical Navigation Buttons. (used in comic sidebars)','comicpress') ); $this->WP_Widget('graphicalnavigation', __('Comic Navigation','comicpress'), $widget_ops); } function widget($args, $instance) { global $wp_query, $post; if (is_home() || is_single()) { $this_permalink = get_permalink(); $temp_query = $wp_query->is_single; $wp_query->is_single = true; $prev_comic = get_previous_comic_permalink(); $next_comic = get_next_comic_permalink(); $wp_query->is_single = $temp_query; $temp_query = null; $first_comic = get_first_comic_permalink(); $last_comic = get_last_comic_permalink(); $prev_story = get_previous_storyline_start_permalink(); $next_story = get_next_storyline_start_permalink(); ?>
'on', 'last' => 'on', 'story_prev' => 'off', 'story_next' => 'off', 'previous' => 'on', 'random' => 'off', 'archives' => 'off', 'comments' => 'off', 'next' => 'on', 'archive_path' => '', 'buyprint' => 'off', 'comictitle' => 'off' ); $title_defaults = array( 'first_title' => __('First', 'comicpress'), 'last_title' => __('Latest', 'comicpress'), 'story_prev_title' => __('Chapter', 'comicpress'), 'story_next_title' => __('Chapter', 'comicpress'), 'previous_title' => __('Previous', 'comicpress'), 'random_title' => __('Random', 'comicpress'), 'archives_title' => __('Archives', 'comicpress'), 'comments_title' => __('Comments', 'comicpress'), 'next_title' => __('Next', 'comicpress'), 'buyprint_title' => __('Buy Print', 'comicpress') ); $instance = wp_parse_args((array)$instance, array_merge($field_defaults, $title_defaults)); foreach (array( 'first' => __('First', 'comicpress'), 'last' => __('Last', 'comicpress'), 'previous' => __('Previous', 'comicpress'), 'next' => __('Next', 'comicpress'), 'story_prev' => __('Previous Chapter', 'comicpress'), 'story_next' => __('Next Chapter', 'comicpress'), 'comictitle' => __('Comic Title', 'comicpress'), 'archives' => __('Archives', 'comicpress'), 'comments' => __('Comments', 'comicpress'), 'random' => __('Random', 'comicpress'), 'buyprint' => __('Buy Print', 'comicpress'), ) as $field => $label) { $title_field = "${field}_title"; ?>