<?
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 = ?";
}




BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//BHRN - ECPv6.15.17.1//NONSGML v1.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-ORIGINAL-URL:https://bhrn.silver6beta.com
X-WR-CALDESC:Events for BHRN
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-Robots-Tag:noindex
X-PUBLISHED-TTL:PT1H
BEGIN:VTIMEZONE
TZID:America/Toronto
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:20160313T070000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:20161106T060000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:20170312T070000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:20171105T060000
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:20180311T070000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:20181104T060000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20171123T113000
DTEND;TZID=America/Toronto:20171123T133000
DTSTAMP:20260418T135658
CREATED:20170828T183616Z
LAST-MODIFIED:20171110T203233Z
UID:481-1511436600-1511443800@bhrn.silver6beta.com
SUMMARY:Exploring Psychological Assessments with Thomas International’s Personal Profile Analysis (DISC) Tool
DESCRIPTION:What is PPA(Personal Profile Analysis)? \n \nJoin us for an exciting presentation from Ray Getson of Thomas International who will help you interpret your own Personal Profile Analysis (PPA) tool. All participants will be sent a FREE test to complete prior to the event. \n  \nAll registered participants will be sent an assessment to complete before the event and receive their results prior to the event to review and discuss  \nPPA is a behavioral profile that provides an accurate insight into how people behave at work. It provides the real answers to questions such as: \n\nWhat are this person’s strengths?\nIs our business playing to this person’s strengths?\nWhich limitations will impact on their ability to be successful?\nWill this person be successful in a role that is technical\, quality or standards focused?\nDoes this person drive for results?\nCan this person work with and through people?\nWill this person excel in a service\, support or specialist role?\n\n  \nHow can PPA help you?  \nRecruit \nThomas PPA will help you to reduce the cost and risk of recruitment and speed up your process. \nRetain \nThomas PPA will help you to reduce staff turnover by identifying what motivates and engages your staff. \nDevelop \nThomas PPA will help you to know precisely where to invest your learning and development budget to achieve the maximum impact on your business. \n  \nManage \nThomas PPA will help your managers spend less time managing poor performers and more time motivating top performers by ensuring they are working on the behavioral issues that will bring the biggest benefit to the business.
URL:https://bhrn.silver6beta.com/event/ray-getson-from-thomas-international-disc-exploring-psychological-assessments-with-thomas-internationals-personal-profile-analysis-disc-tool-responsibility/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2017/08/Ray-Getson.jpg
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20171026T113000
DTEND;TZID=America/Toronto:20171026T133000
DTSTAMP:20260418T135658
CREATED:20170830T184150Z
LAST-MODIFIED:20171023T174136Z
UID:490-1509017400-1509024600@bhrn.silver6beta.com
SUMMARY:Jessica Persaud\, Employer Specialist with the Office of the Employer Adviser
DESCRIPTION:The Office of the Employer Adviser (OEA) is an independent agency of the Ministry of Labour (MOL) and has been helping Ontario employers manage their workplace safety and insurance costs since 1985. We provide expert advice to any size employer\, and represent primarily employers who employ fewer than 100 employees. Our service is completely confidential and you will never be charged a fee\, given the OEA is funded through the premiums or administrative fees you pay the Workplace Safety and Insurance Board (WSIB). \nOEA Workers’ Compensation services for employers\nAdvice\nWe have professional advisers experienced in all aspects of workplace safety and insurance answering your telephone queries in our advice centre. We help to resolve disputes early in the process and ensure you are treated fairly at all levels in the workplace safety and insurance system. We give you the information you need to get injured workers back to work safely. We provide you with practical advice on claims and revenue matters. \nRepresentation\nPrimarily for employers who employ fewer than 100 workers\, we provide representation at appeals at the WSIB and the Workplace Safety and Insurance Appeals Tribunal (WSIAT). \nEducation\nWe have publications designed to meet the day-to-day needs of employers regarding the workplace safety and insurance system\, and we also conduct online webinars and educational seminars to inform and educate employers about their rights and obligations under the Workplace Safety and Insurance Act (WSIA).
URL:https://bhrn.silver6beta.com/event/jessica-persaud-employer-specialist-with-the-office-of-the-employer-adviser/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2017/08/jessica-persaud.jpg
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20170921T113000
DTEND;TZID=America/Toronto:20170921T130000
DTSTAMP:20260418T135658
CREATED:20170816T142951Z
LAST-MODIFIED:20170918T125843Z
UID:459-1505993400-1505998800@bhrn.silver6beta.com
SUMMARY:Workplace Investigations: top ten mistakes (space is limited)
DESCRIPTION:Natasha Savoline\, Lawyer & HR Advisor  \nNatasha joined Bernardi Human Resource Law in 2014 as a Lawyer and HR Advisor. Since 2003 she has been advising private and public sector employers and HR professionals on all aspects of labour and employment law matters using a balanced and proactive approach. Natasha is an experienced workplace investigator of harassment\, bullying\, violence\, discrimination and sexual harassment. She also regularly conducts training in all areas of human resource law. \nAn avid traveller\, so far Natasha has the stamps of 21 countries on her passport. Natasha grew up with a member of a famous rock band; the grandson of a legendary Toronto Maple Leafs goalie; and the cousin of the greatest NHL player ever. She also went to the same high school as a famous movie actor. \nNatasha has co-authored several texts including the Ontario Human Rights Code: Quick Reference\, 2009\, Ontario Workplace Safety and Insurance Act: Quick Reference\, 2010 and the McGraw-Hill Irwin Human Resource Management textbook (2011).
URL:https://bhrn.silver6beta.com/event/workplace-investigations/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2017/08/Natasha-Savoline_2017.jpg
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20170622T113000
DTEND;TZID=America/Toronto:20170622T130000
DTSTAMP:20260418T135658
CREATED:20161214T130509Z
LAST-MODIFIED:20170502T192353Z
UID:28-1498131000-1498136400@bhrn.silver6beta.com
SUMMARY:Wellness Fair
DESCRIPTION:
URL:https://bhrn.silver6beta.com/event/wellness-fair/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2016/12/Wellness-Fair.jpg
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20170316T113000
DTEND;TZID=America/Toronto:20170316T130000
DTSTAMP:20260418T135658
CREATED:20161214T130410Z
LAST-MODIFIED:20170307T162947Z
UID:26-1489663800-1489669200@bhrn.silver6beta.com
SUMMARY:Workplace Investigations and Fraud
DESCRIPTION:Come listen to a Lawyer from Hicks Morley speak on workplace investigations. \n \n  \n  \n  \n  \n  \nLydia Bay is a labour and employment lawyer in Hicks Morley’s Waterloo office. She\n provides advice and representation to employers and management on a wide range\n of human resources matters\, including practical and strategic advice on issues\n relating to human rights and accommodation\, grievance arbitrations\, employment\n standards\, wrongful dismissals and related litigation. \n \n  \n  \n  \n  \n  \nMatthew Mihailovich is a labour and employment lawyer in Hicks Morley’s Waterloo\n office. He advises a wide variety of public and private sector employers on issues\n relating to their workplaces. He appears in court\, as well as before labour arbitrators\,\n the Human Rights Tribunal of Ontario\, the Ontario Labour Relations Board\, the\n Workplace Safety and Insurance Board\, and the Workplace Safety and Insurance\n Appeals Tribunal. He also regularly acts as spokesperson in collective bargaining.
URL:https://bhrn.silver6beta.com/event/workplace-investigations-and-fraud/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2016/12/hicks-e1488904679279.jpg
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20170216T114500
DTEND;TZID=America/Toronto:20170216T133000
DTSTAMP:20260418T135658
CREATED:20161214T130207Z
LAST-MODIFIED:20170206T232151Z
UID:24-1487245500-1487251800@bhrn.silver6beta.com
SUMMARY:Positive Psychology and Wellness
DESCRIPTION:We welcome co-presenters Dr. Judy Eaton and Holly Cox\, both from Laurier University in Brantford. \nDr. Judy Eaton \nHolly Cox \n  \n  \n \n  \n 
URL:https://bhrn.silver6beta.com/event/positive-psychology-and-wellness/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2016/12/dr-judy-eaton.jpg
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Toronto:20170119T100000
DTEND;TZID=America/Toronto:20170119T133000
DTSTAMP:20260418T135658
CREATED:20161214T125756Z
LAST-MODIFIED:20170110T164428Z
UID:19-1484820000-1484832600@bhrn.silver6beta.com
SUMMARY:Employment Law Update - extended lunch
DESCRIPTION:We welcome Blair McCreadie who will be speaking about Employment Law Updates. \nBlair McCreadie is a partner in the Employment & Labour Group of Dentons Canada LLP’s Toronto office\, where he practises in all areas of employment and labour law. Blair is also a member of the firm’s Public Policy Practice Group\, and provides strategic advice to clients on government relations and public policy issues.
URL:https://bhrn.silver6beta.com/event/employment-law-update-extended-lunch/
LOCATION:Best Western Brantford Hotel and Conference Centre\, 19 Holiday Drive\, Brantford\, ON\, N3R 7J4\, Canada
CATEGORIES:Luncheon Meetings
ATTACH;FMTTYPE=image/jpeg:https://bhrn.silver6beta.com/wp-content/uploads/2016/12/Mccreadie_Blair-e1484066620199.jpg
END:VEVENT
END:VCALENDAR