/** * Return an instance of this class. * * @since 1.0.0 * * @return object A single instance of this class. */ public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
* Domain Path: /languages */ // If this file is called directly, abort. if (!defined('WPINC')) { die; } $wdm_recaptcha_section = array('site_key' => array('name' => 'Site Key', 'type' => 'text', 'default' => '', 'tip' => '<i>' . sprintf(__('Please enter the Site key provided by Google while %1$s registering your site for reCaptcha service %2$s', "google-nocaptcha-recaptcha-locale"), '<a href="https://www.google.com/recaptcha/admin#list" target="_blank">', '</a>') . '</i>'), 'secret_key' => array('name' => 'Secret Key', 'type' => 'text', 'default' => '', 'tip' => '<i>' . __('Copy the Secret key provided by Google in this textbox', "google-nocaptcha-recaptcha-locale") . '</i>')); $wdm_recaptcha_settings = array('general' => array('name' => '', 'fields' => $wdm_recaptcha_section)); if (!defined('WDM_RECAPTCHA_OPTION_NAME')) { define('WDM_RECAPTCHA_OPTION_NAME', 'wdm_recaptcha_settings'); } /* ----------------------------------------------------------------------------* * Public-Facing Functionality * ---------------------------------------------------------------------------- */ require_once plugin_dir_path(__FILE__) . 'includes/class-wdm-gnr-retrieve-options.php'; $wdm_recaptcha_settings_values = Wdm_Class_Gnr_Retrieve_Options::get_instance(); require_once plugin_dir_path(__FILE__) . 'public/class-wdm-google-nocaptcha-recaptcha.php'; add_action('plugins_loaded', array('Wdm_Google_Nocaptcha_Recaptcha', 'get_instance')); /* ----------------------------------------------------------------------------* * Dashboard and Administrative Functionality * ---------------------------------------------------------------------------- */ if (is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX)) { require_once plugin_dir_path(__FILE__) . 'admin/class-google-recaptcha-nocaptcha-admin.php'; add_action('plugins_loaded', array('Wdm_Google_Nocaptcha_Recaptcha_Admin', 'get_instance')); } /* * Enable NoCaptcha ReCaptcha for specific modules. By default enabled for all modules * In this associative array, value is name of the folder name for respective module * * @since 1.0.0 *