if (isset($theme_options)) {
                            $options = HW_SKIN::merge_skin_options_values($options, $default_options, $theme_options);
                            //__save_session('y2',$options);
                            /*$_SESSION['y3']=$skin_setting;
                              $_SESSION['y4']=$default_options;*/
                        }
                    }
                }
                //get demo live chat embed code
                if (isset($options['enable_demo_chat']) && strtolower($options['enable_demo_chat']) == 'on' && isset($options['demo_embedcode'])) {
                    $aInput['chat_embed_code'] = $options['demo_embedcode'];
                    //clear enable_demo_chat option to able to update 'enable_demo_chat' skin option in next time
                    unset($aInput['chat_skin']['skin_options']['enable_demo_chat']);
                }
            }
            //save current skin for enqueue
            if (!empty($aInput['chat_skin'])) {
                HW_SKIN::save_enqueue_skin(array('type' => 'resume_skin', 'skin' => $aInput['chat_skin'], 'object' => 'livechat', 'status' => $aInput['enable_livechat']));
            }
            return $aInput;
        }
    }
    if (is_admin()) {
        //init custom field type
        /*if(class_exists('APF_hw_skin_Selector_hwskin')) {
              new APF_hw_skin_Selector_hwskin('HW_Livechat_settings');
          }*/
        HW_APF_FieldTypes::apply_fieldtypes('hw_skin', 'HW_Livechat_settings');
        new HW_Livechat_settings();
    }
}
 /**
  * list allow fields type for the module
  * @param $fields
  */
 public function support_fields($fields)
 {
     HW_APF_FieldTypes::apply_fieldtypes($fields, 'HW_Widget_Features_Setting');
 }
 /**
  * load given field type
  * @param string $typename: field type class
  * @return field class name
  */
 public static function load_fieldtype($typename = '')
 {
     return HW_APF_FieldTypes::load_fieldtype($typename);
 }
 /**
  * init module config page
  */
 public static final function init()
 {
     $child_class = get_called_class();
     $module = self::get_module_configs('module');
     $page_settings_slug = HW_Installation_Page::page_setting_slug;
     if (empty($module)) {
         return;
     }
     //invalid module
     //hidden metabox configuration for module by set wrong page setting slug where metabox living
     if ($module->option('visible_config_page') == false) {
         #return;
         $page_settings_slug = md5(rand());
     }
     $config = new $child_class(null, __('placeholder '), $page_settings_slug, 'side', 'default');
     $module_config_file = self::get_module_config_page();
     $module->option('config_file', $module_config_file);
     //save module config file
     //export class for module
     $exporter = $module->get_module_exporter();
     self::add_config($module_config_file, array('config' => $config, 'exporter' => $exporter));
     //default support field types for module config page
     HW_APF_FieldTypes::apply_fieldtypes(array('hw_html', 'hw_skin'), $child_class);
 }
 /**
  * initial
  * @hook init
  */
 public static function __init()
 {
     //if(class_exists('HW_SKIN')) hwskin_load_APF_Fieldtype(HW_SKIN::SKIN_FILES);
     HW_APF_FieldTypes::apply_fieldtypes(array('hw_html', 'hw_admin_table'), 'HW_Module_Settings_page');
     //init custom field type
     /*if(class_exists('APF_hw_admin_table')) {
           new APF_hw_admin_table('HW_Module_Settings_page');
       }*/
     new HW_Module_Settings_page();
 }
 /**
  * initial
  */
 public static function init()
 {
     //if(class_exists('HW_SKIN')) hwskin_load_APF_Fieldtype(HW_SKIN::SKIN_FILES);
     HW_HOANGWEB::load_class('APF_hw_table_fields');
     //init custom field type
     if (class_exists('APF_hw_table_fields')) {
         //new APF_hw_table_fields('HW_HOANGWEB_Settings');
         HW_APF_FieldTypes::apply_fieldtypes('hw_table_fields', 'HW_HOANGWEB_Settings');
         new HW_HOANGWEB_Settings();
     }
 }
 /**
  * list allow fields type for the module
  * @param $fields
  */
 public function support_fields($fields)
 {
     HW_APF_FieldTypes::apply_fieldtypes($fields, 'HW_Module_Settings_page');
 }