function widget($args, $instance) { global $user_ID, $user_email, $wpdb; extract($args); // add ALO: hide the widget in subscriber page if (is_page(get_option('alo_em_subsc_page'))) { return; } if (is_page(alo_em_get_subscrpage_id(alo_em_get_language()))) { return; } //if ( is_page() ) return; // Hide widget to users, if required in setting if (get_option('alo_em_hide_widget_users') == "yes" && is_user_logged_in()) { return; } // Our variables from the widget settings. $title = apply_filters('widget_title', $instance['title']); // Get the the user's optin setting if (alo_em_is_subscriber($user_email)) { $optin_checked = "checked='checked'"; $optout_checked = ""; } else { $optin_checked = ""; $optout_checked = "checked='checked'"; } // Before widget (defined by themes). echo $before_widget; // Display the widget title if one was input (before and after defined by themes). if ($title) { echo $before_title . $title . $after_title; } // get the message optin/out messages // mod ALO: we need them also outside widget $optin_msg = get_option('alo_em_optin_msg'); $optout_msg = get_option('alo_em_optout_msg'); //$optin_msg = $instance['alo_easymail_optin_msg']; //$optout_msg = $instance['alo_easymail_optout_msg']; // add ALO: print the form echo alo_em_show_widget_form(); // and output it //echo $html; // After widget (defined by themes). echo $after_widget; }