Name );
define( 'C_VERSION', $theme_data->Version );
define( 'C_ROOT', get_template_directory_uri() );
define( 'C_CORE', get_template_directory_uri().'/core' );
/**
* Theme Setup
*/
add_action( 'after_setup_theme', 'broadwell_setup', 10 );
if ( ! function_exists( 'broadwell_setup' ) ) {
function broadwell_setup() {
/* One-time Configuration on Activation */
broadwell_activate();
/* Load TextDomain at theme level. */
load_theme_textdomain( 'broadwell', C_ROOT. '/languages' );
/* Add default posts and comments RSS feed links to head. */
add_theme_support( 'automatic-feed-links' );
/* Let Wordpress handle the title tag */
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
/*
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link',
) );
/*
* Apply theme styles to the editor
*/
add_editor_style( C_ROOT.'/css/editor-style.css' );
}
}
/**
* Sidebar & Footer Widget
*/
add_action( 'widgets_init', 'broadwell_widgets_init' );
function broadwell_widgets_init() {
register_sidebar(array(
'name' => __('Main Sidebar', 'broadwell' ),
'description' => __('Only visible on posts and pages', 'broadwell' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
'
) );
register_sidebar(array(
'name' => __('Footer Widget', 'broadwell' ),
'description' => __('The right column in the site footer.', 'broadwell' ),
'id' => 'footer-widget',
'before_widget' => '',
'before_title' => ''
) );
}
/**
* Styles & Scripts
*/
add_action( 'wp_enqueue_scripts', 'broadwell_scripts' );
function broadwell_scripts() {
/* CSS */
wp_enqueue_style( 'broadwell-roboto', '//fonts.googleapis.com/css?family=Roboto:400,700' );
wp_enqueue_style( 'broadwell-ssp', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700' );
wp_enqueue_style( 'broadwell-mdi-icons', C_ROOT . '/material-design/css/material-design-iconic-font.min.css' );
wp_enqueue_style( 'broadwell-bootstrap', C_ROOT . '/bootstrap/css/bootstrap.min.css' );
wp_enqueue_style( 'broadwell-style', get_stylesheet_uri() );
wp_enqueue_style( 'broadwell-dynamic', C_ROOT . '/css/dynamic.css' );
/* JS */
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'broadwell-head', C_ROOT . '/js/head.min.js', null, null, true );
wp_enqueue_script( 'bootstrap-js', C_ROOT . '/bootstrap/js/bootstrap.min.js', array( 'jquery' ), 'v3.3.5', true );
wp_enqueue_script( 'broadwell-scripts', C_ROOT . '/js/broadwell.js',array( 'jquery' ), null, true );
wp_enqueue_script( 'broadwell-navigation', C_ROOT . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'broadwell-skip-link-focus-fix', C_ROOT . '/js/skip-link-focus-fix.js', array(), '20130115', true );
wp_enqueue_script( 'broadwell-succint', C_ROOT . '/js/succinct.min.js',array( 'jquery' ), null, true );
wp_enqueue_script( 'broadwell-center', C_ROOT . '/js/flex-center.js',array( 'jquery' ), null, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
/**
* Includes from Underscores
*/
/* Custom template tags for this theme. */
require get_template_directory() . '/inc/template-tags.php';
/* Custom functions that act independently of the theme templates.*/
require get_template_directory() . '/inc/extras.php';
/* Load Jetpack compatibility file. */
require get_template_directory() . '/inc/jetpack.php';
/**
* Includes specific to the theme
*/
/* Bootstrap integration */
require get_template_directory() . '/inc/functions-strap.php';
/* Theme Settings */
require get_template_directory() . '/core/broadwell-settings.php';
/* Theme Functions */
require get_template_directory() . '/core/broadwell-functions.php';