/** * get current skin file * @param $data */ public static function get_skin_link($data) { if (isset($data['hwskin_link_source'])) { $source = $data['hwskin_link_source']; } else { $source = 'plugin'; } //default source //parse file url if (!empty($data['hwskin_link_file_url'])) { $file_url = @unserialize(base64_decode($data['hwskin_link_file_url'])); $file_url = HW_SKIN::valid_skin_path(array('file_url' => $file_url, 'source' => $source)); $file_url = $file_url['file_url']; } else { $file_url = ''; } //default template file if (!empty($data['hwskin_link_default_skin_file'])) { $file = @unserialize(base64_decode($data['hwskin_link_default_skin_file'])); $file = HW_SKIN::valid_skin_path(array('file_path' => $file, 'source' => $source)); $file = $file['file_path']; } else { $file = ''; } /*$theme = array(); //init theme config $theme['styles']= array(); $theme['scripts']= array(); */ return array('template' => $file, 'file_url' => $file_url); /*if(file_exists($file)){ include($file); }*/ }