-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jon Waldstein
authored and
Jon Waldstein
committed
Oct 1, 2024
1 parent
2a5a844
commit 7f3073b
Showing
6 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace GiveCloudflareTurnstile\Settings\Repositories; | ||
|
||
/** | ||
* @since 1.0.0 | ||
*/ | ||
class GlobalSettings { | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
public function getSiteKey(): string | ||
{ | ||
return (string)defined('GIVE_TURNSTILE_SITE_KEY') ? GIVE_TURNSTILE_SITE_KEY : give_get_option('givewp_cloudflare_turnstile_site_key', ''); | ||
} | ||
|
||
/** | ||
* @since 1.0.0 | ||
*/ | ||
public function getSecretKey(): string | ||
{ | ||
return (string)defined('GIVE_TURNSTILE_SECRET_KEY') ? GIVE_TURNSTILE_SECRET_KEY : give_get_option('givewp_cloudflare_turnstile_secret_key', ''); | ||
} | ||
|
||
/** | ||
* @since 1.0.0 | ||
*/ | ||
public function isEnabled(): bool | ||
{ | ||
return give_is_setting_enabled(give_get_option('givewp_donation_forms_cloudflare_turnstile_enabled', 'disabled')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace GiveCloudflareTurnstile\Settings\ValueObjects; | ||
|
||
/** | ||
* @since 1.0.0 | ||
*/ | ||
class SettingKeys { | ||
public const SITE_KEY = 'givewp_cloudflare_turnstile_site_key'; | ||
public const SECRET_KEY = 'givewp_cloudflare_turnstile_secret_key'; | ||
public const ENABLED = 'givewp_donation_forms_cloudflare_turnstile_enabled'; | ||
} |