Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
ce40282c7b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
58 lines (49 sloc) 1.79 KB
<?php
/*
*
* SHERMAN
*
*/
// Remove the Header Image Feature
function sherman_remove_theme_features() {
remove_theme_support( 'custom-header' );
remove_theme_support( 'custom-background' );
remove_theme_support( 'post-formats' );
}
add_action( 'init', 'sherman_remove_theme_features' );
function sherman_customize_register( $wp_customize ) {
//$wp_customize->remove_section('colors');
$wp_customize->remove_section('background_image');
$wp_customize->remove_section('nav');
}
add_action( 'customize_register', 'sherman_customize_register' );
// Add Options for Sherman-specific Color options.
function sherman_titlebar_register( $wp_customize ){
$wp_customize->add_setting( 'themeColor', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'default' => 'sherman-default', //Default setting/value to save
'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh'
)
);
$wp_customize->add_control('themeColor', array(
'type' => 'radio',
'label' => 'Stylesheet',
'section' => 'colors',
'choices' => array(
'sherman-default' => 'Sherman Default',
'sherman-red' => 'Sherman Red',
'sherman-black' => 'Sherman Black',
)
)
);
}
add_action( 'customize_register', 'sherman_titlebar_register' , 34);
function sherman_scripts() {
wp_enqueue_script( 'sherman-js', get_stylesheet_directory_uri() . '/javascripts/min/sherman.min.js', array( 'jquery' ));
$stylesheet = get_theme_mod('themeColor');
wp_enqueue_style( $stylesheet, get_stylesheet_directory_uri() . '/stylesheets/'.$stylesheet.'.css', array('cs-style') );
}
add_action( 'wp_enqueue_scripts', 'sherman_scripts');
?>