* @link https://TheTempusProject.com * @license https://opensource.org/licenses/MIT [MIT LICENSE] */ namespace TheTempusProject\Plugins\Donate; use TheTempusProject\Bedrock\Functions\Input; use TheTempusProject\Classes\Forms; class DonateForms extends Forms { /** * Adds these functions to the form list. */ public function __construct() { self::addHandler( 'donate', __CLASS__, 'donate' ); } /** * Validates the bug report form. * * @return {bool} */ public static function donate() { if ( !Input::exists( 'amount' ) ) { self::addUserError( 'You must specify an amount' ); return false; } if ( !self::token() ) { return false; } return true; } } new DonateForms;