此款emlog插件有以下功能:
- 代码高亮(包含十几种常见代码自动高了着色);
- pre标签自动换行(妈妈再也不用担心我的代码过长显示不全了-_-|);
- 可复制,点击一下即可复制代码到剪贴板,方便使用;
- 可新窗口查看代码,进行其他操作;
- 可打印(貌似没啥用 -_-|)
-
暂时就这么多.
有如下不足:
由于emlog 5.1.0版本采用KindEditor新版本,不支持原来的方法,因此不再支持5.1.0及以下版本
如果你的文章页或者是css中对pre标签有空值作用,可能会有bug显示.可自行调试解决,或者联系我,我会尽力帮你解决.
兼容性不是太好,如果安装后发现不能正常使用,请检查是否是某款插件冲突导致.
使用方法:
第一步:通过后台插件安装地址,上传安装插件,如果失败(一般是空间不支持)
请解压后用FTP上传至 网站根目录/content/plugins/ 路径下
第二步:在插件设置页面刷新,激活即可
<?php
/**
* Confirms that the activation key that is sent in an email after a user signs
* up for a new blog matches the key for that user and then displays confirmation.
*
* @package WordPress
*/
define( 'WP_INSTALLING', true );
/** Sets up the WordPress Environment. */
require( dirname(__FILE__) . '/wp-load.php' );
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
if ( !is_multisite() ) {
wp_redirect( site_url( '/wp-login.php?action=register' ) );
die();
}
if ( is_object( $wp_object_cache ) )
$wp_object_cache->cache_enabled = false;
// Fix for page title
$wp_query->is_404 = false;
/**
* Fires before the Site Activation page is loaded.
*
* @since 3.0.0
*/
do_action( 'activate_header' );
/**
* Adds an action hook specific to this page that fires on wp_head
*
* @since MU
*/
function do_activate_header() {
/**
* Fires before the Site Activation page is loaded, but on the wp_head action.
*
* @since 3.0.0
*/
do_action( 'activate_wp_head' );
}
add_action( 'wp_head', 'do_activate_header' );
/**
* Loads styles specific to this page.
*
* @since MU
*/
function wpmu_activate_stylesheet() {
?>
<style type="text/css">
form { margin-top: 2em; }
#submit, #key { width: 90%; font-size: 24px; }
#language { margin-top: .5em; }
.error { background: #f66; }
span.h3 { padding: 0 8px; font-size: 1.3em; font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; font-weight: bold; color: #333; }
</style>
<?php
}
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
get_header();
?>
插件下载:et_highlighter51.zip 备份链接:http://pan.baidu.com/s/1jGvqycI
欢迎大家下载使用,转载请注明出处,谢谢. Powered By Mrxn https://mrxn.net
