/**
  * AJAX requests dispatcher
  */
 protected function _dispatch($action)
 {
     $answer = parent::_dispatch($action);
     if (substr($answer['message'], 0, 14) != 'unknown action') {
         return $answer;
     }
     switch ($action) {
         case 'get_admin_menu':
             $answer = $this->get_admin_menu();
             break;
         case 'get_widgets_list':
             $answer = $this->get_widgets_list();
             break;
         case 'get_meta_boxes_list':
             $answer = $this->get_meta_boxes_list();
             break;
         case 'get_roles_list':
             $answer = $this->get_roles_list();
             break;
         case 'get_categories_list':
             $answer = $this->get_categories_list();
             break;
         case 'set_users_edit_restrictions':
             $answer = $this->set_users_edit_restrictions();
             break;
         default:
             $answer = array('result' => 'error', 'message' => 'unknown action "' . $action . '"');
     }
     return $answer;
 }
 /**
  * AJAX requests dispatcher
  */
 protected function _dispatch($action)
 {
     $answer = parent::_dispatch($action);
     if (substr($answer['message'], 0, 14) != 'unknown action') {
         return $answer;
     }
     switch ($action) {
         case 'get_admin_menu':
             $answer = $this->get_admin_menu();
             break;
         default:
             $answer = array('result' => 'error', 'message' => 'unknown action "' . $action . '"');
     }
     return $answer;
 }
 public function ure_ajax()
 {
     require_once URE_PLUGIN_DIR . 'includes/class-ajax-processor.php';
     $ajax_processor = new URE_Ajax_Processor($this->lib);
     $ajax_processor->dispatch();
 }
 public function ure_ajax()
 {
     $ajax_processor = new URE_Ajax_Processor($this->lib);
     $ajax_processor->dispatch();
 }