public static function initialize() { self::$plugin_options = get_option('wc_ncr_options'); self::$site_key = self::$plugin_options['site_key']; self::$secret_key = self::$plugin_options['secrete_key']; self::$theme = self::$plugin_options['theme']; self::$language = self::$plugin_options['language']; self::$error_message = self::$plugin_options['error_message']; add_action('plugins_loaded', array(__CLASS__, 'load_plugin_textdomain')); // initialize if login is activated if (isset(self::$plugin_options['captcha_wc_registration']) && self::$plugin_options['captcha_wc_registration'] == 'yes' || isset(self::$plugin_options['captcha_wc_login']) && self::$plugin_options['captcha_wc_login'] == 'yes' || isset(self::$plugin_options['captcha_wc_password_reset']) && self::$plugin_options['captcha_wc_password_reset'] == 'yes') { add_action('wp_head', array(__CLASS__, 'header_script')); } }