-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGSCkePatch.php
More file actions
47 lines (37 loc) · 1.16 KB
/
GSCkePatch.php
File metadata and controls
47 lines (37 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* @name ckeditor plugin
* description of
* @version 0.3
* @author Shawn Alverson
* @link http://getsimple-cmd.info
* @file GSCkePatch.php
*/
$pluginid = "GSCkePatch";
function init_GSCkePatch($pluginid){
$thisfile = basename(__FILE__, ".php"); // Plugin File
$name = $pluginid;
$version = "0.4";
$author = "getsimple";
$url = "http://get-simple.info";
$desc = "Overrides ckeditor 3.x with 4.4.7";
$type = "";
$func = "";
register_plugin($thisfile,$name,$version,$author,$url,$desc,$type,$func);
}
init_GSCkePatch($pluginid);
if(get_filename_id() == 'edit' && $HTMLEDITOR){
add_action("header",$pluginid.'_header',$pluginid);
add_action("edit-content",$pluginid.'_edit_content');
}
function GSCkePatch_edit_content(){
ob_start('GSCkePatch_obfilter');
}
function GSCkePatch_obfilter($buffer){
return str_replace('<script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script>','',$buffer);
}
function GSCkePatch_header($pluginid){
global $SITEURL;
echo '<script type="text/javascript" src="'.$SITEURL.'plugins/'.$pluginid.'/js/ckeditor/ckeditor.js"></script>';
}
?>