clean up 2.8 - Core intergation issues

This commit is contained in:
John Bintz 2009-11-21 13:42:53 -05:00
parent 8dbb9d9a05
commit de637fdd99
5 changed files with 32 additions and 32 deletions

View File

@ -28,18 +28,18 @@ class ComicPressNavigation {
// global previous/next
foreach (array('previous', 'next') as $field) {
$nav[$field] = $this->_dbi->{"get_${field}_comic"}($categories, $post);
$nav[$field] = $this->_dbi->{"get_${field}_post"}($categories, $post);
}
// global first/last
foreach (array('first', 'last') as $field) {
$nav[$field] = $this->_dbi->{"get_${field}_comic"}($categories);
$nav[$field] = $this->_dbi->{"get_${field}_post"}($categories);
}
if ($category = $this->_storyline->get_valid_post_category($post->ID)) {
// storyline previous/next
foreach (array('previous', 'next') as $field) {
$nav["storyline-${field}"] = $this->_dbi->{"get_${field}_comic"}($category, $post);
$nav["storyline-${field}"] = $this->_dbi->{"get_${field}_post"}($category, $post);
}
// adjacent storyline nodes
@ -47,7 +47,7 @@ class ComicPressNavigation {
foreach ($valid as $field) {
$all_adjacents = $this->_storyline->all_adjacent($category, $field);
foreach ($all_adjacents as $adjacent_category) {
$result = $this->_dbi->get_first_comic($adjacent_category);
$result = $this->_dbi->get_first_post($adjacent_category);
if (!empty($result)) {
$nav["storyline-chapter-${field}"] = $result; break;
}

View File

@ -15,10 +15,14 @@ class ComicPressStoryline {
* Get the flattened storyline from options.
*/
function get_flattened_storyline() {
if (class_exists('ComicPress')) {
$comicpress = &ComicPress::get_instance();
if (isset($comicpress->comicpress_options['storyline_order'])) {
return $comicpress->comicpress_options['storyline_order'];
}
} else {
return get_option("comicpress-storyline-category-order");
}
return false;
}

View File

@ -4,7 +4,7 @@
$comiccat = "3";
//BLOG CATEGORY - the WordPress ID of your blog category (default "1")
$blogcat = "4";
$blogcat = "5";
//COMIC FOLDER - the folder your comics files are located in (default "comics")
$comic_folder = "comics";

View File

@ -17,7 +17,6 @@
<?php if (!(is_paged())) { ?>
<?php if ($disable_comic_frontpage != 'yes') { ?>
<?php $wp_query ->in_the_loop = true; $comicFrontpage = new WP_Query(); $comicFrontpage->query('showposts=1&cat='.get_all_comic_categories_as_cat_string());
while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post() ?>
<?php if (comicpress_check_child_file('partials/displaycomic') == false) { ?>

View File

@ -241,9 +241,6 @@ class WidgetComicPressGraphicalStorylineNavigation extends WP_Widget {
$storyline = new ComicPressStoryline();
$storyline->create_structure(get_option('comicpress-storyline-category-order'));
$dbi = ComicPressDBInterface::get_instance();
$dbi->set_comic_categories($storyline->get_comic_categories());
$navigation = new ComicPressNavigation();
$navigation->init($storyline);
$post_nav = $navigation->get_post_nav($post);