/**
* Displays a MailChimp Signup Form
**/
function mailchimpSF_signup_form($args = array()) {
extract($args);
$mv = get_option('mc_merge_vars');
$ig = get_option('mc_interest_groups');
// See if we have valid Merge Vars
if (!is_array($mv)){
echo $before_widget;
?>
echo $after_widget;
return;
}
// Get some options
$uid = get_option('mc_user_id');
$list_name = get_option('mc_list_name');
echo $before_widget;
$header = get_option('mc_header_content');
// See if we have custom header content
if (!empty($header)) {
// See if we need to wrap the header content in our own div
if (strlen($header) == strlen(strip_tags($header))){
echo $before_title ? $before_title : '
‘;
}
else {
echo $header; // don’t escape $header b/c it may have HTML allowed
}
}
$sub_heading = trim(get_option(‘mc_subheader_content’));
?>