/**
 * Add a custom shortcode to the ending of selected page.
 *
 * @uses is_page()
 */
function wbsf_content_filter($content)
{
    $edit_page_id = wbsf_options('entry_edit_page');
    if (is_page($edit_page_id)) {
        wbsf_edit_form();
    }
    // Returns the content.
    return $content;
}
function wbsf_mail_admin($form_type, $entry_id)
{
    $entry = wbsf_get_entry($form_type, $entry_id);
    $to = wbsf_options('email');
    if (!$to) {
        $to = get_option('admin_email');
    }
    $form = wbsf_get_form($entry->fid);
    $subject = "New Submission for " . $form->form_title;
    $message = '
			<p>***This is an automated response - Do Not Reply***</p>
			<p>Hi,</p>
			<p>' . $entry->parent_name . ' registered for ' . $form->form_title . '.</p>
			<p><strong>Details:</strong></p>
			' . wbsf_mail_admin_msg($form_type, $entry) . '
			<p><a href="' . wbsf_get_url('entries') . '&action=view&eid=' . $entry->eid . '&form_type=' . $form_type . '">View Registration Details</a></p>
			<p>&nbsp;</p>
			<p>Thank You.</p>';
    add_filter('wp_mail_content_type', 'wbsf_set_html_content_type');
    wp_mail($to, $subject, $message);
    remove_filter('wp_mail_content_type', 'wbsf_set_html_content_type');
}