public function save(WpProQuiz_Model_GlobalSettings $settings)
 {
     if (add_option('wpProQuiz_addRawShortcode', $settings->isAddRawShortcode()) === false) {
         update_option('wpProQuiz_addRawShortcode', $settings->isAddRawShortcode());
     }
     if (add_option('wpProQuiz_jsLoadInHead', $settings->isJsLoadInHead()) === false) {
         update_option('wpProQuiz_jsLoadInHead', $settings->isJsLoadInHead());
     }
     if (add_option('wpProQuiz_touchLibraryDeactivate', $settings->isTouchLibraryDeactivate()) === false) {
         update_option('wpProQuiz_touchLibraryDeactivate', $settings->isTouchLibraryDeactivate());
     }
     if (add_option('wpProQuiz_corsActivated', $settings->isCorsActivated()) === false) {
         update_option('wpProQuiz_corsActivated', $settings->isCorsActivated());
     }
 }
 public function shortcodeToplist($attr)
 {
     $id = $attr[0];
     $content = '';
     if (!$this->_settings->isJsLoadInHead()) {
         $this->loadJsScripts(true, false, true);
     }
     if (is_numeric($id)) {
         ob_start();
         $this->handleShortCodeToplist($id, isset($attr['q']));
         $content = ob_get_contents();
         ob_end_clean();
     }
     if ($this->_settings->isAddRawShortcode() && !isset($attr['q'])) {
         return '[raw]' . $content . '[/raw]';
     }
     return $content;
 }