get_template_directory_uri() . '/images/header_1.png', 'random-default' => false, 'width' => 780, 'height' => 163, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => 'FFFFFF', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $defaults ); /* * Enqueue scripts and styles for front-end. * @since TSW_Plain 2.0 * @return void */ function tsw_plain_scripts_styles() { /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); // Loads default main stylesheet. wp_enqueue_style( 'tsw_plain-style', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'tsw_plain_scripts_styles' ); /** * customer background color support */ add_theme_support( 'custom-background' ); $args = array( 'default-color' => 'FAFAFB', 'default-image' => get_template_directory_uri() . '/images/default_background.png', ); add_theme_support( 'custom-background', $args ); /* * Registers our main widget area and the footer widget areas. */ function tsw_plain_widgets_init() { register_sidebar( array( 'name' => __('Right Side Widget', 'tsw_plain'), 'id' => 'sidebar-1', 'description' => __('Appears on posts and pages in Footer Area Left', 'tsw_plain'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Widget 1', 'tsw_plain'), 'id' => 'sidebar-2', 'description' => __('Appears Left Side on Footer', 'tsw_plain'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Widget 2', 'tsw_plain'), 'id' => 'sidebar-3', 'description' => __('Appears on Footer Middle', 'tsw_plain'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Widget 3', 'tsw_plain'), 'id' => 'sidebar-4', 'description' => __('Appears on Footer Right', 'tsw_plain'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Right Header Logo Widget', 'tsw_plain'), 'id' => 'header-sidebar', 'description' => __('Optional Header Area Right - Max Height=250pixels Only 1 Widget allowed', 'tsw_plain'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'tsw_plain_widgets_init' ); /* * WordPress body class Extender : * 1. Using a full-width layout without widgets. * * @since TSW_Plain 2.0 */ function tsw_plain_content_width() { if ( is_page_template( 'full-width.php' ) || is_attachment() || ! is_active_sidebar( 'tsw_plain-sidebar' ) ) { global $content_width; $content_width = 1040; } } add_action( 'template_redirect', 'tsw_plain_content_width' ); ?>