/** * Reset the compatibility settings. * * @return string */ public function resetSmallScreens() { delete_option('rpbchessboard_smallScreenCompatibility'); delete_option('rpbchessboard_smallScreenModes'); RPBChessboardHelperCache::remove('small-screens.css'); return self::resetMessage(); }
/** * Update the plugin general options. * * @return string */ public function updateOptions() { // General parameters self::processSquareSize(); self::processBooleanParameter('showCoordinates'); self::processPieceSymbols(); self::processNavigationBoard(); self::processAnimationSpeed(); self::processBooleanParameter('showMoveArrow'); // Compatibility parameters. self::processBooleanParameter('fenCompatibilityMode'); self::processBooleanParameter('pgnCompatibilityMode'); // Small-screen parameters self::processBooleanParameter('smallScreenCompatibility'); self::processSmallScreenModes(); RPBChessboardHelperCache::remove('small-screens.css'); // Notify the user. return __('Settings saved.', 'rpbchessboard'); }