<?
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
} 



/*
 * The Events Calendar - Make code empty if it's 0 or Free
*/
add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 );

function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) {
	
	if ( $cost == 0 || $cost == 'Free' ) {
		$cost = '';
	}

	return $cost;
}

function ru_conditional_email_template( $search_replace, $sanitized_data ) {
   
   $member_message = 'Member luncheon: $30.00 payable in cash or cheque due on the day of luncheon.';
   $non_member_message = 'Non-member luncheon: $50.00 payable in cash or cheque due on the day of luncheon; Special Offer: Non-members have your first lunch at the Member rate of $30.00.';

   $search_replace['{conditional-message}'] = $non_member_message;
   if ( isset( $sanitized_data['are-you-a-memberf'] ) && $sanitized_data['are-you-a-memberf'] === 'Yes' ) {
      $search_replace['{conditional-message}'] = $member_message;
   }

   return $search_replace;
}
add_filter( 'rtec_email_templating', 'ru_conditional_email_template', 10, 2 );


/*
add_filter('pre_wp_mail', 'wp_disable_emails');
function wp_disable_emails() {
    return false;
}
*/

/*
function add_captcha_to_pdb_form($content) {
    $captcha_html = '<div class="g-recaptcha" data-sitekey="6LdOhjIrAAAAAIaOaJQKVdTHicT4HvcG_RY7GBKU"></div>
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>';
    return $content . $captcha_html;
}
add_filter('pdb-signup-form', 'add_captcha_to_pdb_form');


function validate_pdb_captcha($submitted_values) {
    $captcha = $_POST['g-recaptcha-response'];
    $secretKey = "6LdOhjIrAAAAALAzn1uZzQf4_SFGP63Q0ieopqEZ";
    $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=$secretKey&response=$captcha");
    $responseKeys = json_decode($response, true);
    
    if (!$responseKeys["success"]) {
        die("CAPTCHA validation failed. Please try again.");
    }
}
add_action('pdb-before_validate_signup', 'validate_pdb_captcha');

*/

function generate_math_captcha() {
    $num1 = rand(1, 10);
    $num2 = rand(1, 10);
    $sum = $num1 + $num2;
    $_SESSION['math_captcha_answer'] = $sum;
    return "$num1 + $num2 = ?";
}




<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://bhrn.silver6beta.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-posts-forum-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-posts-topic-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-posts-reply-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-taxonomies-topic-tag-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-taxonomies-tribe_events_cat-1.xml</loc></sitemap><sitemap><loc>https://bhrn.silver6beta.com/wp-sitemap-taxonomies-slide-page-1.xml</loc></sitemap></sitemapindex>
