section add_theme_support( 'automatic-feed-links' ); $this->register_sidebars(); add_theme_support( 'post-thumbnails' ); } /** * Register the 3 sidebars for this theme */ function register_sidebars(){ // Declare sidebar widget zone if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Left One', 'id' => 'sidebar-1', 'description' => 'This is the left most sidebar of your blog', 'before_widget' => '
', 'before_title' => '' )); register_sidebar(array( 'name' => 'Left Two', 'id' => 'sidebar-2', 'description' => 'This is the center sidebar of your blog', 'before_widget' => '', 'before_title' => '' )); register_sidebar(array( 'name' => 'Footer Sidebar', 'id' => 'sidebar-footer', 'description' => 'This is the sidebar at the footer of the page', 'before_widget' => '', 'before_title' => '' )); } } /** * Load the textdomain to be used for this theme for localization */ function localize_init(){ load_theme_textdomain(DIFFBLUE_L10N, get_template_directory() . '/languages'); } // Clean up the function remove_head_links() { remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); } // Setup the theme's WordPress admin page function setup_theme_admin_menus() { add_theme_page( $this->adminPageTitle, $this->adminPageShortTitle, 'manage_options', 'different-blue-options', array($this, 'renderAdminPage') ); } function renderAdminPage(){ // Check for permissions if (!current_user_can('manage_options')){ wp_die('You do not have sufficient permissions to access this page.'); exit; } // Save data if the form is submitted if($_POST && is_array($_POST)){ update_option(self::$theme_prefix . '_google_analytics', ($_POST[self::$theme_prefix . '_google_analytics'] )); update_option(self::$theme_prefix . '_custom_css', addslashes($_POST[self::$theme_prefix . '_custom_css'] )); } $analytics_code = htmlentities(stripslashes(get_option(self::$theme_prefix . '_google_analytics'))); $custom_css = htmlentities(stripslashes(get_option(self::$theme_prefix . '_custom_css'))); ?>'; return $output; } else return $content; } } new theme_setup_different_blue(); if ( ! isset( $content_width ) ) $content_width = 900; ?>