add_section('slider_section',array( 'title' => esc_attr__('Homepage Slider Images','bootbiz-for-wedding'), 'description' => sprintf( __( 'Slider Image Dimensions ( 1400 X 550 )
Add slider images here. ', 'bootbiz-for-wedding' )), 'priority' => null )); // onoff $wp_customize->add_setting( 'slider_onoff', array( 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control( 'slider_onoff', array( 'label' => __( 'Use "Slider" block', 'bootbiz-for-wedding' ), 'settings' => 'slider_onoff', 'section' => 'slider_section', 'type' => 'checkbox' )); // Slide Image 1 $wp_customize->add_setting('slide_image1',array( 'default' => get_template_directory_uri() . '/images/header1.jpg', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slide_image1', array( 'label' => esc_attr__('Slide Image 1','bootbiz-for-wedding'), 'section' => 'slider_section', 'settings' => 'slide_image1' ) )); $wp_customize->add_setting('slide_title1',array( 'default' => esc_attr__('Best Templates for Hotel Business','bootbiz-for-wedding'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control( 'slide_title1', array( 'label' => esc_attr__('Slide title 1','bootbiz-for-wedding'), 'section' => 'slider_section', 'setting' => 'slide_title1' )); // Slide Image 2 $wp_customize->add_setting('slide_image2',array( 'default' => get_template_directory_uri() . '/images/header2.jpg', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slide_image2', array( 'label' => esc_attr__('Slide image 2','bootbiz-for-wedding'), 'section' => 'slider_section', 'setting' => 'slide_image2' ) )); $wp_customize->add_setting('slide_title2',array( 'default' => esc_attr__('We Create Wordpress Responsive Theme','bootbiz-for-wedding'), 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'slide_title2', array( 'label' => esc_attr__('Slide title 2','bootbiz-for-wedding'), 'section' => 'slider_section', 'setting' => 'slide_title2' )); // Slide Image 3 $wp_customize->add_setting('slide_image3',array( 'default' => get_template_directory_uri() . '/images/header3.jpg', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize,'slide_image3', array( 'label' => esc_attr__('Slide Image 3','bootbiz-for-wedding'), 'section' => 'slider_section', 'setting' => 'slide_image3' ) )); $wp_customize->add_setting('slide_title3',array( 'default' => esc_attr__('You can change images easily','bootbiz-for-wedding'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('slide_title3', array( 'label' => esc_attr__('Slide title 3','bootbiz-for-wedding'), 'section' => 'slider_section', 'setting' => 'slide_title3' )); /* * Homepage Welcome Section */ $wp_customize->add_section('welcome_section',array( 'title' => esc_attr__('Homepage Welcome Section','bootbiz-for-wedding'), 'priority' => null )); // onoff $wp_customize->add_setting( 'welcome_onoff', array( 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control( 'welcome_onoff', array( 'label' => __( 'Use "Homepage Welcome Section" block', 'bootbiz-for-wedding' ), 'settings' => 'welcome_onoff', 'section' => 'welcome_section', 'type' => 'checkbox' )); // title $wp_customize->add_setting('welcome_title',array( 'sanitize_callback' => 'wptexturize' )); $wp_customize->add_control( 'welcome_title', array( 'label' => esc_attr__('Title','bootbiz-for-wedding'), 'setting' => 'welcome_title', 'section' => 'welcome_section' )); // select page $wp_customize->add_setting('aboutpage-setting',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bootBiz_sanitize_integer' )); $wp_customize->add_control('aboutpage-setting',array( 'type' => 'dropdown-pages', 'label' => __('Select page for this section','bootbiz-for-wedding'), 'section' => 'welcome_section' )); /* * Blog */ $wp_customize->add_section('news_section',array( 'title' => esc_attr__('Blog','bootbiz-for-wedding'), 'priority' => null )); // title $wp_customize->add_setting('news_title',array( 'default' => '', 'sanitize_callback' => 'wptexturize' )); $wp_customize->add_control( 'news_title', array( 'label' => esc_attr__('Title','bootbiz-for-wedding'), 'setting' => 'news_title', 'section' => 'news_section' )); /* * Footer > Social */ $wp_customize->add_section('social_sec',array( 'title' => esc_attr__('Footer > Social','bootbiz-for-wedding'), 'description' => __('When not inserting URL, an icon isn\'t displayed.', 'bootbiz-for-wedding'), 'priority' => null )); $wp_customize->add_setting('fb_link',array( 'default' => '#facebook', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('fb_link',array( 'label' => esc_attr__('facebook URL','bootbiz-for-wedding'), 'section' => 'social_sec', 'setting' => 'fb_link' )); $wp_customize->add_setting('twitt_link',array( 'default' => '#twitter', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('twitt_link',array( 'label' => esc_attr__('twitter URL','bootbiz-for-wedding'), 'section' => 'social_sec', 'setting' => 'twitt_link' )); $wp_customize->add_setting('gplus_link',array( 'default' => '#gplus', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('gplus_link',array( 'label' => esc_attr__('google plus URL','bootbiz-for-wedding'), 'section' => 'social_sec', 'setting' => 'gplus_link' )); $wp_customize->add_setting('instagram_link',array( 'default' => '#instagram', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('instagram_link',array( 'label' => esc_attr__('instagram URL','bootbiz-for-wedding'), 'section' => 'social_sec', 'setting' => 'instagram_link' )); //Integer function bootBiz_sanitize_integer( $input ) { if( is_numeric( $input ) ) { return intval( $input ); } } }