WordPress 代码高亮插件:Pure-Highlightjs(支持可视化下插入代码)

//这是插入代码的显示效果
<?php
$caid=isset($_GET['caid']);
if($caid){
	//栏目页
	$page_id='catalog';
	$index_body='body_catalog.php';
}else{
	//首页
	$page_id='index';
	$index_body='body_index.php';
}
include_once 'header.php';
include_once $index_body;
include_once 'footer.php';
?>

 

Pure-Highlightjs 一个基于 Highlightjs 实现的 WordPress 代码高亮插件,支持 N 多种语言高亮,还提供多种主题。支持在 WordPress 可视化编辑模式下插入代码。

Pure-Highlightjs 依赖于以下开源项目

highlight.js https://highlightjs.org

highlight.js 是一个用于在任何 web 页面上着色显示各种示例源代码语法的 JS 项目

安装说明

1.  下载

点击下载 https://github.com/icodechef/…/Pure-Highlightjs_1.0.zip

2. 安装

进入 WordPress 后台管理页面,“插件 》安装插件 》上传插件”,上传刚才下载的 ZIP 文件,然后安装。

或者解压安装包,上传到插件目录,/wp-content/plugins/。

3. 启用

安装完毕后,在已经安装的插件里启用 “Pure Highlightjs”。

如何使用

可直接在可视化编辑界面点击“插入代码”按钮,然后选择代码类型,粘贴代码插入即可:

screenshot-1

screenshot-2

GitHub 地址:Pure-Highlightjs

代码高亮效果:我的主页

好歌资源网,欢迎分享,欢迎评论,(开通PLUS会员资源免费下 )本站积分兑换是1RMB:1金币。
好歌源码网 » WordPress 代码高亮插件:Pure-Highlightjs(支持可视化下插入代码)

10 评论

  1. 头像

    you are actually a good webmaster. The site loading pace is amazing.
    It kind of feels that you are doing any distinctive trick.
    Moreover, The contents are masterwork. you have performed a magnificent task in this topic!

    1. admin

      Happy to help you!

  2. 头像

    cialis cialis coupon walmart [url=https://spcialisps.com/#]cialis generic name[/url] cialis no prescription when will cialis go generic

  3. 头像

    Hello, all is going sound here and ofcourse every one is sharing
    information, that’s really excellent, keep up writing.

  4. 头像

    Would you be keen on exchanging hyperlinks?

  5. 头像

    The subsequent time I read a blog, I hope that it doesnt disappoint me as much as this one. I imply, I do know it was my choice to read, but I actually thought youd have one thing attention-grabbing to say. All I hear is a bunch of whining about one thing that you would fix in the event you werent too busy in search of attention.

  6. 头像

    You made some decent points there. I seemed on the internet for the problem and found most people will go along with with your website.

  7. 头像

    Hey! Someone in my Myspace group shared this site with
    us so I came to give it a look. I’m definitely enjoying the information. I’m book-marking and
    will be tweeting this to my followers! Exceptional blog and
    great design and style.

  8. 头像

    Do you have any video of that? I’d love to find out more details.

  9. 头像

    May I just say what a relief to find somebody that genuinely knows what
    they’re talking about on the net. You certainly know how to bring
    an issue to light and make it important. More people really need to check this out and understand this side of the
    story. I was surprised you aren’t more popular because you most certainly
    possess the gift.

发表评论

提供最优质的资源集合

立即查看 了解详情
  • 本站部分文章、资源来自互联网,版权归原作者及网站所有,如果侵犯了您的权利,请及时联系我删除!
  • ©2020 站点地图