add_section('header_image_title_section',array( 'title' => esc_attr__('Header Image Title','bootbiz-for-wedding'), 'priority' => null )); $wp_customize->add_setting('header_image_title',array( 'default' => esc_attr__('Best Templates for Hotel Business','bootbiz-for-wedding'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control( 'header_image_title', array( 'label' => esc_attr__('Header Image Title','bootbiz-for-wedding'), 'section' => 'header_image_title_section', 'setting' => 'header_image_title' )); /* * 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' => '', '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' => '', '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' => '', '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' => '', '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 ); } } }