version = ARRAS_VERSION; $this->donate = false; $this->feed_url = get_bloginfo('rss2_url'); $this->comments_feed_url = get_bloginfo('comments_rss2_url'); $this->footer_title = __('Copyright', 'arras'); $this->footer_message = sprintf( __('Copyright %s. All Rights Reserved.', 'arras'), get_bloginfo('name') ); $this->featured_cat = 0; $this->topnav_home = __('Home', 'arras'); $this->topnav_display = 'categories'; $this->topnav_linkcat = 0; $this->featured1_count = 4; $this->featured2_count = 3; $this->index_count = get_option('posts_per_page'); $this->featured2_news_display = 'default'; $this->index_news_display = 'line'; $this->archive_news_display = 'line'; $this->display_author = true; $this->single_thumbs = true; $this->layout = '2c-r-fixed'; $this->style = 'default'; $this->background = 'none'; $this->background_type = 'custom'; $this->background_tiling = 'none'; $this->single_meta_pos = 'top'; $this->single_custom_fields = 'Score:score,Pros:pros,Cons:cons'; } function get_options() { $saved_options = unserialize(get_option('arras_options')); if (!empty($saved_options) && is_object($saved_options)) { foreach($saved_options as $name => $value) { // Apply filters if qTranslate is enabled if (function_exists('qtrans_init')) $value = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($value); $this->$name = $value; } } } function save_options() { $this->version = ARRAS_VERSION; $this->feed_url = (string)$_POST['arras-rss-feed-url']; $this->comments_feed_url = (string)$_POST['arras-rss-comments-url']; $this->footer_title = (string)stripslashes($_POST['arras-footer-title']); $this->footer_message = (string)($_POST['arras-footer-message']); $this->featured_cat1 = (int)$_POST['arras-cat-featured1']; $this->featured_cat2 = (int)$_POST['arras-cat-featured2']; $this->news_cat = (int)$_POST['arras-cat-news']; $this->topnav_home = (string)$_POST['arras-nav-home']; $this->topnav_display = (string)$_POST['arras-nav-display']; $this->topnav_linkcat = (int)$_POST['arras-nav-linkcat']; $this->featured1_count = (int)stripslashes($_POST['arras-layout-featured1-count']); $this->featured2_count = (int)stripslashes($_POST['arras-layout-featured2-count']); $this->index_count = (int)stripslashes($_POST['arras-layout-index-count']); $this->featured2_news_display = (string)$_POST['arras-layout-featured2-display']; $this->index_news_display = (string)$_POST['arras-layout-index-newsdisplay']; $this->archive_news_display = (string)$_POST['arras-layout-archive-newsdisplay']; $this->display_author = (boolean)$_POST['arras-layout-single-author']; $this->single_thumbs = (boolean)$_POST['arras-layout-single-thumb']; $this->single_meta_pos = (string)$_POST['arras-layout-metapos']; $this->single_custom_fields = (string)$_POST['arras-single-custom-fields']; $this->layout = (string)$_POST['arras-layout-col']; $this->style = (string)$_POST['arras-style']; $this->background = (string)$_POST['arras-background']; $this->background_type = (string)$_POST['arras-background-type']; $this->background_tiling = (string)$_POST['arras-background-tiling']; $this->background_color = (string)$_POST['arras-background-color']; } } function arras_flush_options() { global $arras_options; $arras_options = new Options; $arras_options->get_options(); if ( !get_option('arras_options') ) $arras_options->default_options(); } function arras_update_options() { global $arras_options; update_option('arras_options', maybe_serialize($arras_options)); } function arras_get_option($name) { global $arras_options; if (!is_object($arras_options) ) arras_flush_options(); return $arras_options->$name; } /* End of file options.php */ /* Location: ./admin/options.php */