高亮代码区块

PHP 代码高亮

<?php
    function ConvertSimbols($var, $ConvertQuotes = 0) {
        if ($ConvertQuotes > 0) {
            $var = htmlentities($var, ENT_NOQUOTES, 'UTF-8');
            $var = str_replace('\"', '', $var);
            $var = str_replace("\'", '', $var);
        } else {
            $var = htmlentities($var, ENT_QUOTES, 'UTF-8');
        }
        return $var;
    }
?>

CSS 代码高亮

.wrap [class*="CodeMirror-lint-marker"],
.wp-core-ui [class*="CodeMirror-lint-message"],
.wrap .CodeMirror-lint-marker-multiple {
	background-image: none;
}

.wp-core-ui .CodeMirror-lint-marker-error,
.wp-core-ui .CodeMirror-lint-marker-warning {
	cursor: help;
}

.wrap .CodeMirror-lint-marker-multiple {
	position: absolute;
	top: 0;
}

.wrap [class*="CodeMirror-lint-marker"]:before {
	font: normal 18px/1 dashicons;
	position: relative;
	top: -2px;
}
2
0
文章大纲