__( 'Primary Menu', 'briar' ),
) );
/*
* 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',
'chat',
'image',
'gallery',
'audio',
'video',
'quote',
'status',
'link',
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'briar_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded
tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
}
endif; // End briar_setup.
add_action( 'after_setup_theme', 'briar_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function briar_content_width() {
$GLOBALS['content_width'] = apply_filters( 'briar_content_width', 1080 );
}
add_action( 'after_setup_theme', 'briar_content_width', 0 );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
* @since 1.0
*/
function briar_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'briar' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'briar_widgets_init' );
/**
* Enqueue admin scripts and styles.
*
* @since 1.0
*/
function briar_admin_scripts() {
/**
* Customize control Color scheme
*/
wp_register_style( 'briar-customize-control-color-scheme', get_template_directory_uri() . '/admin/css/briar-customize-control-color-scheme.css', array( 'customize-controls' ), '20150610', 'all' );
wp_register_script( 'briar-customize-control-color-scheme', get_template_directory_uri() . '/admin/js/briar-customize-control-color-scheme.js', array( 'customize-controls', 'jquery' ), '20150610', true );
/**
* Customize control Social buttons
*/
wp_register_style( 'briar-customize-control-social-buttons', get_template_directory_uri() . '/admin/css/briar-customize-control-social-buttons.css', array( 'customize-controls' ), '20150610', 'all' );
wp_register_script( 'briar-customize-control-social-buttons', get_template_directory_uri() . '/admin/js/briar-customize-control-social-buttons.js', array( 'customize-controls', 'jquery' ), '20150610', true );
/**
* Customize control Layout
*/
wp_register_style( 'briar-customize-control-layout', get_template_directory_uri() . '/admin/css/briar-customize-control-layout.css', array( 'customize-controls' ), '20150610', 'all' );
wp_register_script( 'briar-customize-control-layout', get_template_directory_uri() . '/admin/js/briar-customize-control-layout.js', array( 'customize-controls', 'jquery' ), '20140806', true );
}
add_action( 'admin_enqueue_scripts', 'briar_admin_scripts' );
/**
* Add editor styles
* @since 1.1
*/
function briar_add_editor_styles() {
add_editor_style( get_template_directory_uri() . '/admin/css/briar-editor.css' );
}
add_action( 'admin_init', 'briar_add_editor_styles' );
/**
* Add TinyMCE google fonts plugin
*
* @since 1.1
*
* @param array $plugins TinyMCE plugins.
* @return array $plugins
*/
function add_tinymce_googlefonts( $plugins ) {
$plugins['briar_googlefonts'] = get_template_directory_uri() . '/admin/js/briar-tinymce.plugins.googlefonts.js';
return $plugins;
}
add_filter( 'mce_external_plugins', 'add_tinymce_googlefonts' );
/**
* Enqueue scripts and styles.
*
* @since 1.0
*/
function briar_scripts() {
$styles = array(
'red' => '-red',
'orange' => '-orange',
'yellow' => '-yellow',
'blue' => '-blue',
'violet' => '-violet',
'green' => '-green',
);
$theme_style = get_theme_mod( 'briar_scheme', 'red' );
if ( ! array_key_exists( $theme_style, $styles ) ) {
$theme_style = 'red';
}
wp_enqueue_style( 'briar-style', get_template_directory_uri() . '/css/style.css' );
wp_enqueue_style( 'briar-style-' . $theme_style, get_template_directory_uri() . '/css/style' . $styles[ $theme_style ] . '.css', array( 'briar-style' ) );
wp_enqueue_script( 'briar-scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ), '', true );
wp_enqueue_script( 'briar-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20150610', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'briar_scripts' );
/**
* Import fonts
*/
function briar_fonts() {
?>