add_setting( BSTONE_THEME_SETTINGS . '[social-list-settings-heading]', array( 'sanitize_callback' => 'wp_kses', ) ); $wp_customize->add_control ( new Bstone_Control_Heading ( $wp_customize, BSTONE_THEME_SETTINGS . '[social-list-settings-heading]', array( 'label' => esc_html__( 'Social Icons List', 'bstone' ), 'section' => 'section-social-list-settings', 'priority' => 5, ) ) ); /** * Option: Show Icons Edit Box */ $wp_customize->add_setting( BSTONE_THEME_SETTINGS . '[show-icons-edit]', array( 'default' => bstone_get_option( 'show-icons-edit' ), 'type' => 'option', 'capability' => 'manage_options', 'transport' => 'postMessage', 'sanitize_callback' => array( 'Bstone_Customizer_Sanitizes', 'sanitize_checkbox' ), ) ); $wp_customize->add_control( BSTONE_THEME_SETTINGS . '[show-icons-edit]', array( 'type' => 'checkbox', 'section' => 'section-social-list-settings', 'label' => __( 'Show Icons Edit Box', 'bstone' ), 'priority' => 10, ) ); $social_icons_list = array( 'twitter:Twitter:fa fa-twitter', 'facebook:Facebook:fa fa-facebook', 'google_plus:Google Plus:fa fa-google-plus', 'pinterest:Pinterest:fa fa-pinterest-p', 'dribbble:Dribbble:fa fa-dribbble', 'behance:Behance:fa fa-behance', 'vk:VK:fa fa-vk', 'instagram:Instagram:fa fa-instagram', 'linkedin:LinkedIn:fa fa-linkedin', 'tumblr:Tumblr:fa fa-tumblr', 'github:Github:fa fa-github', 'flickr:Flickr:fa fa-flickr', 'skype:Skype:fa fa-skype', 'youtube:Youtube:fa fa-youtube', 'vimeo:Vimeo:fa fa-vimeo', 'vine:Vine:fa fa-vine', 'xing:Xing:fa fa-xing', 'yelp:Yelp:fa fa-yelp', '500px:500px:fa fa-500px', 'tripadvisor:Tripadvisor:fa fa-tripadvisor', 'rss:RSS:fa fa-rss', 'email:Email:fa fa-envelope-o', 'extra1:Extra 1:', 'extra2:Extra 2:', 'extra3:Extra 3:', 'extra4:Extra 4:', 'extra5:Extra 5:' ); foreach($social_icons_list as $social_icon) { $icon_item = explode(":",$social_icon); $wp_customize->add_setting( BSTONE_THEME_SETTINGS . '[social-list-'.$icon_item[0].']', array( 'default' => '', 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( BSTONE_THEME_SETTINGS . '[social-list-'.$icon_item[0].']', array( 'section' => 'section-social-list-settings', 'priority' => 20, 'label' => $icon_item[1], 'type' => 'text', ) ); $wp_customize->add_setting( BSTONE_THEME_SETTINGS . '[social-list-icon-'.$icon_item[0].']', array( 'default' => $icon_item[2], 'type' => 'option', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( BSTONE_THEME_SETTINGS . '[social-list-icon-'.$icon_item[0].']', array( 'section' => 'section-social-list-settings', 'priority' => 20, 'label' => $icon_item[1].' '. __( 'Icon', 'bstone' ), 'type' => 'text', 'input_attrs' => array( 'placeholder' => 'fa fa-icon', ), ) ); /** * Option: Mobile Menu Label Divider */ $wp_customize->add_control( new Bstone_Control_Divider( $wp_customize, BSTONE_THEME_SETTINGS . '[social-list-icon-'.$icon_item[0].'divider]', array( 'type' => 'bst-divider', 'section' => 'section-social-list-settings', 'priority' => 20, 'settings' => array(), ) ) ); }