public static function css_build_followerscounter_customizer()
 {
     global $essb_options;
     $is_active = ESSBOptionValuesHelper::options_bool_value($essb_options, 'activate_fanscounter_customizer');
     if (!$is_active) {
         return '';
     }
     self::snippet_start();
     $network_list = ESSBSocialFollowersCounterHelper::available_social_networks();
     foreach ($network_list as $network => $title) {
         $color_isset = ESSBOptionValuesHelper::options_value($essb_options, 'fanscustomizer_' . $network);
         if ($color_isset != '') {
             self::snippet_add('.essbfc-template-color .essbfc-icon-' . $network . ', .essbfc-template-grey .essbfc-icon-' . $network . ' { color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-roundcolor .essbfc-icon-' . $network . ', .essbfc-template-roundgrey .essbfc-icon-' . $network . ' { background-color: ' . $color_isset . ' !important; } ');
             self::snippet_add('.essbfc-template-outlinecolor .essbfc-icon-' . $network . ', .essbfc-template-outlinegrey .essbfc-icon-' . $network . '  { color: ' . $color_isset . ' !important; border-color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-outlinecolor li:hover .essbfc-icon-' . $network . ', .essbfc-template-outlinegrey li:hover .essbfc-icon-' . $network . ' { background-color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-metro .essbfc-' . $network . ' .essbfc-network { background-color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-flat .essbfc-' . $network . ' .essbfc-network { background-color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-dark .essbfc-' . $network . ' .essbfc-network { background-color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-modern .essbfc-' . $network . ' .essbfc-network i { color: ' . $color_isset . ' !important; }');
             self::snippet_add('.essbfc-template-modern .essbfc-' . $network . ' .essbfc-network { border-bottom: 3px solid ' . $color_isset . ' !important }');
             self::snippet_add('.essbfc-template-modern .essbfc-' . $network . ':hover .essbfc-network { background-color: ' . $color_isset . ' !important }');
         }
     }
     return self::snippet_end();
 }
function essb3_draw_fanscounter_settings($tab_id, $menu_id)
{
    $setting_fields = ESSBSocialFollowersCounterHelper::options_structure();
    $network_list = ESSBSocialFollowersCounterHelper::available_social_networks();
    $networks_same_authentication = array();
    // @since 3.2.2 Integration with Social Followers Counter Extended
    if (defined('ESSB3_SFCE_OPTIONS_NAME')) {
        $fanscounter_extended_options = get_option(ESSB3_SFCE_OPTIONS_NAME);
        $extended_list = array();
        foreach ($network_list as $network => $title) {
            $is_active_extended = ESSBOptionValuesHelper::options_bool_value($fanscounter_extended_options, 'activate_' . $network);
            $use_same_api = ESSBOptionValuesHelper::options_bool_value($fanscounter_extended_options, 'same_access_' . $network);
            $count_extended = ESSBOptionValuesHelper::options_value($fanscounter_extended_options, 'profile_count_' . $network);
            $count_extended = intval($count_extended);
            $extended_list[$network] = $title;
            if ($is_active_extended) {
                if ($use_same_api) {
                    $networks_same_authentication[$network] = "yes";
                }
                for ($i = 1; $i <= $count_extended; $i++) {
                    $extended_list[$network . "_" . $i] = $title . " Additional Profile " . $i;
                }
            }
        }
        $network_list = array();
        foreach ($extended_list as $network => $title) {
            $network_list[$network] = $title;
        }
        //asort($network_list);
    }
    foreach ($network_list as $network => $title) {
        ESSBOptionsStructureHelper::field_heading($tab_id, $menu_id, 'heading2', $title);
        $default_options_key = $network;
        $is_extended_key = false;
        if (strpos($default_options_key, '_') !== false && $default_options_key != 'wp_posts' && $default_options_key != 'wp_comments' && $default_options_key != 'wp_users') {
            $key_array = explode('_', $default_options_key);
            $default_options_key = $key_array[0];
            $is_extended_key = true;
        }
        $single_network_options = isset($setting_fields[$default_options_key]) ? $setting_fields[$default_options_key] : array();
        foreach ($single_network_options as $field => $options) {
            $field_id = "essb3fans_" . $network . "_" . $field;
            $field_type = isset($options['type']) ? $options['type'] : 'textbox';
            $field_text = isset($options['text']) ? $options['text'] : '';
            $field_description = isset($options['description']) ? $options['description'] : '';
            $field_values = isset($options['values']) ? $options['values'] : array();
            $is_authfield = isset($options['authfield']) ? $options['authfield'] : false;
            if ($is_extended_key && $is_authfield) {
                if (isset($networks_same_authentication[$default_options_key])) {
                    continue;
                }
            }
            if ($field_type == "textbox") {
                ESSBOptionsStructureHelper::field_textbox_stretched($tab_id, $menu_id, $field_id, $field_text, $field_description);
            }
            if ($field_type == "select") {
                ESSBOptionsStructureHelper::field_select($tab_id, $menu_id, $field_id, $field_text, $field_description, $field_values);
            }
        }
    }
}