<table class="fixed widefat">

		<thead>
			<tr>
				<th scope="col" colspan="2"><?php 
    echo ucwords($group);
    ?>
</th>
			</tr>
		</thead>

		<tbody>

		<?php 
    foreach (HMBKP_Requirements::get_requirements($group) as $requirement) {
        ?>

			<?php 
        if (is_string($requirement->raw_result()) && strlen($requirement->result()) < 20 || is_bool($requirement->raw_result())) {
            ?>

			<tr>

				<td><?php 
            echo esc_html($requirement->name());
            ?>
</td>

				<td>
					<code><?php 
/**
 * Load Intercom and send across user information and server info
 *
 * Only loaded if the user has opted in.
 *
 * @return void
 */
function hmbkp_load_intercom_script()
{
    if (!get_option('hmbkp_enable_support')) {
        return;
    }
    require_once HMBKP_PLUGIN_PATH . 'classes/class-requirements.php';
    foreach (HMBKP_Requirements::get_requirement_groups() as $group) {
        foreach (HMBKP_Requirements::get_requirements($group) as $requirement) {
            $info[$requirement->name()] = $requirement->result();
        }
    }
    foreach (HMBKP_Services::get_services() as $file => $service) {
        array_merge($info, call_user_func(array($service, 'intercom_data')));
    }
    $current_user = wp_get_current_user();
    $info['user_hash'] = hash_hmac("sha256", $current_user->user_email, "fcUEt7Vi4ym5PXdcr2UNpGdgZTEvxX9NJl8YBTxK");
    $info['email'] = $current_user->user_email;
    $info['created_at'] = strtotime($current_user->user_registered);
    $info['app_id'] = "7f1l4qyq";
    $info['name'] = $current_user->display_name;
    $info['widget'] = array('activator' => '#intercom');
    ?>

	<script id="IntercomSettingsScriptTag">
		window.intercomSettings = <?php 
    echo json_encode($info);
    ?>
;
	</script>
	<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://static.intercomcdn.com/intercom.v1.js';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}};})()</script>

<?php 
}
    /**
     * Load Intercom and send across user information and server info. Only loaded if the user has opted in.
     *
     * @param $hook
     */
    public function load_intercom_script()
    {
        if (!get_option('hmbkp_enable_support')) {
            return;
        }
        foreach (HMBKP_Requirements::get_requirement_groups() as $group) {
            foreach (HMBKP_Requirements::get_requirements($group) as $requirement) {
                $info[$requirement->name()] = $requirement->result();
            }
        }
        foreach (HMBKP_Services::get_services() as $file => $service) {
            array_merge($info, call_user_func(array($service, 'intercom_data')));
        }
        $current_user = wp_get_current_user();
        $info['user_hash'] = hash_hmac('sha256', $current_user->user_email, 'fcUEt7Vi4ym5PXdcr2UNpGdgZTEvxX9NJl8YBTxK');
        $info['email'] = $current_user->user_email;
        $info['created_at'] = strtotime($current_user->user_registered);
        $info['app_id'] = '7f1l4qyq';
        $info['name'] = $current_user->display_name;
        $info['widget'] = array('activator' => '#intercom');
        ?>

		<script id="IntercomSettingsScriptTag">
			window.intercomSettings = <?php 
        echo json_encode($info);
        ?>
;
		</script>
		<script>!function(){function e(){var a=c.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://static.intercomcdn.com/intercom.v1.js";var b=c.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}var a=window,b=a.Intercom;if("function"==typeof b)b("reattach_activator"),b("update",intercomSettings);else{var c=document,d=function(){d.c(arguments)};d.q=[],d.c=function(a){d.q.push(a)},a.Intercom=d,a.attachEvent?a.attachEvent("onload",e):a.addEventListener("load",e,!1)}}();</script>

	<?php 
    }
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Home_Url', 'Site');
class HMBKP_Requirement_Site_Url extends HMBKP_Requirement
{
    var $name = 'Site URL';
    protected function test()
    {
        return site_url();
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Site_Url', 'Site');
class HMBKP_Requirement_Plugin_Version extends HMBKP_Requirement
{
    var $name = 'Plugin Version';
    protected function test()
    {
        return BackUpWordPress_Plugin::PLUGIN_VERSION;
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Plugin_Version', 'constants');
class HMBKP_Requirement_Max_Exec extends HMBKP_Requirement
{
    var $name = 'Max execution time';
    protected function test()
    {
        return @ini_get('max_execution_time');
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Max_Exec', 'PHP');
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Define_HMBKP_EXCLUDE', 'constants');
class HMBKP_Requirement_Active_Plugins extends HMBKP_Requirement
{
    var $name = 'Active Plugins';
    protected function test()
    {
        return get_option('active_plugins');
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Active_Plugins', 'Site');
class HMBKP_Requirement_Home_Url extends HMBKP_Requirement
{
    var $name = 'Home URL';
    protected function test()
    {
        return home_url();
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Home_Url', 'Site');
class HMBKP_Requirement_Site_Url extends HMBKP_Requirement
{
    var $name = 'Site URL';
    protected function test()
    {
        return site_url();
    }
}
HMBKP_Requirements::register('HMBKP_Requirement_Site_Url', 'Site');