/**
  * Trigger form submission.
  *
  * Add a last couple of checks, set the redirects and
  * finally subscribe the visitor to the Aweber list.
  *
  * @since  1.0.0
  *
  * @param array $data Form post data
  *
  * @return bool
  */
 public static function submit($data)
 {
     if (!wpbo_is_aweber_ready()) {
         return false;
     }
     $aweber = new WPBO_Aweber();
     return $aweber->subscribe($data);
 }
/**
 * User warning.
 *
 * Warn user if settings are not correct.
 *
 * @since  1.0.0
 */
function wpbo_aw_settings_warning()
{
    if (!wpbo_is_aweber_ready()) {
        ?>

		<div class="error">
			<p><?php 
        printf(__('Aweber integration is not correctly setup. Your popups won\'t send subscribers anywhere! <a href="%s">Click here to see the settings</a>.', 'wpbo'), esc_url(add_query_arg(array('post_type' => 'wpbo-popup', 'page' => 'edit.php?post_type=wpbo-popup-settings&tab=aweber'), admin_url('edit.php'))));
        ?>
</p>
		</div>

	<?php 
    }
}