站长资源
全栈工程师站点

禁止Kindeditor for wordpress过滤html,css

打开wp-content/plugins/kindeditor-for-wordpress下面的kindeditor_class.php文件,

找到load_kindeditor函数,

在option的结尾加入filterMode: false

修改后如下:

function load_kindeditor()
{
	?>
	<script type="text/javascript">
	//<![CDATA[
		var editor;
		var options = {
			cssPath : ['<?php echo $this->plugin_path; ?>plugins/code/prettify.css','<?php echo $this->plugin_path; ?>style.css'],
			uploadJson : '<?php echo $this->plugin_path ?>php/upload_json.php',
			fileManagerJson : '<?php echo $this->plugin_path ?>php/file_manager_json.php',
			items : [
			'source', '|', 'undo', 'redo', '|', 'template', 'cut', 'copy', 'paste',
			'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
			'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
			'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'map', 'baidumap','fullscreen','about', '/',
			'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
			'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage','flash', 'media', 'table', 'hr', 'emoticons', 'code', 'anchor', 'blockquote', 'wpmore',
			'link', 'unlink'
			],
			afterChange : function() {
				jQuery('#wp-word-count .word-count').html(this.count('text'));
			},
			filterMode: false
		};
		KindEditor.ready(function(K) {
				editor = K.create('#content',options);
		});
	//]]>
	</script>
	<?php
}

本文出处:来自互联网信息共享,请勿相信收费信息站长资源 » 禁止Kindeditor for wordpress过滤html,css

评论 1

评论前必须登录!

 

  1. #-9

    超级干货

    andy1年前 (2017-09-28)