File: /var/www/web37/htdocs/0900-notruf/wp-content/themes/brickyard/functions/customizer.php
<?php
/**
 * BrickYard Theme Customizer.
 * @package BrickYard
 * @since BrickYard 2.0.0
*/
/**
 * Default values - backwards compatibility for older BrickYard versions.
 *  
*/ 
function brickyard_default_options($key) {
$brickyard_theme_options = get_option('brickyard_options');
/* Define the array of defaults */ 
$brickyard_defaults = array(
			'brickyard_css' => 'Orange (default)',
      'brickyard_display_background_pattern' => 'Display',
      'brickyard_background_pattern_opacity' => 'Default',
      'brickyard_display_sidebar' => 'Display',
      'brickyard_content_archives' => 'Excerpt',
			'brickyard_display_breadcrumb' => 'Display',
			'brickyard_display_header_image' => 'Everywhere',
			'brickyard_logo_url' => '',
      'brickyard_display_site_description' => 'Display',
      'brickyard_display_search_form' => 'Display',
			'brickyard_display_image_post' => 'Display',
			'brickyard_display_meta_post' => 'Display',
			'brickyard_next_preview_post' => 'Display',
			'brickyard_display_image_page' => 'Display',
      'brickyard_display_latest_posts' => 'Display',
      'brickyard_latest_posts_headline' => 'Latest Posts',
			'brickyard_body_google_fonts' => 'default',
			'brickyard_headings_google_fonts' => 'default',
      'brickyard_description_google_fonts' => 'default',
			'brickyard_headline_google_fonts' => 'default',
      'brickyard_headline_box_google_fonts' => 'default',
			'brickyard_postentry_google_fonts' => 'default',
			'brickyard_sidebar_google_fonts' => 'default',
			'brickyard_menu_google_fonts' => 'default',
      'brickyard_top_menu_google_fonts' => 'default',
      'brickyard_header_facebook_link' => '',
      'brickyard_header_twitter_link' => '',
      'brickyard_header_google_link' => '',
      'brickyard_header_rss_link' => '',
			'brickyard_own_css' => '' );
$brickyard_theme_options = wp_parse_args( $brickyard_theme_options, $brickyard_defaults );
if ( isset($brickyard_theme_options[$key]) ) {
return $brickyard_theme_options[$key]; } else {
return false;
}}
/**
 * Register Customizer sections and options.
 *  
*/
function brickyard_customize_register($wp_customize){
$brickyard_fonts = array(
			'default' => 'default',	
			'Abel' => 'Abel',			
			'Aclonica' => 'Aclonica',
			'Actor' => 'Actor',
			'Adamina' => 'Adamina',
			'Aldrich' => 'Aldrich',
			'Alegreya Sans' => 'Alegreya Sans',
			'Alice' => 'Alice',
			'Alike' => 'Alike',
			'Allan' => 'Allan',
			'Allerta' => 'Allerta',
      'Amarante' => 'Amarante',
			'Amaranth' => 'Amaranth',
      'Andika' => 'Andika',
			'Antic' => 'Antic',
			'Anton' => 'Anton',
			'Arimo' => 'Arimo',	
			'Artifika' => 'Artifika',
			'Arvo' => 'Arvo',
			'Bitter' => 'Bitter',
			'Brawler' => 'Brawler',
			'Buda' => 'Buda',	
      'Butcherman' => 'Butcherman',	
      'Cabin' => 'Cabin',
			'Candal' => 'Candal',
			'Cantarell' => 'Cantarell',	
      'Cherry Swash' => 'Cherry Swash',				
			'Chivo' => 'Chivo',			
			'Coda' => 'Coda',	
      'Concert One' => 'Concert One',		
			'Copse' => 'Copse',
			'Corben' => 'Corben',
			'Cousine' => 'Cousine',			
			'Coustard' => 'Coustard',
			'Covered By Your Grace' => 'Covered By Your Grace',
			'Crafty Girls' => 'Crafty Girls',
			'Crimson Text' => 'Crimson Text',
			'Crushed' => 'Crushed',
			'Cuprum' => 'Cuprum',
			'Damion' => 'Damion',
			'Dancing Script' => 'Dancing Script',
			'Dawning of a New Day' => 'Dawning of a New Day',
			'Days One' => 'Days One',
			'Delius' => 'Delius',
			'Delius Swash Caps' => 'Delius Swash Caps',
			'Delius Unicase' => 'Delius Unicase',
			'Didact Gothic' => 'Didact Gothic',
			'Dorsa' => 'Dorsa',
			'Dosis' => 'Dosis',
			'Droid Sans' => 'Droid Sans',
			'Droid Sans Mono' => 'Droid Sans Mono',
      'Droid Serif' => 'Droid Serif',
			'EB Garamond' => 'EB Garamond',
			'Expletus Sans' => 'Expletus Sans',
			'Fanwood Text' => 'Fanwood Text',
			'Federo' => 'Federo',
			'Fontdiner Swanky' => 'Fontdiner Swanky',
			'Forum' => 'Forum',
			'Francois One' => 'Francois One',
			'Gentium Basic' => 'Gentium Basic',
			'Gentium Book Basic' => 'Gentium Book Basic',
			'Geo' => 'Geo',
			'Geostar' => 'Geostar',
			'Geostar Fill' => 'Geostar Fill',
      'Gilda Display' => 'Gilda Display',
			'Give You Glory' => 'Give You Glory',
			'Gloria Hallelujah' => 'Gloria Hallelujah',
			'Goblin One' => 'Goblin One',
			'Goudy Bookletter 1911' => 'Goudy Bookletter 1911',
			'Gravitas One' => 'Gravitas One',
			'Gruppo' => 'Gruppo',
			'Hammersmith One' => 'Hammersmith One',
			'Hind' => 'Hind',
			'Holtwood One SC' => 'Holtwood One SC',
			'Homemade Apple' => 'Homemade Apple',
			'Inconsolata' => 'Inconsolata',
			'Indie Flower' => 'Indie Flower',
      'IM Fell English' => 'IM Fell English',
			'Irish Grover' => 'Irish Grover',
			'Irish Growler' => 'Irish Growler',
			'Istok Web' => 'Istok Web',
			'Judson' => 'Judson',
			'Julee' => 'Julee',
			'Just Another Hand' => 'Just Another Hand',
			'Just Me Again Down Here' => 'Just Me Again Down Here',
			'Kameron' => 'Kameron',
			'Kelly Slab' => 'Kelly Slab',
			'Kenia' => 'Kenia',
			'Kranky' => 'Kranky',
			'Kreon' => 'Kreon',
			'Kristi' => 'Kristi',
			'La Belle Aurore' => 'La Belle Aurore',
      'Lato' => 'Lato',
			'League Script' => 'League Script',
			'Leckerli One' => 'Leckerli One',
			'Lekton' => 'Lekton',
      'Lily Script One' => 'Lily Script One',
			'Limelight' => 'Limelight',
			'Lobster' => 'Lobster',
			'Lobster Two' => 'Lobster Two',
			'Lora' => 'Lora',
			'Love Ya Like A Sister' => 'Love Ya Like A Sister',
			'Loved by the King' => 'Loved by the King',
      'Lovers Quarrel' => 'Lovers Quarrel',
			'Luckiest Guy' => 'Luckiest Guy',
			'Maiden Orange' => 'Maiden Orange',
			'Mako' => 'Mako',
			'Marvel' => 'Marvel',
			'Maven Pro' => 'Maven Pro',
			'Meddon' => 'Meddon',
			'MedievalSharp' => 'MedievalSharp',
      'Medula One' => 'Medula One',
			'Megrim' => 'Megrim',
			'Merienda One' => 'Merienda One',
			'Merriweather' => 'Merriweather',
			'Metrophobic' => 'Metrophobic',
			'Michroma' => 'Michroma',
			'Miltonian Tattoo' => 'Miltonian Tattoo',
			'Miltonian' => 'Miltonian',
			'Modern Antiqua' => 'Modern Antiqua',
			'Molengo' => 'Molengo',
      'Monofett' => 'Monofett',
			'Monoton' => 'Monoton',
      'Montaga' => 'Montaga',
			'Montez' => 'Montez',
      'Montserrat' => 'Montserrat',
			'Mountains of Christmas' => 'Mountains of Christmas',
			'Muli' => 'Muli',
			'Neucha' => 'Neucha',
			'Neuton' => 'Neuton',
			'News Cycle' => 'News Cycle',
			'Nixie One' => 'Nixie One',
			'Nobile' => 'Nobile',
			'Noto Sans' => 'Noto Sans',
			'Nova Cut' => 'Nova Cut',
			'Nova Flat' => 'Nova Flat',
			'Nova Mono' => 'Nova Mono',
			'Nova Oval' => 'Nova Oval',
			'Nova Round' => 'Nova Round',
			'Nova Script' => 'Nova Script',
			'Nova Slim' => 'Nova Slim',
			'Nova Square' => 'Nova Square',
			'Numans' => 'Numans',
			'Nunito' => 'Nunito',
      'Open Sans' => 'Open Sans',
			'Oswald' => 'Oswald',
			'Over the Rainbow' => 'Over the Rainbow',
			'Ovo' => 'Ovo',
			'Oxygen' => 'Oxygen',
			'Pacifico' => 'Pacifico',
			'Passero One' => 'Passero One',
			'Passion One' => 'Passion One',
			'Patrick Hand' => 'Patrick Hand',
			'Paytone One' => 'Paytone One',
			'Permanent Marker' => 'Permanent Marker',
			'Philosopher' => 'Philosopher',
			'Play' => 'Play',
			'Playfair Display' => 'Playfair Display',
			'Podkova' => 'Podkova',
			'Poller One' => 'Poller One',
			'Pompiere' => 'Pompiere',
			'Prata' => 'Prata',
			'Prociono' => 'Prociono',
			'PT Sans' => 'PT Sans',
			'PT Sans Caption' => 'PT Sans Caption',
			'PT Sans Narrow' => 'PT Sans Narrow',
			'PT Serif' => 'PT Serif',
			'PT Serif Caption' => 'PT Serif Caption',
			'Puritan' => 'Puritan',
			'Quattrocento' => 'Quattrocento',
			'Quattrocento Sans' => 'Quattrocento Sans',
			'Questrial' => 'Questrial',
			'Radley' => 'Radley',
			'Raleway' => 'Raleway', 
      'Rationale' => 'Rationale',
			'Redressed' => 'Redressed',
      'Reenie Beanie' => 'Reenie Beanie', 
      'Roboto' => 'Roboto',
      'Roboto Condensed' => 'Roboto Condensed',
			'Rock Salt' => 'Rock Salt',
			'Rochester' => 'Rochester',
			'Rokkitt' => 'Rokkitt',
			'Rosario' => 'Rosario',
			'Ruslan Display' => 'Ruslan Display',
      'Sancreek' => 'Sancreek',
			'Sansita One' => 'Sansita One',
			'Schoolbell' => 'Schoolbell',
			'Shadows Into Light' => 'Shadows Into Light',
			'Shanti' => 'Shanti',
			'Short Stack' => 'Short Stack',
			'Sigmar One' => 'Sigmar One',
			'Six Caps' => 'Six Caps',
			'Slackey' => 'Slackey',
			'Smokum' => 'Smokum',
			'Smythe' => 'Smythe',
			'Sniglet' => 'Sniglet',
			'Snippet' => 'Snippet',
			'Sorts Mill Goudy' => 'Sorts Mill Goudy',
			'Special Elite' => 'Special Elite',
			'Spinnaker' => 'Spinnaker',
			'Stardos Stencil' => 'Stardos Stencil',
			'Sue Ellen Francisco' => 'Sue Ellen Francisco',
			'Sunshiney' => 'Sunshiney',
			'Swanky and Moo Moo' => 'Swanky and Moo Moo',
			'Syncopate' => 'Syncopate',
			'Tangerine' => 'Tangerine',
			'Tenor Sans' => 'Tenor Sans',
			'Terminal Dosis Light' => 'Terminal Dosis Light',
			'Tinos' => 'Tinos',
			'Titillium Web' => 'Titillium Web',
			'Tulpen One' => 'Tulpen One',
			'Ubuntu' => 'Ubuntu',
			'Ultra' => 'Ultra',
      'UnifrakturCook' => 'UnifrakturCook',
			'UnifrakturMaguntia' => 'UnifrakturMaguntia',
      'Unkempt' => 'Unkempt',
			'Unna' => 'Unna',
			'Varela' => 'Varela',
			'Varela Round' => 'Varela Round',
			'Vibur' => 'Vibur',
			'Vidaloka' => 'Vidaloka',
			'Volkhov' => 'Volkhov',
			'Vollkorn' => 'Vollkorn',
			'Voltaire' => 'Voltaire',
			'VT323' => 'VT323',
			'Waiting for the Sunrise' => 'Waiting for the Sunrise',
			'Wallpoet' => 'Wallpoet',
			'Walter Turncoat' => 'Walter Turncoat',
			'Wire One' => 'Wire One',
			'Yanone Kaffeesatz' => 'Yanone Kaffeesatz',
			'Yellowtail' => 'Yellowtail',
			'Yeseva One' => 'Yeseva One',
			'Zeyada' => 'Zeyada');
      
/**
 * Textarea custom control.
 *  
*/ 
class brickyard_customize_textarea_control extends WP_Customize_Control {
    public $type = 'textarea'; 
    public function render_content() { ?>
        <label>
        <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
        <textarea rows="5" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
        </label>
<?php }}
/**
 * Sections and Options.
 *  
*/     
    $wp_customize->add_section('brickyard_general_settings', array(
        'title'    => __('BrickYard General Settings', 'brickyard'),
        'description' => '',
        'priority' => 120,
    ));
    $wp_customize->add_section('brickyard_header_settings', array(
        'title'    => __('BrickYard Header Settings', 'brickyard'),
        'description' => '',
        'priority' => 130,
    ));
    $wp_customize->add_section('brickyard_posts_settings', array(
        'title'    => __('BrickYard Posts/Pages Settings', 'brickyard'),
        'description' => '',
        'priority' => 140,
    ));
    $wp_customize->add_section('brickyard_post_entries_settings', array(
        'title'    => __('BrickYard Homepage/Blog Page Settings', 'brickyard'),
        'description' => '',
        'priority' => 150,
    ));
    $wp_customize->add_section('brickyard_font_settings', array(
        'title'    => __('BrickYard Font Settings', 'brickyard'),
        'description' => '',
        'priority' => 160,
    ));
 
    //  =============================
    //  = Color Scheme              =
    //  =============================
    $wp_customize->add_setting('brickyard_css', array(
        'default'        => brickyard_default_options('brickyard_css'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_css_control', array(
        'label'      => __('Color Scheme', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_css',
        'type'       => 'radio',
        'choices'    => array(
            'Orange (default)' => __( 'Orange (default)' , 'brickyard' ),
            'Blue' => __( 'Blue' , 'brickyard' ),
            'Red' => __( 'Red' , 'brickyard' ),
        ),
    ));
    
    //  ==================================
    //  = Display Background Pattern     =
    //  ==================================
    $wp_customize->add_setting('brickyard_display_background_pattern', array(
        'default'        => brickyard_default_options('brickyard_display_background_pattern'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_background_pattern_control', array(
        'label'      => __('Display Background Pattern', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_display_background_pattern',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  =================================
    //  = Background Pattern Opacity    =
    //  =================================
    $wp_customize->add_setting('brickyard_background_pattern_opacity', array(
        'default'        => brickyard_default_options('brickyard_background_pattern_opacity'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_background_pattern_opacity_control', array(
        'label'      => __('Background Pattern Opacity', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_background_pattern_opacity',
        'type'       => 'radio',
        'choices'    => array(
            'Default' => __( 'Default' , 'brickyard' ),
            '100' => '100',
            '90' => '90',
            '80' => '80',
            '70' => '70',
            '60' => '60',
            '50' => '50',
            '40' => '40',
            '30' => '30',
            '20' => '20',
            '10' => '10',
        ),
    ));
    
    //  ==================================
    //  = Display Sidebar                =
    //  ==================================
    $wp_customize->add_setting('brickyard_display_sidebar', array(
        'default'        => brickyard_default_options('brickyard_display_sidebar'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_sidebar_control', array(
        'label'      => __('Display Right Sidebar', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_display_sidebar',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  ===============================
    //  = Content/Excerpt Displaying  =
    //  ===============================
    $wp_customize->add_setting('brickyard_content_archives', array(
        'default'        => brickyard_default_options('brickyard_content_archives'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_content_archives_control', array(
        'label'      => __('Content/Excerpt Displaying on Post Archives', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_content_archives',
        'type'       => 'radio',
        'choices'    => array(
            'Excerpt' => __( 'Excerpt' , 'brickyard' ),
            'Content' => __( 'Content' , 'brickyard' ),
        ),
    ));
    
    //  =============================
    //  = Excerpt Length            =
    //  =============================
    $wp_customize->add_setting('brickyard_excerpt_length', array(
        'default'        => '40',
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_excerpt_length_control', array(
        'label'      => __('Excerpt Length (number of words)', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_excerpt_length',
    ));
    
    //  =================================
    //  = Display Breadcrumb Navigation =
    //  =================================
    $wp_customize->add_setting('brickyard_display_breadcrumb', array(
        'default'        => brickyard_default_options('brickyard_display_breadcrumb'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_breadcrumb_control', array(
        'label'      => __('Display Breadcrumb Navigation', 'brickyard'),
        'section'    => 'brickyard_general_settings',
        'settings'   => 'brickyard_display_breadcrumb',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  ==================================
    //  = Display Header Image           =
    //  ==================================
    $wp_customize->add_setting('brickyard_display_header_image', array(
        'default'        => brickyard_default_options('brickyard_display_header_image'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_header_image_control', array(
        'label'      => __('Display Header Image', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_display_header_image',
        'type'       => 'radio',
        'choices'    => array(
            'Everywhere' => __( 'Everywhere' , 'brickyard' ),
            'Only on Homepage' => __( 'Only on Homepage' , 'brickyard' ),
        ),
    ));
    
    //  =============================
    //  = Header Logo               =
    //  =============================
    $wp_customize->add_setting('brickyard_logo_url', array(
        'default'        => brickyard_default_options('brickyard_logo_url'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_uri',
    ));
 
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'brickyard_logo_url_control', array(
        'label'    => __('Header Logo', 'brickyard'),
        'section'  => 'brickyard_header_settings',
        'settings' => 'brickyard_logo_url',
    )));
    
    //  ====================================
    //  = Display Site Description         =
    //  ====================================
    $wp_customize->add_setting('brickyard_display_site_description', array(
        'default'        => brickyard_default_options('brickyard_display_site_description'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_site_description_control', array(
        'label'      => __('Display Site Description', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_display_site_description',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  ====================================
    //  = Display Search Form              =
    //  ====================================
    $wp_customize->add_setting('brickyard_display_search_form', array(
        'default'        => brickyard_default_options('brickyard_display_search_form'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_search_form_control', array(
        'label'      => __('Display Search Form', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_display_search_form',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  =============================
    //  = Facebook Link             =
    //  =============================
    $wp_customize->add_setting('brickyard_header_facebook_link', array(
        'default'        => brickyard_default_options('brickyard_header_facebook_link'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_uri',
    ));
 
    $wp_customize->add_control('brickyard_header_facebook_link_control', array(
        'label'      => __('Facebook Link', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_header_facebook_link',
    ));
    
    //  =============================
    //  = Twitter Link              =
    //  =============================
    $wp_customize->add_setting('brickyard_header_twitter_link', array(
        'default'        => brickyard_default_options('brickyard_header_twitter_link'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_uri',
    ));
 
    $wp_customize->add_control('brickyard_header_twitter_link_control', array(
        'label'      => __('Twitter Link', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_header_twitter_link',
    ));
    
    //  =============================
    //  = Google+ Link              =
    //  =============================
    $wp_customize->add_setting('brickyard_header_google_link', array(
        'default'        => brickyard_default_options('brickyard_header_google_link'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_uri',
    ));
 
    $wp_customize->add_control('brickyard_header_google_link_control', array(
        'label'      => __('Google+ Link', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_header_google_link',
    ));
    
    //  =============================
    //  = RSS Link                  =
    //  =============================
    $wp_customize->add_setting('brickyard_header_rss_link', array(
        'default'        => brickyard_default_options('brickyard_header_rss_link'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_uri',
    ));
 
    $wp_customize->add_control('brickyard_header_rss_link_control', array(
        'label'      => __('RSS Link', 'brickyard'),
        'section'    => 'brickyard_header_settings',
        'settings'   => 'brickyard_header_rss_link',
    ));
    
    //  ==========================================
    //  = Display Featured Image on single posts =
    //  ==========================================
    $wp_customize->add_setting('brickyard_display_image_post', array(
        'default'        => brickyard_default_options('brickyard_display_image_post'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_image_post_control', array(
        'label'      => __('Display Featured Image on single posts', 'brickyard'),
        'section'    => 'brickyard_posts_settings',
        'settings'   => 'brickyard_display_image_post',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  ====================================
    //  = Display Meta Box on single posts =
    //  ====================================
    $wp_customize->add_setting('brickyard_display_meta_post', array(
        'default'        => brickyard_default_options('brickyard_display_meta_post'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_meta_post_control', array(
        'label'      => __('Display Meta Box on single posts', 'brickyard'),
        'section'    => 'brickyard_posts_settings',
        'settings'   => 'brickyard_display_meta_post',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  =================================
    //  = Next/Previous Post Navigation =
    //  =================================
    $wp_customize->add_setting('brickyard_next_preview_post', array(
        'default'        => brickyard_default_options('brickyard_next_preview_post'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_next_preview_post_control', array(
        'label'      => __('Display Next/Previous Post Navigation on single posts', 'brickyard'),
        'section'    => 'brickyard_posts_settings',
        'settings'   => 'brickyard_next_preview_post',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  ==========================================
    //  = Display Featured Image on pages        =
    //  ==========================================
    $wp_customize->add_setting('brickyard_display_image_page', array(
        'default'        => brickyard_default_options('brickyard_display_image_page'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_image_page_control', array(
        'label'      => __('Display Featured Image on pages', 'brickyard'),
        'section'    => 'brickyard_posts_settings',
        'settings'   => 'brickyard_display_image_page',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  ====================================
    //  = Display Latest Posts             =
    //  ====================================
    $wp_customize->add_setting('brickyard_display_latest_posts', array(
        'default'        => brickyard_default_options('brickyard_display_latest_posts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_display_latest_posts_control', array(
        'label'      => __('Display Latest Posts section on Latest Posts (Blog) page', 'brickyard'),
        'section'    => 'brickyard_post_entries_settings',
        'settings'   => 'brickyard_display_latest_posts',
        'type'       => 'radio',
        'choices'    => array(
            'Display' => __( 'Display' , 'brickyard' ),
            'Hide' => __( 'Hide' , 'brickyard' ),
        ),
    ));
    
    //  =================================
    //  = Latest Posts section headline =
    //  =================================
    $wp_customize->add_setting('brickyard_latest_posts_headline', array(
        'default'        => brickyard_default_options('brickyard_latest_posts_headline'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
    ));
 
    $wp_customize->add_control('brickyard_latest_posts_headline_control', array(
        'label'      => __('Latest Posts (Blog) page headline', 'brickyard'),
        'section'    => 'brickyard_post_entries_settings',
        'settings'   => 'brickyard_latest_posts_headline',
    ));
    
    //  =============================
    //  = Body font                 =
    //  =============================
     $wp_customize->add_setting('brickyard_body_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_body_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_body_google_fonts_control', array(
        'settings' => 'brickyard_body_google_fonts',
        'label'   => __('Body font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Site Title font           =
    //  =============================
     $wp_customize->add_setting('brickyard_headings_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_headings_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_headings_google_fonts_control', array(
        'settings' => 'brickyard_headings_google_fonts',
        'label'   => __('Site Title font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Site Description font     =
    //  =============================
     $wp_customize->add_setting('brickyard_description_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_description_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_description_google_fonts_control', array(
        'settings' => 'brickyard_description_google_fonts',
        'label'   => __('Site Description font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Page/Post Headlines font  =
    //  =============================
     $wp_customize->add_setting('brickyard_headline_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_headline_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_headline_google_fonts_control', array(
        'settings' => 'brickyard_headline_google_fonts',
        'label'   => __('Page/Post Headlines (h1 - h6) font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  ==========================================
    //  = BrickYard Posts Widgets headlines font =
    //  ==========================================
     $wp_customize->add_setting('brickyard_headline_box_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_headline_box_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_headline_box_google_fonts_control', array(
        'settings' => 'brickyard_headline_box_google_fonts',
        'label'   => __('BrickYard Posts Widgets headlines font (in Latest Posts Homepage widget area)', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Post Entry Headline font  =
    //  =============================
     $wp_customize->add_setting('brickyard_postentry_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_postentry_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_postentry_google_fonts_control', array(
        'settings' => 'brickyard_postentry_google_fonts',
        'label'   => __('Post Entry Headline font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  ========================================
    //  = Sidebar/Footer Widget Headlines font =
    //  ========================================
     $wp_customize->add_setting('brickyard_sidebar_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_sidebar_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_sidebar_google_fonts_control', array(
        'settings' => 'brickyard_sidebar_google_fonts',
        'label'   => __('Sidebar/Footer Widget Headlines font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Main Header Menu font     =
    //  =============================
     $wp_customize->add_setting('brickyard_menu_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_menu_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_menu_google_fonts_control', array(
        'settings' => 'brickyard_menu_google_fonts',
        'label'   => __('Main Header Menu font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Top Header Menu font      =
    //  =============================
     $wp_customize->add_setting('brickyard_top_menu_google_fonts', array(
        'default'        => brickyard_default_options('brickyard_top_menu_google_fonts'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'brickyard_sanitize_text',
 
    ));
    $wp_customize->add_control( 'brickyard_top_menu_google_fonts_control', array(
        'settings' => 'brickyard_top_menu_google_fonts',
        'label'   => __('Top Header Menu font', 'brickyard'),
        'section' => 'brickyard_font_settings',
        'type'    => 'select',
        'choices'    => $brickyard_fonts,
    ));
    
    //  =============================
    //  = Custom CSS                =
    //  =============================
    $wp_customize->add_setting('brickyard_own_css', array(
        'default'        => brickyard_default_options('brickyard_own_css'),
        'capability'     => 'edit_theme_options',
        'type'           => 'theme_mod',
        'sanitize_callback' => 'wp_filter_nohtml_kses',
    ));
 
    $wp_customize->add_control( new brickyard_customize_textarea_control($wp_customize, 'brickyard_own_css_control', array(
        'label'    => __('Custom CSS', 'brickyard'),
        'section'  => 'brickyard_general_settings',
        'settings' => 'brickyard_own_css',
    )));
}
add_action('customize_register', 'brickyard_customize_register');
/**
 * Sanitize URIs
*/
function brickyard_sanitize_uri($uri) {
	if('' === $uri){
		return '';
	}
	return esc_url_raw($uri);
}
/**
 * Sanitize Texts
*/
function brickyard_sanitize_text($str) {
	if('' === $str){
		return '';
	}
	return sanitize_text_field( $str);
} ?>