⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple.php

📁 很棒的在线教学系统
💻 PHP
字号:
<?phprequire_once 'HTMLPurifier/TagTransform.php';/** * Simple transformation, just change tag name to something else, * and possibly add some styling. This will cover most of the deprecated * tag cases. */class HTMLPurifier_TagTransform_Simple extends HTMLPurifier_TagTransform{        var $style;        /**     * @param $transform_to Tag name to transform to.     * @param $style CSS style to add to the tag     */    function HTMLPurifier_TagTransform_Simple($transform_to, $style = null) {        $this->transform_to = $transform_to;        $this->style = $style;    }        function transform($tag, $config, &$context) {        $new_tag = $tag->copy();        $new_tag->name = $this->transform_to;        if (!is_null($this->style) &&            ($new_tag->type == 'start' || $new_tag->type == 'empty')        ) {            $this->prependCSS($new_tag->attr, $this->style);        }        return $new_tag;    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -