get_template_directory_uri() . '/images/default-logo.png', // Header text display default 'header-text' => false, // Header image flex width 'flex-width' => true, // Header image width (in pixels) 'width' => 300, // Header image flex height 'flex-height' => true, // Header image height (in pixels) 'height' => 100 ); add_theme_support( 'custom-header', $args_ch ); /* Post thumbnails */ add_theme_support( 'post-thumbnails' ); //set_post_thumbnail_size( 624, 9999 ); /* Make theme available for translation */ load_theme_textdomain( 'tuned', get_template_directory() . '/languages' ); /* Add Primary Navigation Menu */ register_nav_menu( 'primary', __( 'Primary Menu', 'tuned' ) ); /* Add posts and comments RSS feed links to */ add_theme_support( 'automatic-feed-links' ); /* Add support for custom backgrounds. */ $args_cb = array( 'default-color' => 'FFF', //'default-image' => '' ); add_theme_support( 'custom-background', $args_cb ); } add_action( 'after_setup_theme', 'tuned_setup' ); /* Add styles, and/or javascripts to theme -----------------------------------------------------------*/ function tuned_scripts() { // Add styles wp_enqueue_style( 'tuned-style', get_stylesheet_uri() ); wp_enqueue_style( 'tuned-ie', get_template_directory_uri() .'/css/ie.css' ); wp_enqueue_style( 'Montserrat', 'http://fonts.googleapis.com/css?family=Montserrat:400,700' ); wp_enqueue_style( 'flexslider', get_template_directory_uri() .'/js/vendor/flexslider/flexslider.css' ); /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if ( is_singular() && comments_open() ) wp_enqueue_script( 'comment-reply' ); // Add FlexSlider wp_enqueue_script( 'tuned_flexslider', get_template_directory_uri() .'/js/vendor/flexslider/jquery.flexslider.js', array( 'jquery' ) ); // Add Infinite Scroll wp_enqueue_script( 'tuned_infinite_scroll', get_template_directory_uri() .'/js/vendor/infinite-scroll/jquery.infinitescroll.js', array( 'jquery' ) ); // Add Masonry wp_enqueue_script( 'tuned_masonry', get_template_directory_uri() .'/js/vendor/masonry/jquery.masonry.js', array( 'jquery' ) ); // Add Tuned javascript file wp_enqueue_script( 'tuned_scripts', get_template_directory_uri() .'/js/tuned_scripts.js' ); //Add Infinite Scroll with Masonry for Infinite Scrolled Blog if( basename( get_page_template() ) == 'infinite-scrolled-blog.php' ) { wp_enqueue_script( 'isb', get_template_directory_uri() .'/js/isb.js' ); wp_localize_script( 'isb', 'isb_vars', array( 'loader_img' => get_template_directory_uri() . '/js/vendor/infinite-scroll/ajax-loader.gif', 'loader_text' => __( 'Loading...', 'tuned' ), 'loading_finished_text' => __( 'All posts loaded.', 'tuned' ) ) ); } } add_action( 'wp_enqueue_scripts', 'tuned_scripts' ); /* Register widgets -------------------------------------------------------------*/ function tuned_widgets_init() { register_sidebar( array( 'name' => __( 'Main sidebar', 'tuned' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' ) ); register_sidebar(array( 'name' => __('FPT - Hero Box', 'tuned'), 'description' => __( 'Appears on the Front Page Template. This is a box for the Hero Widget', 'tuned' ), 'id' => 'front-page-template-hero', 'before_widget' => '
', 'after_widget' => '
', )); register_sidebar(array( 'name' => __('FPT - Carousel Box', 'tuned'), 'description' => __( 'Appears on the Front Page Template. This is a box for the Carousel Widget', 'tuned' ), 'id' => 'front-page-template-carousel', 'before_widget' => '
', )); register_sidebar(array( 'name' => __('FPT - 1 Column Grid Box', 'tuned'), 'description' => __( 'Appears on the Front Page Template. This is a 1 Column Grid Box for the Text Widget, and for the Category Posts Widget', 'tuned' ), 'id' => 'frontend-grid-1', 'before_widget' => '
', 'after_widget' => '
', )); register_sidebar(array( 'name' => __('FPT - 3 Column Grid Box', 'tuned'), 'description' => __( 'Appears on the Front Page Template. This is a 3 Column grid for the Category Posts Widget.', 'tuned' ), 'id' => 'frontend-grid-3', 'before_widget' => '
', 'after_widget' => '
', )); register_sidebar(array( 'name' => __('FWT - Hero Box', 'tuned'), 'description' => __( 'Appears on the Full Width Template. This is a box for the Hero Widget', 'tuned' ), 'id' => 'full-width-template-hero', 'before_widget' => '
', 'after_widget' => '
', )); register_sidebar(array( 'name' => __('FWT - Carousel Box', 'tuned'), 'description' => __( 'Appears on the Full Width Template. This is a box for the Carousel Widget', 'tuned' ), 'id' => 'full-width-template-carousel', 'before_widget' => '
', )); register_sidebar(array( 'name' => __('ISBT - Hero Box', 'tuned'), 'description' => __( 'Appears on the Infinite Scrolled Blog Template. This is a box for the Hero Widget', 'tuned' ), 'id' => 'isb-template-hero', 'before_widget' => '
', 'after_widget' => '
', )); register_sidebar(array( 'name' => __('ISBT - Carousel Box', 'tuned'), 'description' => __( 'Appears on the Infinite Scrolled Blog Template. This is a box for the Carousel Widget', 'tuned' ), 'id' => 'isb-template-carousel', 'before_widget' => '
', )); register_sidebar(array( 'name' => __('Footer - 4 Column Grid', 'tuned'), 'description' => __( 'Appears in the Footer Area. This is a 4 column grid.', 'tuned' ), 'id' => 'footer-4col-grid', 'before_widget' => '', )); register_widget('Tuned_Hero_Widget'); register_widget('Tuned_Category_Widget'); register_widget('Tuned_Carousel_Widget'); } add_action( 'widgets_init', 'tuned_widgets_init' ); require_once( 'inc/widgets.php' ); /* Content navigation ----------------------------------------------------------*/ if( !function_exists( 'tuned_content_nav' ) ) { function tuned_content_nav( $nav_id ) { global $wp_query; $nav_id = esc_attr( $nav_id ); if( $wp_query->max_num_pages > 1 ) : ?> -
= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'tuned' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'tuned_wp_title', 10, 2 ); ?>