/** * Get Aweber lists * * Helper function to get Aweber subscribers lists * * @since 2.0 * @return array */ function wpbo_aw_get_lists() { $aweber = new WPBO_Aweber(); if ($aweber->is_error()) { return array(); } return $aweber->get_lists(); }
/** * 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); }
public function display() { $url = WPBO_Aweber::get_authorization_url(); $this->echoOptionHeader(); printf("<input class=\"regular-text wpbo-aweber\" name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"%s\" value=\"%s\" />", $this->getID(), $this->settings['placeholder'], $this->getID(), $this->settings['is_password'] ? 'password' : 'text', esc_attr($this->getValue())); printf(" <a href=\"%s\" id=\"wpbo-aweber-auth\" class=\"button-secondary\" target=\"_blank\">%s</a>", $url, __('Authorize', 'wpbo')); ?> <div id="tav-license-status"> <div id="tav-license-status-empty" style="display: none; color: red;" class="tav-license-status"><p><?php _e('You did not enter your Envato purchase code.', 'wpbp'); ?> </p></div> <div id="tav-license-status-error" style="display: none; color: red;" class="tav-license-status"><p><?php _e('Validation of your Envato purchase code failed.', 'wpbp'); ?> </p></div> <div id="tav-license-status-ajaxfail" style="display: none; color: red;" class="tav-license-status"><p><?php _e('We were not able to check your Envato purchase code. Please try again later.', 'wpbp'); ?> </p></div> <div id="tav-license-status-valid" style="display: none; color: green;" class="tav-license-status"><p><?php _e('The license you entered is valid.', 'wpbp'); ?> </p></div> </div> <?php $this->echoOptionFooter(); }