indexShortcode = $index_sh; $this->option_name = 'sh_' . $this->id_base; $this->default_failure_message = __( 'There was a problem processing your submission.', 'another-mailchimp-widget' ); $this->default_signup_text = __( 'Subscribe', 'another-mailchimp-widget' ); $this->default_success_message = __( 'Thank you for joining our mailing list.', 'another-mailchimp-widget' ); $this->an_mc_plugin = AN_MC_Plugin::get_instance(); add_action( 'parse_request', array( &$this, 'process_submission' ) ); $instance2 = array( $this->indexShortcode => $instance ); $this->save_settings( $instance2 ); } /** * Save settings * * @param $settings */ public function save_settings( $settings ) { $settings[ '_multishortcode' ] = 1; update_option( $this->option_name, $settings ); } /** * Get MailChimp form * * @param $instance * * @return int */ public function get_MailChimp( $instance ) { AN_MC_Plugin::get_instance()->add_scripts(); AN_MC_Plugin::get_instance()->add_style(); $api_key = AN_MC_Plugin::get_instance()->is_have_api_key(); if ( $this->successful_signup ) { echo $this->signup_success_message; } elseif ( ! $api_key ) { AN_MC_View::get_instance()->get_template( '/notice/change-settings' ); } elseif ( empty( $instance[ 'current_mailing_list' ] ) ) { AN_MC_View::get_instance()->get_template( '/notice/empty-list' ); } else { ?>
$this->id_base . '_form_' . $this->indexShortcode, 'url' => $_SERVER[ 'REQUEST_URI' ] ) ?>
subscribe_errors; if ( $instance[ 'collect_first' ] ) { if ( $instance[ 'showplaceholder' ] ) { ?>

option_name ); $hash = md5( $options[ $this->indexShortcode ][ 'current_mailing_list' ] ); return $hash; } }