Ejemplo n.º 1
0
 protected function handleSubmit_BootstrapLess()
 {
     //Ensures we're actually getting this request from WP.
     check_admin_referer($this->getSubmenuId('bootstrap-css') . '_wtbless');
     //Compile LESS files
     $oBoostrapLess = new HLT_BootstrapLess();
     if (isset($_POST['submit_reset'])) {
         $oBoostrapLess->resetToDefaultAllLessOptions(self::$BOOSTRAP_DIR);
         return;
     }
     if (isset($_POST['submit_preserve'])) {
         //don't use the original variables.less
         $oBoostrapLess->processNewLessOptions(self::$OPTION_PREFIX, self::$BOOSTRAP_DIR, FALSE);
         return;
     }
     $oBoostrapLess->processNewLessOptions(self::$OPTION_PREFIX, self::$BOOSTRAP_DIR, TRUE);
 }