/**
  * Generate WP-compatible $menu and $submenu arrays from a custom menu tree.
  */
 private function _build_custom_wp_menu()
 {
     $new_menu = array();
     $new_submenu = array();
     global $menu, $submenu;
     $cache_submenu = HW_HOANGWEB::get_wp_option('hw_custom_wp_submenu');
     $cache_modules_submenus = HW_HOANGWEB::get_wp_option('other_modules_submenus');
     if (empty($cache_submenu) || empty($cache_modules_submenus)) {
         #$root = new HW_Array_List_items_path($submenu, __CLASS__);
         $parent =& HW_Module_Settings_page::get_root_wp_menu_data($submenu);
         $parent1 =& HW_Widget_Features_Setting::get_root_wp_menu_data($submenu);
         $root_hoangweb =& HW_HOANGWEB_Settings::get_root_wp_menu_data($submenu);
         /*#eval('$parent = &$submenu'. $parent.';');
                     $parent[] = Array
                     (
                         'abc',
                         'manage_options',
                         'http://localhost/wp1/wp-admin/admin.php?tab=gallery&page=hw_modules_settings&module=gallery&tgmpa-tab-nonce=2ad45f5013&_wpnonce=922a2d6727',
         
                     );
                     set_transient('hw-replace-admin-submenu', $submenu);*/
         self::build_custom_wp_menu(array('menu' => &$menu, 'submenu' => &$submenu, 'root' => &$parent, 'root_widget_features' => &$parent1, 'root_hoangweb' => &$root_hoangweb));
         HW_SESSION::save_session('submenu', $submenu);
         HW_SESSION::save_session('menu', $menu);
         $this->custom_wp_menu = $menu;
         $this->custom_wp_submenu = $submenu;
     }
 }
 /**
  * fields values validation
  * @param $values
  * @return mixed|void
  */
 public function validation_tab_filter($values)
 {
     //var_dump($values);
     //var_dump($this->create_field_name('upload'));
     APF_hw_upload_field::do_form_action($values, $this->create_field_name('uploader'));
     //return array(); //not save any fields value
     //exit(); //the way allow ajax upload work, no any output allow here, if you not specific upload handle
     if (hw__post('s')) {
         $_REQUEST['s'] = hw__post('s');
         HW_SESSION::save_session('search_module', hw__post('s'));
     }
     return $values;
     //allow to save fields value
 }