Debug_Bar_Pretty_Output::get_pretty_string PHP Method

get_pretty_string() private static method

Convert a string to pretty output.
private static get_pretty_string ( string $string, boolean $short = false, boolean $escape = true ) : string
$string string The string to make pretty.
$short boolean Short or normal annotation.
$escape boolean Whether to character escape the textual output.
return string
        private static function get_pretty_string($string, $short = false, $escape = true)
        {
            $output = '<span style="color: #336600;">';
            if (true !== $short) {
                $output .= '<b><i>string[' . strlen($string) . ']</i></b> : ';
            }
            $output .= '&lsquo;';
            if (true === $escape) {
                $output .= str_replace('  ', ' &nbsp;', esc_html($string));
            } else {
                $output .= str_replace('  ', ' &nbsp;', $string);
            }
            $output .= '&rsquo;</span><br />';
            return $output;
        }