function shortcode($attr)
 {
     if (thatcamp_registrations_option('open_registration') == 1) {
         ob_start();
         $this->display_registration();
         $output_string = ob_get_contents();
         ob_end_clean();
         return $output_string;
     } else {
         return 'Registration is closed.';
     }
 }
/**
 * For a new registration, send email notifications to admins who have requested them
 */
function thatcamp_registrations_send_admin_notification($reg_id)
{
    $emails = thatcamp_registrations_option('admin_notify_emails');
    if (!empty($emails)) {
        $registration = thatcamp_registrations_get_registrations(array('id' => $reg_id));
        if (!empty($registration)) {
            $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
            $subject = sprintf(__('New registration at %s', 'thatcamp-registrations'), $blogname);
            $content = sprintf(__('You have received a new registration at %1$s. To view this registration, visit %2$s', 'thatcamp-registrations'), $blogname, admin_url('?page=thatcamp-registrations&id=' . intval($reg_id)));
            foreach ($emails as $email) {
                wp_mail($email, $subject, stripslashes($content));
            }
        }
    }
}