/**
* This hooks into 'customize_register' (available as of WP 3.4) and allows
* you to add new sections and controls to the Theme Customize screen.
*
* Note: To enable instant preview, we have to actually write a bit of custom
* javascript. See live_preview() for more.
*
* @see add_action('customize_register',$func)
* @param \WP_Customize_Manager $wp_customize
* @link http://ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own-themes/
* @since ProGo 0.4
*/
public static function register($wp_customize)
{
// Page Layout Settings
$wp_customize->add_section('pgb_options[layout]', array('title' => 'ProGo Layout and Options', 'priority' => 10, 'description' => ''));
$wp_customize->add_setting('pgb_options[container_width]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_container_width')));
$wp_customize->add_setting('pgb_options[bootstrap_theme]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_bootstrap_theme')));
$wp_customize->add_control('pgb_options[container_width]', array('label' => __('Page Container Width', 'pgb'), 'section' => 'pgb_options[layout]', 'settings' => 'pgb_options[container_width]', 'type' => 'select', 'choices' => array('full' => 'Full Width (100%)', '1366' => '1366px', '1240' => '1240px', '1170' => '1170px', '1080' => '1080px', '960' => '960px')));
$wp_customize->add_control('pgb_options[bootstrap_theme]', array('label' => __('Bootstrap Theme', 'pgb'), 'section' => 'pgb_options[layout]', 'settings' => 'pgb_options[bootstrap_theme]', 'type' => 'select', 'choices' => array('default' => 'Default Bootstrap', 'cerulean' => 'Cerulean', 'cosmo' => 'Cosmo', 'cyborg' => 'Cyborg', 'darkly' => 'Darkly', 'flatly' => 'Flatly', 'journal' => 'Journal', 'lumen' => 'Lumen', 'paper' => 'Paper', 'readable' => 'Readable', 'sandstone' => 'Sandstone', 'simplex' => 'Simplex', 'slate' => 'Slate', 'spacelab' => 'Spacelab', 'superhero' => 'Superhero', 'united' => 'United', 'yeti' => 'Yeti')));
// Logo Settings
$wp_customize->add_section('pgb_options[logo]', array('title' => 'Logos', 'priority' => 30, 'description' => ''));
$wp_customize->add_setting('pgb_options[logo_mobile]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_logo')));
$wp_customize->add_setting('pgb_options[logo_tablet]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_logo')));
$wp_customize->add_setting('pgb_options[logo_desktop]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_logo')));
$wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize, 'pgb_options[logo_mobile]', array('label' => __('Navbar Icon / Mobile Logo', 'pgb'), 'section' => 'pgb_options[logo]', 'settings' => 'pgb_options[logo_mobile]', 'description' => 'Add your logo to the Bootstrap <a href="http://getbootstrap.com/components/#navbar-brand-image" target="_blank">Brand Image</a> position. Displayed on screens under 768px wide.')));
$wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize, 'pgb_options[logo_tablet]', array('label' => __('Tablet Logo', 'pgb'), 'section' => 'pgb_options[logo]', 'settings' => 'pgb_options[logo_tablet]', 'description' => 'Tablet logo is displayed on screens 768px to 1024px wide.')));
$wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize, 'pgb_options[logo_desktop]', array('label' => __('Desktop Logo', 'pgb'), 'section' => 'pgb_options[logo]', 'settings' => 'pgb_options[logo_desktop]', 'description' => 'Desktop Logo is displayed on screen above 1024px wide.')));
// Nav Settings
$wp_customize->add_setting('pgb_options[menu_align]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_menu_align')));
$wp_customize->add_setting('pgb_options[nav_position]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_nav_position')));
$wp_customize->add_setting('pgb_options[nav_search]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_nav_search')));
$wp_customize->add_control('pgb_options[menu_align]', array('label' => __('Main Menu Alignment', 'pgb'), 'section' => 'nav', 'settings' => 'pgb_options[menu_align]', 'type' => 'radio', 'choices' => array('right' => 'Right', 'left' => 'Left')));
$wp_customize->add_control('pgb_options[nav_position]', array('label' => __('Main Navbar Position', 'pgb'), 'section' => 'nav', 'settings' => 'pgb_options[nav_position]', 'type' => 'radio', 'choices' => array('static' => 'Static', 'fixed' => 'Fixed')));
$wp_customize->add_control('pgb_options[nav_search]', array('label' => __('Show Search in Main Navbar', 'pgb'), 'section' => 'nav', 'settings' => 'pgb_options[nav_search]', 'type' => 'checkbox', 'value' => 1, 'description' => 'Adds search field to the far right of the navbar'));
// Footer Settings
$wp_customize->add_section('pgb_options[footer]', array('title' => 'Footer', 'priority' => 130, 'description' => ''));
$wp_customize->add_setting('pgb_options[footer_show]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_footer_show')));
$wp_customize->add_setting('pgb_options[footer_columns]', array('type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => array('ProGo_Customize', 'sanitize_footer_columns')));
$wp_customize->add_control('pgb_options[footer_show]', array('label' => __('Show Footer Widgets', 'pgb'), 'section' => 'pgb_options[footer]', 'settings' => 'pgb_options[footer_show]', 'type' => 'checkbox', 'value' => '1'));
$wp_customize->add_control('pgb_options[footer_columns]', array('label' => __('Number of Columns', 'pgb'), 'section' => 'pgb_options[footer]', 'settings' => 'pgb_options[footer_columns]', 'type' => 'select', 'choices' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4')));
}