Exemple #1
0
 public static function autoload($class)
 {
     try {
         @self::$_instance->autoload($class);
         if (!class_exists($class, false) && !interface_exists($class, false)) {
             return false;
         }
         return $class;
     } catch (Exception $e) {
         return false;
     }
 }
 /**
  * Run the loader to execute all of the hooks with WordPress.
  *
  */
 public function run()
 {
     $this->loader->run();
 }
 public function uninstallJsonAction()
 {
     $json = new stdClass();
     $json->success = 1;
     $json->msg = array();
     $ids = $this->_getParam('ids', array());
     $manager = new RM_Plugin_Manager($this->_translate);
     $dao = new RM_Plugins();
     foreach ($ids as $id) {
         $row = $dao->find($id)->current();
         try {
             $json->success = $json->success && $manager->uninstall($row);
             RM_Loader::clearCache();
         } catch (Exception $e) {
             $json->success = 0;
             $json->msg[] = $e->getMessage();
         }
     }
     return array('data' => $json);
 }