/
ckeditor_wordpress.php
53 lines (44 loc) · 2.78 KB
/
ckeditor_wordpress.php
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
48
49
50
51
52
53
<?php if ( !defined('ABSPATH')){ exit; } // Exit if accessed directly
/*
Plugin Name: CKEditor for WordPress
Plugin URI: http://wordpress.ckeditor.com/
Description: Replaces the default WordPress editor with <a href="http://ckeditor.com/"> CKEditor</a>
Version: 4.5.3.3
Author: CKSource
Author URI: http://cksource.com/
*/
add_action('init', 'ckeditor_init');
function ckeditor_init(){
global $ckeditor_wordpress;
require_once dirname(__FILE__) . '/ckeditor_class.php';
if (is_admin()){
add_action('admin_menu', array(&$ckeditor_wordpress, 'add_option_page'));
add_action('admin_head', array(&$ckeditor_wordpress, 'add_admin_head'));
add_action('personal_options_update', array(&$ckeditor_wordpress, 'user_personalopts_update'));
add_action('admin_print_scripts', array(&$ckeditor_wordpress, 'add_post_js'));
add_action('admin_print_footer_scripts', array(&$ckeditor_wordpress, 'remove_tinymce'));
add_action('admin_init', array(&$ckeditor_wordpress, 'deregister_editor_expand' ));
// TODO: fix support for V4
// add_filter('ckeditor_external_plugins', array(&$ckeditor_wordpress, 'ckeditor_linkbrowser_plugin'));
// add_action('wp_ajax_linkbrowser_loader', array(&$ckeditor_wordpress, 'ckeditor_linkbrowser_loader'));
// add_action('wp_ajax_linkbrowser_search', array(&$ckeditor_wordpress, 'ckeditor_linkbrowser_search'));
}
add_action( 'wp_print_scripts', array(&$ckeditor_wordpress, 'add_comment_js'));
add_filter( 'ckeditor_external_plugins', array(&$ckeditor_wordpress, 'ckeditor_wpmore_plugin') );
add_filter( 'ckeditor_buttons', array(&$ckeditor_wordpress, 'ckeditor_wpmore_button') );
add_filter( 'ckeditor_external_plugins', array(&$ckeditor_wordpress, 'ckeditor_wpgallery_plugin') );
add_filter( 'ckeditor_load_lang_options', array(&$ckeditor_wordpress, 'ckeditor_load_lang_options') );
//add filter to change content before insert/update to database - needed for wpeditimage plugin
add_filter( 'wp_insert_post_data' , array(&$ckeditor_wordpress, 'ckeditor_insert_post_data_filter'));
/** temporary for vvq **/
add_filter( 'ckeditor_external_plugins', array(&$ckeditor_wordpress, 'ckeditor_externalvvq_plugin') );
add_filter( 'ckeditor_buttons', array(&$ckeditor_wordpress, 'ckeditor_vvqbuttons') );
/** temporary for wppoll **/
add_filter( 'ckeditor_external_plugins', array(&$ckeditor_wordpress, 'wppoll_external') );
add_filter( 'ckeditor_buttons', array(&$ckeditor_wordpress, 'wppoll_buttons') );
/** temporary for ngggallery **/
include_once dirname(__FILE__) . '/plugins/nggallery/ckeditor.php';
/** temporary for gd-star-rating **/
add_filter( 'ckeditor_external_plugins', array(&$ckeditor_wordpress, 'starrating_external_plugin') );
add_filter( 'ckeditor_buttons', array(&$ckeditor_wordpress, 'starrating_buttons') );
}