From 7e459c67137f6baa1349b1b438c728a1b8a1987a Mon Sep 17 00:00:00 2001 From: Jon Waldstein Date: Wed, 23 Oct 2024 09:59:35 -0400 Subject: [PATCH] fix: update settings link --- src/Addon/Links.php | 6 +++++- src/Addon/Notices.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Addon/Links.php b/src/Addon/Links.php index 530d7e7..b7cd703 100644 --- a/src/Addon/Links.php +++ b/src/Addon/Links.php @@ -2,6 +2,8 @@ namespace GiveCloudflareTurnstile\Addon; +use GiveCloudflareTurnstile\Settings\Repositories\GlobalSettings; + /** * @since 1.0.0 */ @@ -14,10 +16,12 @@ class Links */ public function __invoke($actions): array { + /** @var GlobalSettings $settings */ + $settings = give(GlobalSettings::class); $newActions = array( 'settings' => sprintf( '%s', - esc_url(admin_url('edit.php?post_type=give_forms&page=give-settings&tab=advanced§ion=cloudflare_turnstile')), + esc_url($settings->getSettingsUrl()), __('Settings', 'givewp-cloudflare-turnstile') ), ); diff --git a/src/Addon/Notices.php b/src/Addon/Notices.php index 8d529ab..8a08f5c 100644 --- a/src/Addon/Notices.php +++ b/src/Addon/Notices.php @@ -32,6 +32,6 @@ public static function giveVersionError(): void */ public static function giveInactive(): void { - echo esc_attr(View::load('admin/notices/give-inactive')); + echo esc_html(View::load('admin/notices/give-inactive')); } }