Please visit the Widgets Page to install at least one of the plugin's sidebar widgets."; } //check empty api key $check_api_key = get_option('agent_apikey'); if (empty($check_api_key)) { $agentrank_admin_warning_message .= "
  • Please enter an API Key.
  • "; $agentrank_setting_warning_message = "
  • Please visit the Settings Page to configure the plugin.
  • "; } //check empty reCaptcha pub api key $check_recapcha_public_key = get_option('agent_captcha_public'); if (empty($check_recapcha_public_key)) { $agentrank_admin_warning_message .= "
  • Please enter reCAPTCHA Public Key or request for one, in Real Estate Agent Settings Page.
  • "; $agentrank_setting_warning_message = "
  • Please visit the Settings Page to configure the plugin.
  • "; } //check empty reCaptcha private api key $check_recapcha_private_key = get_option('agent_captcha_private'); if (empty($check_recapcha_private_key)) { $agentrank_admin_warning_message .= "
  • Please enter reCAPTCHA Private Key, in Real Estate Agent Settings Page.
  • "; $agentrank_setting_warning_message = "
  • Please visit the Settings Page to configure the plugin.
  • "; } function agentrank_warning() { //setup admin url to agentrank settings page $agentrank_settings_url = admin_url() . "options-general.php?page=agentrank_option"; //setup url to widgets.php $agentrank_wp_widget_url = admin_url() . "widgets.php"; //setup current url $current_page_url = agentrank_current_page_url(); if ($current_page_url == $agentrank_settings_url) { // retrieve error message if any, from global variable global $agentrank_admin_warning_message; if (!empty($agentrank_admin_warning_message)) { echo "
    "; echo "

    Real Estate Agent WordPress Plugin is almost ready."; echo " The following needs your attention!

    "; echo "
      "; echo $agentrank_admin_warning_message; echo "
    "; echo "
    "; } } elseif ($current_page_url == $agentrank_wp_widget_url) { // retrieve error message if any, from global variable global $agentrank_widget_warning_message; if (!empty($agentrank_widget_warning_message)) { echo "
    "; echo "

    Click the AgentRank Sale Transactions Widget or AgentRank Client Reviews Widget or AgentRank Market Forecasts Widget in Available Widgets and drag to Sidebar 1.

    "; echo "
    "; } } else { // retrieve error message if any, from global variable global $agentrank_widget_warning_message; global $agentrank_setting_warning_message; if (!empty($agentrank_widget_warning_message) || !empty($agentrank_setting_warning_message)) { echo "
    "; echo "

    Real Estate Agent WordPress Plugin is almost ready."; echo " The following needs your attention!

    "; echo "
      "; echo $agentrank_setting_warning_message; echo $agentrank_widget_warning_message; echo "
    "; echo "
    "; } } //end else } //end function agentrank_warning add_action('admin_notices', 'agentrank_warning'); } add_action('init', 'agentrank_admin_warning'); ?>