예제 #1
0
 /**
  * active module
  * @param $args
  * @param $assoc_args
  * @cmd wp hw-module active xx
  */
 public function activate($args, $assoc_args)
 {
     //note run any code from this context is make code of site fully execute such as wp ajax
     $name = $this->get_cmd_arg($assoc_args, 'name');
     //get module name
     if ($name) {
         #hw_activate_modules(array($name));
         $plugin_table = new HW_TGMPA_List_Table();
         $plugin_table->process_bulk_action(array($name), 'tgmpa-bulk-activate');
     }
     $this->success(' activate module ' . $name . ' successful.');
 }