functions.php works now in child themes instead of using childfunctions.php as a partial.
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
parent
58062ff720
commit
5018dfe825
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
include(get_template_directory() . '/comicpress-options-config.php');
|
||||
@include(get_template_directory() . '/comicpress-options-config.php');
|
||||
|
||||
function comicpress_options() {
|
||||
function options() {
|
||||
$pagehook = add_submenu_page('themes.php','comicpress', __('ComicPress Options','comicpress'), 10, 'comicpress-options', 'comicpress_admin');
|
||||
add_action('admin_head-'.$pagehook, 'comicpress_admin_page_head');
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ function comicpress_admin_page_head() {
|
|||
function comicpress_admin() {
|
||||
global $options, $upload_path, $blogcat, $moods_directory, $calendar_directory, $graphicnav_directory;
|
||||
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h2 class="alignleft"><?php _e('ComicPress Options','comicpress'); ?></h2>
|
||||
|
@ -56,13 +55,14 @@ function comicpress_admin() {
|
|||
}
|
||||
|
||||
// set default options
|
||||
|
||||
foreach ($options as $default) {
|
||||
if(get_option($default['id'])=="") {
|
||||
update_option($default['id'],$default['default']);
|
||||
}
|
||||
}
|
||||
|
||||
include(get_template_directory() . '/comicpress-config.php');
|
||||
@require(get_template_directory() . '/comicpress-config.php');
|
||||
|
||||
?>
|
||||
<div id="poststuff" class="metabox-holder">
|
||||
|
@ -112,6 +112,6 @@ function comicpress_admin() {
|
|||
<?php
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'comicpress_options');
|
||||
add_action('admin_menu', 'options');
|
||||
|
||||
?>
|
|
@ -9,7 +9,7 @@ function init_language(){
|
|||
define('THEME_TEXTDOMAIN','comicpress');
|
||||
define('THEME_LANGS_FOLDER','/lang');
|
||||
} else {
|
||||
load_theme_textdomain( 'comicpress', get_template_directory_uri() . '/lang' );
|
||||
load_theme_textdomain( 'comicpress', get_template_directory() . '/lang' );
|
||||
}
|
||||
}
|
||||
add_action ('init', 'init_language');
|
||||
|
@ -852,7 +852,7 @@ function cp_copyright() {
|
|||
function comicpress_check_child_file($filename = '') {
|
||||
if (empty($filename)) return false;
|
||||
if (file_exists(get_stylesheet_directory() .'/'. $filename . '.php')) {
|
||||
@include(get_stylesheet_directory() .'/'. $filename . '.php');
|
||||
@require_once(get_stylesheet_directory() .'/'. $filename . '.php');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue