<h2><?php _e('Comic Easel - Config', 'comiceasel'); ?> </h2> </p> <div class="clear"></div> <?php $tab = ''; if (isset($_GET['tab'])) { $tab = wp_filter_nohtml_kses($_GET['tab']); } if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'comiceasel_reset') { delete_option('comiceasel-config'); global $ceo_pluginfo; $ceo_pluginfo = array(); ceo_load_options('reset'); ?> <div id="message" class="updated"><p><strong><?php _e('Comic Easel Settings RESET!', 'comiceasel'); ?> </strong></p></div> <?php } $ceo_options = get_option('comiceasel-config'); if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'update-options')) { if ($_REQUEST['action'] == 'ceo_save_general') { foreach (array('thumbnail_size_for_rss', 'thumbnail_size_for_direct_rss', 'thumbnail_size_for_archive', 'thumbnail_size_for_facebook', 'custom_post_type_slug_name', 'chapter_on_home') as $key) { if (isset($_REQUEST[$key])) { $ceo_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]); } elseif (empty($_REQUEST[$key])) { $ceo_options[$key] = '';
function ceo_pluginfo($whichinfo = null) { global $ceo_pluginfo; // ceo_load_options('reset'); -- uncomment to reset defaults if (empty($ceo_pluginfo) || $whichinfo == 'reset') { // Important to assign pluginfo as an array to begin with. $ceo_pluginfo = array(); $ceo_options = ceo_load_options(); if (!isset($ceo_options['db_version']) || empty($ceo_options['db_version']) || version_compare($ceo_options['db_version'], '1.2', '<')) { $ceo_options['db_version'] = '1.2'; $ceo_options['enable_buy_comic'] = false; $ceo_options['buy_comic_email'] = '*****@*****.**'; $ceo_options['buy_comic_url'] = home_url() . '/shop/'; $ceo_options['buy_comic_amount'] = '25.00'; $ceo_options['buy_comic_sell_original'] = true; $ceo_options['buy_comic_sell_print'] = false; $ceo_options['buy_comic_orig_amount'] = '65.00'; $ceo_options['buy_comic_text'] = __('*Additional shipping charges will applied at time of purchase.', 'comiceasel'); } if (version_compare($ceo_options['db_version'], '1.3', '<')) { $ceo_options['db_version'] = '1.3'; $ceo_options['chapter_on_home'] = 0; } if (version_compare($ceo_options['db_version'], '1.4', '<')) { $ceo_options['db_version'] = '1.4'; $ceo_options['allow_comics_to_have_categories'] = false; } if (version_compare($ceo_options['db_version'], '1.5', '<')) { $ceo_options['db_version'] = '1.5'; $ceo_options['enable_nav_above_comic'] = false; } if (version_compare($ceo_options['db_version'], '1.6', '<')) { $ceo_options['db_version'] = '1.6'; $ceo_options['thumbnail_size_for_facebook'] = 'large'; } if (version_compare($ceo_options['db_version'], '1.7', '<')) { $ceo_options['db_version'] = '1.7'; $ceo_options['chapter_type_slug_name'] = 'chapter'; $ceo_options['chapter_type_name_plural'] = 'chapters'; } if (version_compare($ceo_options['db_version'], '1.8', '<')) { $ceo_options['db_version'] = '1.8'; $ceo_options['disable_keynav'] = false; update_option('comiceasel-config', $ceo_options); } $ceo_coreinfo = wp_upload_dir(); $ceo_addinfo = array('error' => $ceo_coreinfo['error'], 'base_url' => trailingslashit($ceo_coreinfo['baseurl']), 'base_path' => trailingslashit($ceo_coreinfo['basedir']), 'theme_url' => get_template_directory_uri(), 'theme_path' => get_template_directory(), 'style_url' => get_stylesheet_directory_uri(), 'style_path' => get_stylesheet_directory(), 'plugin_url' => plugin_dir_url(__FILE__), 'plugin_path' => plugin_dir_path(__FILE__), 'version' => '1.8.7'); // Combine em. $ceo_pluginfo = array_merge($ceo_pluginfo, $ceo_addinfo); $ceo_pluginfo = array_merge($ceo_pluginfo, $ceo_options); if (!isset($ceo_pluginfo['disable_style_sheet'])) { $ceo_pluginfo['disable_style_sheet'] = false; } if (!isset($ceo_pluginfo['enable_transcripts_in_comic_posts'])) { $ceo_pluginfo['enable_transcripts_in_comic_posts'] = false; } if (!isset($ceo_pluginfo['enable_prevnext_chapter_traversing'])) { $ceo_pluginfo['enable_prevnext_chapter_traversing'] = false; } } if ($whichinfo) { if (isset($ceo_pluginfo[$whichinfo])) { return $ceo_pluginfo[$whichinfo]; } else { return false; } } return $ceo_pluginfo; }