'f3f3f3', 'border' => 'ddd', 'text' => '666', 'link' => '0087c1', 'url' => '0087c1', ); } else { $themecolors = array( 'bg' => '3c3c3c', 'border' => '2f2f2f', 'text' => '999999', 'link' => 'ff9900', 'url' => '0099cc', ); } // Set the content width $content_width = 520; // Get current theme options with defaults as fallback function vostok_get_theme_options() { $defaults = array( 'color_scheme' => 'dark', 'show-header-image' => 0, 'show-header-nav' => 0, ); $options = get_option( 'vostok_theme_options', $defaults ); return $options; } function twentyten_setup() { // This theme styles the visual editor with editor-style.css to match the theme style. // add_editor_style(); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'vostok' ), 'footer' => __( 'Footer Navigation', 'vostok' ), ) ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_child_theme_textdomain( 'vostok', get_stylesheet_directory() . '/languages' ); // This theme allows users to set a custom background add_theme_support( 'custom-background' ); add_theme_support( 'print-style' ); $options = vostok_get_theme_options(); if ( ! empty( $options['show-header-image'] ) ) { // Your changeable header business starts here add_theme_support( 'custom-header', apply_filters( 'vostok_custom_header_args', array( 'default-image' => '%s/images/headers/path.jpg', 'width' => apply_filters( 'twentyten_header_image_width', 600 ), 'height' => apply_filters( 'twentyten_header_image_height', 126 ), 'header-text' => false, 'admin-head-callback' => 'twentyten_admin_header_style', ) ) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be 600 pixels wide by 126 pixels tall (larger images will be auto-cropped to fit). set_post_thumbnail_size( get_custom_header()->width, get_custom_header()->height, true ); // ... and thus ends the changeable header business. // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'berries' => array( 'url' => '%s/images/headers/berries.jpg', 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', 'description' => __( 'Berries', 'vostok' ) ), 'cherryblossom' => array( 'url' => '%s/images/headers/cherryblossoms.jpg', 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', 'description' => __( 'Cherry Blossoms', 'vostok' ) ), 'concave' => array( 'url' => '%s/images/headers/concave.jpg', 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', 'description' => __( 'Concave', 'vostok' ) ), 'fern' => array( 'url' => '%s/images/headers/fern.jpg', 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', 'description' => __( 'Fern', 'vostok' ) ), 'forestfloor' => array( 'url' => '%s/images/headers/forestfloor.jpg', 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', 'description' => __( 'Forest Floor', 'vostok' ) ), 'inkwell' => array( 'url' => '%s/images/headers/inkwell.jpg', 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', 'description' => __( 'Inkwell', 'vostok' ) ), 'path' => array( 'url' => '%s/images/headers/path.jpg', 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', 'description' => __( 'Path', 'vostok' ) ), 'sunset' => array( 'url' => '%s/images/headers/sunset.jpg', 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', 'description' => __( 'Sunset', 'vostok' ) ) ) ); } } // Register widgetized areas function vostok_widgets_init() { // Area 1 (left column) register_sidebar( array( 'name' => 'Left Footer Widget Area', 'id' => 'primary-widget-area', 'before_widget' => '