/** * Returns the Settings from the Database * * @param string $force - Forces a database call incase it was stored. * * @return array */ public static function get_settings($force = false) { if (empty(self::$settings) || $force) { self::$settings = get_option(self::$option_key); } return self::$settings; }
/** * Outputs the Form with the correct fields * * @param string $location * * @return type */ private static function form($location = 'general') { // Get Form Fields switch ($location) { default: case 'general': $fields = self::get_settings_fields(); break; case 'advanced': $fields = self::get_settings_fields('advanced'); break; } GRAV_TESTER_PLUGIN_SETTINGS::get_form($fields); }