Add GF section to settings page
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Ogre\Captcha;
|
||||
|
||||
use Ogre\Singleton;
|
||||
use Ogre\Captcha as Plugin;
|
||||
use Ogre\Captcha\GravityForms\Addon;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -378,6 +379,21 @@ final class Settings {
|
||||
]
|
||||
);
|
||||
|
||||
if (Plugin::is_gravityforms_active() && class_exists('Ogre\Captcha\GravityForms\Addon')) {
|
||||
add_settings_section(
|
||||
'gravityforms',
|
||||
Plugin::__('Gravity Forms'),
|
||||
[$this, 'section'],
|
||||
Plugin::get_id(),
|
||||
[
|
||||
'description' => sprintf(
|
||||
Plugin::__('The configuration of Ogre CAPTCHA\'s Gravityforms integration can be found on <a href="%s">this page</a> and within the settings of each form.'),
|
||||
esc_url(Addon::get_instance()->get_url())
|
||||
),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user