function gglcptch_admin_init()
 {
     global $bws_plugin_info, $gglcptch_plugin_info, $bws_shortcode_list;
     if (!isset($bws_plugin_info) || empty($bws_plugin_info)) {
         $bws_plugin_info = array('id' => '109', 'version' => $gglcptch_plugin_info["Version"]);
     }
     /* Call register settings function */
     if (isset($_GET['page']) && "google-captcha.php" == $_GET['page']) {
         register_gglcptch_settings();
     }
     /* add google captcha to global $bws_shortcode_list  */
     $bws_shortcode_list['gglcptch'] = array('name' => 'Google Captcha (reCAPTCHA)', 'js_function' => 'gglcptch_shortcode_init');
 }
 function gglcptch_admin_init()
 {
     global $bws_plugin_info, $gglcptch_plugin_info;
     if (!isset($bws_plugin_info) || empty($bws_plugin_info)) {
         $bws_plugin_info = array('id' => '109', 'version' => $gglcptch_plugin_info["Version"]);
     }
     /* Call register settings function */
     if (isset($_GET['page']) && "google-captcha.php" == $_GET['page']) {
         register_gglcptch_settings();
     }
 }
 function gglcptch_admin_init()
 {
     global $bws_plugin_info, $gglcptch_plugin_info;
     $gglcptch_plugin_info = get_plugin_data(__FILE__, false);
     if (!isset($bws_plugin_info) || empty($bws_plugin_info)) {
         $bws_plugin_info = array('id' => '109', 'version' => $gglcptch_plugin_info["Version"]);
     }
     /* Check version on WordPress */
     gglcptch_version_check();
     /* Call register settings function */
     if (isset($_GET['page']) && "google-captcha.php" == $_GET['page']) {
         register_gglcptch_settings();
     }
 }
    function gglcptch_plugin_banner()
    {
        global $hook_suffix, $gglcptch_plugin_info, $gglcptch_options;
        if ('plugins.php' == $hook_suffix) {
            if (empty($gglcptch_options)) {
                register_gglcptch_settings();
            }
            if (empty($gglcptch_options['public_key']) || empty($gglcptch_options['private_key'])) {
                ?>
				<div class="error">
					<p>
						<?php 
                printf('<strong>%s <a target="_blank" href="https://www.google.com/recaptcha/admin#list">%s</a> %s <a target="_blank" href="%s">%s</a>.</strong>', __('To use Google Captcha you must get the keys from', 'google-captcha'), __('here', 'google-captcha'), __('and enter them on the', 'google-captcha'), admin_url('/admin.php?page=google-captcha.php'), __('plugin setting page', 'google-captcha'));
                ?>
					</p>
				</div>
			<?php 
            }
            if (isset($gglcptch_options['first_install']) && strtotime('-1 week') > $gglcptch_options['first_install']) {
                bws_plugin_banner($gglcptch_plugin_info, 'gglcptch', 'google-captcha', '676d9558f9786ab41d7de35335cf5c4d', '109', '//ps.w.org/google-captcha/assets/icon-128x128.png');
            }
            bws_plugin_banner_to_settings($gglcptch_plugin_info, 'gglcptch_options', 'google-captcha', 'admin.php?page=google-captcha.php');
        }
        if (isset($_GET['page']) && 'google-captcha.php' == $_GET['page']) {
            bws_plugin_suggest_feature_banner($gglcptch_plugin_info, 'gglcptch_options', 'google-captcha');
        }
    }