COMMIT! Fix for the function check_child_theme

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-06 14:52:13 -08:00
parent 2d7e8dc881
commit 8ba7e351ea
4 changed files with 8 additions and 16 deletions

View File

@ -1,12 +1,5 @@
<?php
// Run this when a theme is switched to revert the navigation to default
function comicpress_on_theme_switch() {
update_option('comicpress-graphicnav_directory', 'default');
}
add_action('switch_theme','comicpress_on_theme_switch',1,10);
// Queue up the scripts.
wp_enqueue_script('comicpress_scroll', get_template_directory_uri() . '/js/scroll.js');
@ -858,10 +851,12 @@ function cp_copyright() {
function comicpress_check_child_file($filename = '') {
if (empty($filename)) return false;
if (get_stylesheet_directory() != get_template_directory()) {
if (file_exists(get_stylesheet_directory() .'/'. $filename . '.php')) {
@require_once(get_stylesheet_directory() .'/'. $filename . '.php');
return true;
}
}
return false;
}

View File

@ -1,9 +1,5 @@
<?php if (comicpress_check_child_file('layout-head') == false) { ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="header-<?php the_ID(); ?>"></div>
<?php endwhile; endif; ?>
<div id="content-wrapper-head"></div>
<div id="content-wrapper">

View File

@ -1,3 +1,5 @@
<?php if (comicpress_is_active_sidebar('Header')) { ?>
<div id="sidebar-header" class="customsidebar <?php global $enable_if_widgetarea_use_sidebar_css; if ($enable_widgetarea_use_sidebar_css == 'yes') { ?> sidebar<?php } ?>">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Header') ) : ?><?php endif; ?>
</div>
<?php } ?>

View File

@ -1,6 +1,5 @@
<?php global $disable_lrsidebars_frontpage;
if ($disable_lrsidebars_frontpage == 'yes' && is_home()) {
} else { ?>
if ($disable_lrsidebars_frontpage != 'yes') { ?>
<div id="sidebar-right">
<div class="sidebar-head"></div>
<div class="sidebar">