Black Studio TinyMCE Widget - Version 0.6.4

Version Description

  • Fixed compatibility issue with "Jetpack / After the Deadline" plugin
  • Optimization of js/css loading
Download this release

Release Info

Developer marcochiesi
Plugin Icon 128x128 Black Studio TinyMCE Widget
Version 0.6.4
Comparing to
See all releases

Code changes from version 0.6.3 to 0.6.4

Files changed (2) hide show
  1. black-studio-tinymce-widget.php +26 -17
  2. readme.txt +5 -1
black-studio-tinymce-widget.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: Black Studio TinyMCE Widget
4
  Plugin URI: http://wordpress.org/extend/plugins/black-studio-tinymce-widget/
5
  Description: Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
6
- Version: 0.6.3
7
  Author: Black Studio
8
  Author URI: http://www.blackstudio.it
9
  License: GPL2
10
  */
11
 
12
  global $black_studio_tinymce_widget_version;
13
- $black_studio_tinymce_widget_version = "0.6.3";
14
 
15
  /* Widget class */
16
  class WP_Widget_Black_Studio_TinyMCE extends WP_Widget {
@@ -66,15 +66,37 @@ class WP_Widget_Black_Studio_TinyMCE extends WP_Widget {
66
  }
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /* Instantiate tinyMCE editor */
70
- add_action('admin_head', 'black_studio_tinymce_load_tiny_mce');
71
  function black_studio_tinymce_load_tiny_mce() {
 
 
 
 
72
  //remove_all_filters('mce_external_plugins');
73
  wp_tiny_mce(false, array());
74
  }
75
 
76
  /* TinyMCE setup customization */
77
- add_filter('tiny_mce_before_init', 'black_studio_tinymce_init_editor');
78
  function black_studio_tinymce_init_editor($initArray) {
79
  // Remove WP fullscreen mode and set the native tinyMCE fullscreen mode
80
  $plugins = explode(',', $initArray['plugins']);
@@ -91,16 +113,7 @@ function black_studio_tinymce_init_editor($initArray) {
91
  return $initArray;
92
  }
93
 
94
- /* Widget initialization */
95
- add_action('widgets_init', 'black_studio_tinymce_init');
96
- function black_studio_tinymce_init() {
97
- if ( !is_blog_installed() )
98
- return;
99
- register_widget('WP_Widget_Black_Studio_TinyMCE');
100
- }
101
-
102
  /* Widget js loading */
103
- add_action("admin_print_scripts", "black_studio_tinymce_scripts");
104
  function black_studio_tinymce_scripts() {
105
  global $black_studio_tinymce_widget_version;
106
  add_thickbox();
@@ -109,18 +122,14 @@ function black_studio_tinymce_scripts() {
109
  }
110
 
111
  /* Widget css loading */
112
- add_action("admin_print_styles", "black_studio_tinymce_styles");
113
  function black_studio_tinymce_styles() {
114
  wp_enqueue_style('thickbox');
115
  wp_enqueue_style('black-studio-tinymce-widget', plugins_url('black-studio-tinymce-widget.css', __FILE__));
116
  }
117
 
118
  /* Preload WP editor dialogs */
119
- add_action( 'admin_print_footer_scripts', 'black_studio_tinymce_preload_dialogs');
120
  function black_studio_tinymce_preload_dialogs() {
121
  wp_preload_dialogs( array( 'plugins' => 'wpdialogs,wplink,wpfullscreen' ) );
122
  }
123
 
124
- /* Load localization */
125
- load_plugin_textdomain('black-studio-tinymce-widget', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
126
  ?>
3
  Plugin Name: Black Studio TinyMCE Widget
4
  Plugin URI: http://wordpress.org/extend/plugins/black-studio-tinymce-widget/
5
  Description: Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
6
+ Version: 0.6.4
7
  Author: Black Studio
8
  Author URI: http://www.blackstudio.it
9
  License: GPL2
10
  */
11
 
12
  global $black_studio_tinymce_widget_version;
13
+ $black_studio_tinymce_widget_version = "0.6.4"; // This is used internally - should be the same reported on the plugin header
14
 
15
  /* Widget class */
16
  class WP_Widget_Black_Studio_TinyMCE extends WP_Widget {
66
  }
67
  }
68
 
69
+ /* Load localization */
70
+ load_plugin_textdomain('black-studio-tinymce-widget', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
71
+
72
+ /* Widget initialization */
73
+ add_action('widgets_init', 'black_studio_tinymce_init');
74
+ function black_studio_tinymce_init() {
75
+ if ( !is_blog_installed() )
76
+ return;
77
+ register_widget('WP_Widget_Black_Studio_TinyMCE');
78
+ }
79
+
80
+ /* Add actions and filter (only in widgets admin page) */
81
+ if ($pagenow == "widgets.php") {
82
+ add_action( 'admin_head', 'black_studio_tinymce_load_tiny_mce');
83
+ add_filter( 'tiny_mce_before_init', 'black_studio_tinymce_init_editor', 15);
84
+ add_action( 'admin_print_scripts', 'black_studio_tinymce_scripts');
85
+ add_action( 'admin_print_styles', 'black_studio_tinymce_styles');
86
+ add_action( 'admin_print_footer_scripts', 'black_studio_tinymce_preload_dialogs');
87
+ }
88
+
89
  /* Instantiate tinyMCE editor */
 
90
  function black_studio_tinymce_load_tiny_mce() {
91
+ // Remove filters added from "After the deadline" plugin, to avoid conflicts
92
+ remove_filter( 'mce_external_plugins', 'add_AtD_tinymce_plugin' );
93
+ remove_filter( 'mce_buttons', 'register_AtD_button' );
94
+ remove_filter( 'tiny_mce_before_init', 'AtD_change_mce_settings' );
95
  //remove_all_filters('mce_external_plugins');
96
  wp_tiny_mce(false, array());
97
  }
98
 
99
  /* TinyMCE setup customization */
 
100
  function black_studio_tinymce_init_editor($initArray) {
101
  // Remove WP fullscreen mode and set the native tinyMCE fullscreen mode
102
  $plugins = explode(',', $initArray['plugins']);
113
  return $initArray;
114
  }
115
 
 
 
 
 
 
 
 
 
116
  /* Widget js loading */
 
117
  function black_studio_tinymce_scripts() {
118
  global $black_studio_tinymce_widget_version;
119
  add_thickbox();
122
  }
123
 
124
  /* Widget css loading */
 
125
  function black_studio_tinymce_styles() {
126
  wp_enqueue_style('thickbox');
127
  wp_enqueue_style('black-studio-tinymce-widget', plugins_url('black-studio-tinymce-widget.css', __FILE__));
128
  }
129
 
130
  /* Preload WP editor dialogs */
 
131
  function black_studio_tinymce_preload_dialogs() {
132
  wp_preload_dialogs( array( 'plugins' => 'wpdialogs,wplink,wpfullscreen' ) );
133
  }
134
 
 
 
135
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.blackstudio.it/pagamento/
4
  Tags: wysiwyg, widget, tinymce, editor, rich text, rich text editor, visual editor, wysiwyg editor, tinymce editor, widget editor, html editor, wysiwyg widget, html widget, editor widget, text widget, rich text widget, enhanced text widget, tinymce widget, visual widget, visual editor widget
5
  Requires at least: 3.2.0
6
  Tested up to: 3.2.1
7
- Stable tag: 0.6.3
8
 
9
  Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
10
 
@@ -34,6 +34,10 @@ This section describes how to install the plugin and get it working.
34
 
35
  == Changelog ==
36
 
 
 
 
 
37
  = 0.6.3 =
38
  * Fixed Javascript issue preventing the plugin working correctly with some browsers
39
 
4
  Tags: wysiwyg, widget, tinymce, editor, rich text, rich text editor, visual editor, wysiwyg editor, tinymce editor, widget editor, html editor, wysiwyg widget, html widget, editor widget, text widget, rich text widget, enhanced text widget, tinymce widget, visual widget, visual editor widget
5
  Requires at least: 3.2.0
6
  Tested up to: 3.2.1
7
+ Stable tag: 0.6.4
8
 
9
  Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
10
 
34
 
35
  == Changelog ==
36
 
37
+ = 0.6.4 =
38
+ * Fixed compatibility issue with "Jetpack / After the Deadline" plugin
39
+ * Optimization of js/css loading
40
+
41
  = 0.6.3 =
42
  * Fixed Javascript issue preventing the plugin working correctly with some browsers
43