set storyline info if none exists

This commit is contained in:
John Bintz 2009-12-31 19:59:33 -05:00
parent 30f3ebea26
commit 71c30e3008
1 changed files with 35 additions and 28 deletions

View File

@ -104,22 +104,6 @@ function comicpress_load_options() {
$comicpress_options = get_option('comicpress_options'); $comicpress_options = get_option('comicpress_options');
if (empty($comicpress_options)) { if (empty($comicpress_options)) {
$comicpress_config = array();
foreach (array(
'comiccat' => '3',
'blogcat' => '1',
'comic_folder' => 'comics',
'rss_comic_folder' => 'comics-rss',
'archive_comic_folder' => 'comics-archive',
'mini_comic_folder' => 'comics-mini',
'rss_comic_width' => '320',
'archive_comic_width' => '480',
'mini_comic_width' => '80'
) as $field => $value) {
$comicpress_options['comicpress_config'][$field] = $value;
}
$comicpress_options['comicpress_version'] = '2.9.0.9'; $comicpress_options['comicpress_version'] = '2.9.0.9';
foreach (array( foreach (array(
'cp_theme_layout' => 'standard', 'cp_theme_layout' => 'standard',
@ -209,6 +193,23 @@ function comicpress_load_options() {
add_option('comicpress_options', $comicpress_options, '', 'yes'); add_option('comicpress_options', $comicpress_options, '', 'yes');
// update_option('comicpress_options', $comicpress_options); // update_option('comicpress_options', $comicpress_options);
} }
if (!isset($comicpress_options['comicpress_config'])) {
foreach (array(
'comiccat' => '3',
'blogcat' => '1',
'comic_folder' => 'comics',
'rss_comic_folder' => 'comics-rss',
'archive_comic_folder' => 'comics-archive',
'mini_comic_folder' => 'comics-mini',
'rss_comic_width' => '320',
'archive_comic_width' => '480',
'mini_comic_width' => '80'
) as $field => $value) {
$comicpress_options['comicpress_config'][$field] = $value;
}
}
$comicpress_options['comicpress_version'] = '2.9.0.9'; $comicpress_options['comicpress_version'] = '2.9.0.9';
// if (file_exists(get_template_directory() . '/comicpress-config.php')) { // if (file_exists(get_template_directory() . '/comicpress-config.php')) {
@ -218,6 +219,12 @@ function comicpress_load_options() {
// } // }
update_option('comicpress_options', $comicpress_options); update_option('comicpress_options', $comicpress_options);
$storyline = get_option('comicpress-storyline-category-order');
if (empty($storyline)) {
update_option('comicpress-storyline-category-order', "0/$comiccat");
}
return $comicpress_options; return $comicpress_options;
} }