/** * display help icon * @param $module * @param $aField */ private function generate_help_icon($module, $aField) { $module_label = isset($aField['module_info']['name']) ? $aField['module_info']['name'] : $module->module_name; $help = $aField['hw_help']; if (empty($help)) { return; } $help_file = HW_HELP::get_help_popup_file(array($help['class'], $help['file'])); $_aAttributes = $aField['attributes']; $name = $_aAttributes['name']; $id = HW_Validation::valid_apf_slug($name); $html = '<a href="#" id="' . $id . '" data-hw-module="' . $module->module_name . '" data-hw-help-file="' . urlencode(HW_Encryptor::encrypt($help_file)) . '" title="' . $module_label . '"><img src="' . plugins_url('help_icon.png', __FILE__) . '" class="module-help-icon hw-module-help"/>Trợ giúp</a>'; return $html; }