get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->add_panel( 'topHeader', array( 'title' => __( 'Header Settings', 'musicmacho' ), 'description' => __('Header Options','musicmacho'), 'priority' => 20, ) ); $wp_customize->add_panel( 'frontPage', array( 'title' => __( 'Front Page', 'musicmacho' ), 'description' => __('Front Page Options','musicmacho'), 'priority' => 22, ) ); $wp_customize->add_panel( 'general', array( 'title' => __( 'General Settings', 'musicmacho' ), 'description' => __('General Options','musicmacho'), 'priority' => 18, ) ); $wp_customize->add_section( 'musicmachoFooterSection' , array( 'title' => __( 'Footer Settings', 'musicmacho' ), 'priority' => 24, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoFooterSectionHideCreditText', array('sanitize_callback' => 'sanitize_text_field') ); $wp_customize->add_control( 'musicmachoFooterSectionHideCreditText', array( 'type' => 'checkbox', 'label' => 'Click here if you want to HIDE this Credit Text From Footer.', 'section' => 'musicmachoFooterSection', 'choices' => array( "1" => esc_html__( "On ", 'musicmacho' ), "0" => esc_html__( "Off", 'musicmacho' ), ), ) ); $wp_customize->add_setting( 'musicmachoFooterSectionCopyrightText', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoFooterSectionCopyrightText', array( 'label' => __( 'Footer CopyRight Text','musicmacho' ), 'section' => 'musicmachoFooterSection', 'type' => 'textarea', ) ); $wp_customize->get_section('background_image')->panel = 'general'; $wp_customize->get_section('header_image')->panel = 'frontPage'; $wp_customize->get_section('header_image')->title = __('Video Section','musicmacho'); $wp_customize->get_section('header_image')->priority = 10; $wp_customize->get_section('static_front_page')->panel = 'general'; $wp_customize->get_section('title_tagline')->panel = 'general'; $wp_customize->add_section( 'musicmachoVideoSection' , array( 'panel' => 'frontPage', 'title' => __( 'Video Section', 'musicmacho' ), 'priority' => 24, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoVideoSectionHide', array('sanitize_callback' => 'sanitize_text_field') ); $wp_customize->add_control( 'musicmachoVideoSectionHide', array( 'type' => 'checkbox', 'label' => 'Click here if you want to HIDE this Section On Front page.', 'section' => 'header_image', 'choices' => array( "1" => esc_html__( "On ", 'musicmacho' ), "0" => esc_html__( "Off", 'musicmacho' ), ), 'priority' => 0, ) ); $wp_customize->add_setting( 'musicmachoVideoSectionLogo', array('sanitize_callback' => 'esc_url_raw') ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'musicmachoVideoSectionLogo', array( 'label' => __( 'Section Logo Image', 'musicmacho' ), 'section' => 'header_image', 'settings' => 'musicmachoVideoSectionLogo', 'priority' => 0, ) ) ); $wp_customize->add_setting( 'musicmachoVideoSectionLayer', array('sanitize_callback' => 'esc_url_raw') ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'musicmachoVideoSectionLayer', array( 'label' => __( 'VIdeo Layer Image', 'musicmacho' ), 'section' => 'header_image', 'settings' => 'musicmachoVideoSectionLayer', ) ) ); $wp_customize->add_setting( 'musicmachoVideosectionLocation', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoVideosectionLocation', array( 'label' => __('Location :','musicmacho'), 'section' => 'header_image', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Your Location','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoVideosectionDate', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoVideosectionDate', array( 'label' => __('Date :','musicmacho'), 'section' => 'header_image', 'type' => 'text', 'input_attrs' => array('placeholder' => __('21 Dec 2017','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoVideosectionTime', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoVideosectionTime', array( 'label' => __('Time :','musicmacho'), 'section' => 'header_image', 'type' => 'text', 'input_attrs' => array('placeholder' => __('10:00 PM','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoVideosectionBookingCaption', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoVideosectionBookingCaption', array( 'label' => __('Booking Caption :','musicmacho'), 'section' => 'header_image', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Booking Close in','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoVideosectionEventButtonText', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoVideosectionEventButtonText', array( 'label' => __('Event Button Text :','musicmacho'), 'section' => 'header_image', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Add Some Text','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoVideosectionEventButtonUrl', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoVideosectionEventButtonUrl', array( 'label' => __('Event Button Url :','musicmacho'), 'section' => 'header_image', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Place Url Here','musicmacho')), ) ); $wp_customize->add_section( 'musicmachoAboutSection' , array( 'panel' => 'frontPage', 'title' => __( 'About Section', 'musicmacho' ), 'priority' => 28, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoAboutUsSectionHide', array('sanitize_callback' => 'sanitize_text_field') ); $wp_customize->add_control( 'musicmachoAboutUsSectionHide', array( 'type' => 'checkbox', 'label' => 'Click here if you want to HIDE this Section On Front page.', 'section' => 'musicmachoAboutSection', 'choices' => array( "1" => esc_html__( "On ", 'musicmacho' ), "0" => esc_html__( "Off", 'musicmacho' ), ), ) ); $wp_customize->add_setting( 'musicmachoAboutUsSectionBackgroundImage' , array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'musicmachoAboutUsSectionBackgroundImage', array( 'label' => __( 'Background Image', 'musicmacho' ), 'section' => 'musicmachoAboutSection', 'settings' => 'musicmachoAboutUsSectionBackgroundImage', ) ) ); $wp_customize->add_setting( 'musicmachoAboutSectionBackgroundColor', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'musicmachoAboutSectionBackgroundColor', array( 'label' => __('Section Background Color ','musicmacho'), 'section' => 'musicmachoAboutSection', 'settings' => 'musicmachoAboutSectionBackgroundColor', ) ) ); $wp_customize->add_setting( 'musicmachoAboutSectionTitle', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoAboutSectionTitle', array( 'label' => __('Section Title :','musicmacho'), 'section' => 'musicmachoAboutSection', 'type' => 'text', 'input_attrs' => array('placeholder' => __('About Section Title','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoAboutSectionContent', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoAboutSectionContent', array( 'label' => __( 'Content','musicmacho' ), 'section' => 'musicmachoAboutSection', 'type' => 'textarea', ) ); $wp_customize->add_section( 'musicmachoContactSection' , array( 'panel' => 'frontPage', 'title' => __( 'Contact Section', 'musicmacho' ), 'priority' => 32, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoContactSectionHide', array('sanitize_callback' => 'sanitize_text_field') ); $wp_customize->add_control( 'musicmachoContactSectionHide', array( 'type' => 'checkbox', 'label' => 'Click here if you want to HIDE this Section On Front page.', 'section' => 'musicmachoContactSection', 'choices' => array( "1" => esc_html__( "On ", 'musicmacho' ), "0" => esc_html__( "Off", 'musicmacho' ), ), ) ); $wp_customize->add_setting( 'musicmachoContactSectionBackgroundImage' , array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'musicmachoContactSectionBackgroundImage', array( 'label' => __( 'Background Image', 'musicmacho' ), 'section' => 'musicmachoContactSection', 'settings' => 'musicmachoContactSectionBackgroundImage', ) ) ); $wp_customize->add_setting( 'musicmachoContactSectionBackgroundColor', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'musicmachoContactSectionBackgroundColor', array( 'label' => __('Section Background Color ','musicmacho'), 'section' => 'musicmachoContactSection', 'settings' => 'musicmachoContactSectionBackgroundColor', ) ) ); $wp_customize->add_setting( 'musicmachoContactSectionTitle', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoContactSectionTitle', array( 'label' => __('Section Title :','musicmacho'), 'section' => 'musicmachoContactSection', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Section Title','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoContactSectionFrom', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoContactSectionFrom', array( 'label' => __('Contact Form Shortcode :','musicmacho'), 'section' => 'musicmachoContactSection', 'type' => 'text', ) ); $wp_customize->add_section( 'musicmachoCallToActionSection' , array( 'panel' => 'frontPage', 'title' => __( 'Call to action section', 'musicmacho' ), 'priority' => 34, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoCallToActionSectionHide' , array('sanitize_callback' => 'sanitize_text_field') ); $wp_customize->add_control( 'musicmachoCallToActionSectionHide', array( 'type' => 'checkbox', 'label' => 'Click here if you want to HIDE this Section On Front page.', 'section' => 'musicmachoCallToActionSection', 'choices' => array( "1" => esc_html__( "On ", 'musicmacho' ), "0" => esc_html__( "Off", 'musicmacho' ), ), ) ); $wp_customize->add_setting( 'musicmachoCallToActionSectionBackgroundImage' , array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'musicmachoCallToActionSectionBackgroundImage', array( 'label' => __( 'Background Image', 'musicmacho' ), 'section' => 'musicmachoCallToActionSection', 'settings' => 'musicmachoCallToActionSectionBackgroundImage', ) ) ); $wp_customize->add_setting( 'musicmachoCallToActionSectionBackgroundColor', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'musicmachoCallToActionSectionBackgroundColor', array( 'label' => __('Section Background Color ','musicmacho'), 'section' => 'musicmachoCallToActionSection', 'settings' => 'musicmachoCallToActionSectionBackgroundColor', ) ) ); $wp_customize->add_setting( 'musicmachoCallToActionSectionTitle', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoCallToActionSectionTitle', array( 'label' => __('Section Title :','musicmacho'), 'section' => 'musicmachoCallToActionSection', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Section Title','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoCallToActionSectionButtonText', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoCallToActionSectionButtonText', array( 'label' => __('Button Caption :','musicmacho'), 'section' => 'musicmachoCallToActionSection', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Add some text','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoCallToActionSectionButtonUrl', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoCallToActionSectionButtonUrl', array( 'label' => __('Button Link :','musicmacho'), 'section' => 'musicmachoCallToActionSection', 'type' => 'text', 'input_attrs' => array('placeholder' => __('Place Url Here','musicmacho')), ) ); $wp_customize->add_section( 'musicmachoHeaderFixed' , array( 'panel' => 'topHeader', 'title' => __( 'Fixed Header', 'musicmacho' ), 'priority' => 20, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoHeaderNavigationFixed', array('sanitize_callback' => 'sanitize_text_field') ); $wp_customize->add_control( 'musicmachoHeaderNavigationFixed', array( 'type' => 'checkbox', 'label' => 'Click here if you want fixed header on top.', 'section' => 'musicmachoHeaderFixed', 'choices' => array( "1" => esc_html__( "On ", 'musicmacho' ), "0" => esc_html__( "Off", 'musicmacho' ), ), ) ); $wp_customize->add_section( 'musicmachoTopHeaderSocials' , array( 'panel' => 'topHeader', 'title' => __( 'Social Settings', 'musicmacho' ), 'description' => __('In first input box, you need to add FONT AWESOME shortcode and in second input box, you need to add your social media profile URL.','musicmacho'), 'priority' => 28, 'capability' => 'edit_theme_options', ) ); for($i=1;$i<4;$i++) { $wp_customize->add_setting( 'musicmachoSocialIcon'.$i, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoSocialIcon'.$i, array( 'label' => __('Social Link-', 'musicmacho').$i, 'section' => 'musicmachoTopHeaderSocials', 'type' => 'text', 'input_attrs' => array('placeholder' => __('fa-facebook','musicmacho')), ) ); $wp_customize->add_setting( 'musicmachoSocialUrl'.$i, array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'musicmachoSocialUrl'.$i, array( 'section' => 'musicmachoTopHeaderSocials', 'type' => 'text', 'input_attrs' => array('placeholder' => __('http://facebook.com','musicmacho')), ) ); } $wp_customize->add_section( 'musicmachoTopHeaderLogo' , array( 'panel' => 'topHeader', 'title' => __( 'Top Header Logo', 'musicmacho' ), 'priority' => 25, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'musicmachoTopHeaderIcon' , array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'musicmachoTopHeaderIcon', array( 'label' => __( 'Top Heaer Icon', 'musicmacho' ), 'section' => 'musicmachoTopHeaderLogo', 'settings' => 'musicmachoTopHeaderIcon', ) ) ); } add_action( 'customize_register', 'musicmacho_customize_register' ); function musicmacho_custom_css() { ?>