{\rtf1\ansi\ansicpg1252\cocoartf2867
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 /* ============================================================\
   FILE 2: functions.php\
   ============================================================ */\
\
<?php\
function hmt_setup() \{\
    add_theme_support( 'title-tag' );\
    add_theme_support( 'post-thumbnails' );\
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'gallery', 'caption' ) );\
\
    register_nav_menus( array(\
        'primary' => __( 'Primary Menu', 'harmony-mind-therapy' ),\
        'footer'  => __( 'Footer Menu', 'harmony-mind-therapy' ),\
    ) );\
\}\
add_action( 'after_setup_theme', 'hmt_setup' );\
\
function hmt_enqueue_scripts() \{\
    wp_enqueue_style( 'hmt-style', get_stylesheet_uri(), array(), '1.0' );\
    wp_enqueue_style( 'google-fonts',\
        'https://fonts.googleapis.com/css2?family=Georgia&display=swap', array(), null );\
\}\
add_action( 'wp_enqueue_scripts', 'hmt_enqueue_scripts' );\
\
// Remove WordPress default admin bar offset\
add_filter( 'show_admin_bar', '__return_false' );\
?>\
\
/* ============================================================\
   ADD THIS TO functions.php \'97 Contact Form Email Handler\
   ============================================================ */\
\
<?php\
function hmt_handle_contact_form() \{\
    if ( ! isset($_POST['hmt_nonce']) || ! wp_verify_nonce($_POST['hmt_nonce'], 'hmt_contact_form') ) \{\
        wp_die('Security check failed.');\
    \}\
    $first   = sanitize_text_field($_POST['first_name'] ?? '');\
    $last    = sanitize_text_field($_POST['last_name'] ?? '');\
    $email   = sanitize_email($_POST['email'] ?? '');\
    $phone   = sanitize_text_field($_POST['phone'] ?? '');\
    $service = sanitize_text_field($_POST['service'] ?? '');\
    $message = sanitize_textarea_field($_POST['message'] ?? '');\
\
    $to      = 'kaazmi.mansour@harmonymindtherapy.com';\
    $subject = 'New Contact Form Submission \'97 Harmony Mind Therapy';\
    $body    = "Name: $first $last\\nEmail: $email\\nPhone: $phone\\nService: $service\\n\\nMessage:\\n$message";\
    $headers = array('Content-Type: text/plain; charset=UTF-8', 'Reply-To: ' . $email);\
\
    wp_mail($to, $subject, $body, $headers);\
    wp_redirect(home_url('/contact/?sent=1'));\
    exit;\
\}\
add_action('admin_post_hmt_contact', 'hmt_handle_contact_form');\
add_action('admin_post_nopriv_hmt_contact', 'hmt_handle_contact_form');\
\
/* Also add therapist photo option to Customizer */\
function hmt_customizer($wp_customize) \{\
    $wp_customize->add_setting('hmt_therapist_photo', array('default'=>'','sanitize_callback'=>'esc_url_raw'));\
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'hmt_therapist_photo', array(\
        'label'   => 'Therapist Photo',\
        'section' => 'title_tagline',\
        'settings'=> 'hmt_therapist_photo',\
    )));\
\}\
add_action('customize_register', 'hmt_customizer');\
?>\
}<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://harmonymindtherapy.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://harmonymindtherapy.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://harmonymindtherapy.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://harmonymindtherapy.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://harmonymindtherapy.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
