add_section( 'buconz_starter_theme_global', array( 'capability' => 'edit_theme_options', 'priority' => 1, 'title' => __( 'Theme Global', 'buconz-starter' ), 'description' => __( 'Theme Global Settings', 'buconz-starter' ), 'panel' => 'buconz_starter_theme_settings' ) ); $wp_customize->add_setting( 'buconz_starter_topbar_open', array( 'default' => false, 'sanitize_callback' => 'buconz_starter_sanitize_checkbox' ) ); $wp_customize->add_control( 'buconz_starter_topbar_open', array( 'label' => esc_html__( 'Enable topbar?', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'type' => 'checkbox', ) ); // Topbar Contact Address $buconz_starter_contact_arrays = array('1'=>'fa-phone', '2'=>'fa-paper-plane', '3'=>'fa-clock-o',); foreach($buconz_starter_contact_arrays as $buconz_key => $buconz_contact){ $wp_customize->add_setting( 'buconz_starter_topbar_icon_'.$buconz_key, array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'buconz_starter_topbar_icon_'.$buconz_key, array( /* translators: %s: Label */ 'label' => sprintf( __( 'Type contact icon %s', 'buconz-starter' ), $buconz_key ), /* translators: %s: Description */ 'description' => sprintf( __( 'Use icon: Eg: %1$s. %2$s See more here %3$s', 'buconz-starter' ), $buconz_contact,'',''), 'section' => 'buconz_starter_theme_global', 'type' => 'text', 'settings' => 'buconz_starter_topbar_icon_'.$buconz_key, ) ); $wp_customize->add_setting( 'buconz_starter_topbar_contact_'.$buconz_key, array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'buconz_starter_topbar_contact_'.$buconz_key, array( /* translators: %s: Description */ 'label' => sprintf( __( 'Type contact info %s', 'buconz-starter' ), $buconz_key ), 'section' => 'buconz_starter_theme_global', 'type' => 'text', 'settings' => 'buconz_starter_topbar_contact_'.$buconz_key, ) ); $wp_customize->add_setting( 'buconz_starter_topbar_contact_'.$buconz_key, array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'buconz_starter_topbar_contact_'.$buconz_key, array( /* translators: %s: Description */ 'label' => sprintf( __( 'Type contact info %s', 'buconz-starter' ), $buconz_key ), 'section' => 'buconz_starter_theme_global', 'type' => 'text', 'settings' => 'buconz_starter_topbar_contact_'.$buconz_key, ) ); } // Default Post Expert $wp_customize->add_setting( 'buconz_starter_post_excerpt', array( 'capability' => 'edit_theme_options', 'default' => 22, 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control( 'buconz_starter_post_excerpt', array( 'label' => __( 'Post Excerpt Limit', 'buconz-starter' ), 'description' => __( 'Customize post excerpt limit, global limit is : 22', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'settings' => 'buconz_starter_post_excerpt', 'type' => 'text', ) ); $wp_customize->add_setting( 'buconz_starter_social_enable', array( 'default' => true, 'sanitize_callback' => 'buconz_starter_sanitize_checkbox' ) ); $wp_customize->add_control( 'buconz_starter_social_enable', array( 'label' => esc_html__( 'Enable Social Widget', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'type' => 'checkbox', ) ); /* Buconz Social */ $buconz_starter_social_arrays = array('1'=>'fa-twitter', '2'=>'fa-facebook','3'=>'fa-linkedin','4'=>'fa-dribbble','5'=>'fa-youtube', ); foreach($buconz_starter_social_arrays as $buocnz_social_key => $buconz_social){ $wp_customize->add_setting( 'buconz_starter_social_icon_'.$buocnz_social_key, array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'buconz_starter_social_icon_'.$buocnz_social_key, array( /* translators: %s: Label */ 'label' => sprintf( __( 'Type social icon %s', 'buconz-starter' ), $buocnz_social_key ), /* translators: %s: Description */ 'description' => sprintf( __( 'Use icon: Eg: %1$s. %2$s See more here %3$s', 'buconz-starter' ), $buconz_social,'',''), 'section' => 'buconz_starter_theme_global', 'type' => 'text', 'settings' => 'buconz_starter_social_icon_'.$buocnz_social_key, ) ); $wp_customize->add_setting( 'buconz_starter_sidebar_social_link_'.$buocnz_social_key, array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'buconz_starter_sidebar_social_link_'.$buocnz_social_key, array( /* translators: %s: Description */ 'label' => sprintf( __( 'Social icon link %s', 'buconz-starter' ), $buocnz_social_key ), 'section' => 'buconz_starter_theme_global', 'type' => 'url', 'settings' => 'buconz_starter_sidebar_social_link_'.$buocnz_social_key, ) ); } $wp_customize->add_setting( 'buconz_header_button_enable', array( 'default' => true, 'sanitize_callback' => 'buconz_starter_sanitize_checkbox' ) ); $wp_customize->add_control( 'buconz_header_button_enable', array( 'label' => esc_html__( 'Enable header button', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'type' => 'checkbox', ) ); // Header Button Text $wp_customize->add_setting( 'buconz_starter_header_button_text', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'buconz_starter_header_button_text', array( 'label' => __( 'Type header button text ', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'type' => 'text', 'settings' => 'buconz_starter_header_button_text', ) ); // Header Button Link $wp_customize->add_setting( 'buconz_starter_header_button_link', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'buconz_starter_header_button_link', array( 'label' => __( 'Type header button link', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'type' => 'url', 'settings' => 'buconz_starter_header_button_link', ) ); // Footer Settings $wp_customize->add_setting( 'buconz_footer_copyright_text', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'buconz_footer_copyright_text', array( 'label' => __( 'Copyright text', 'buconz-starter' ), 'section' => 'buconz_starter_theme_global', 'type' => 'text', 'settings' => 'buconz_footer_copyright_text', ) );