batcache::add_debug_html_to_output PHP Method

add_debug_html_to_output() public method

public add_debug_html_to_output ( $debug_html )
    function add_debug_html_to_output($debug_html)
    {
        // Casing on the Content-Type header is inconsistent
        foreach (array('Content-Type', 'Content-type') as $key) {
            if (isset($this->cache['headers'][$key][0]) && 0 !== strpos($this->cache['headers'][$key][0], 'text/html')) {
                return;
            }
        }
        $head_position = strpos($this->cache['output'], '<head');
        if (false === $head_position) {
            return;
        }
        $this->cache['output'] .= "\n{$debug_html}";
    }