Black Studio TinyMCE Widget - Version 2.2.11

Version Description

(2016-08-19) = * Fixed compatibility issue with Polylang in Customizer

Download this release

Release Info

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

Code changes from version 2.2.10 to 2.2.11

black-studio-tinymce-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Black Studio TinyMCE Widget
4
  Plugin URI: https://wordpress.org/plugins/black-studio-tinymce-widget/
5
  Description: Adds a new "Visual Editor" widget type based on the native WordPress TinyMCE editor.
6
- Version: 2.2.10
7
  Author: Black Studio
8
  Author URI: http://www.blackstudio.it
9
  Requires at least: 3.1
@@ -35,7 +35,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Plugin' ) ) {
35
  * @var string
36
  * @since 2.0.0
37
  */
38
- public static $version = '2.2.10';
39
 
40
  /**
41
  * The single instance of the plugin class
3
  Plugin Name: Black Studio TinyMCE Widget
4
  Plugin URI: https://wordpress.org/plugins/black-studio-tinymce-widget/
5
  Description: Adds a new "Visual Editor" widget type based on the native WordPress TinyMCE editor.
6
+ Version: 2.2.11
7
  Author: Black Studio
8
  Author URI: http://www.blackstudio.it
9
  Requires at least: 3.1
35
  * @var string
36
  * @since 2.0.0
37
  */
38
+ public static $version = '2.2.11';
39
 
40
  /**
41
  * The single instance of the plugin class
includes/class-compatibility-plugins.php CHANGED
@@ -78,6 +78,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
78
  /**
79
  * Add widget text to WPML String translation
80
  *
 
81
  * @uses icl_register_string() Part of WPML
82
  *
83
  * @param mixed[] $instance
@@ -86,9 +87,11 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
86
  * @since 2.0.0
87
  */
88
  public function wpml_widget_update( $instance, $widget ) {
89
- if ( function_exists( 'icl_register_string' ) && ! empty( $widget->number ) ) {
90
- if ( ! isset( $instance['panels_info'] ) ) { // Avoid translation of Page Builder (SiteOrigin panels) widgets
91
- icl_register_string( 'Widgets', 'widget body - ' . $widget->id_base . '-' . $widget->number, $instance['text'] );
 
 
92
  }
93
  }
94
  return $instance;
@@ -97,6 +100,7 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
97
  /**
98
  * Translate widget text
99
  *
 
100
  * @uses icl_t() Part of WPML
101
  *
102
  * @param string $text
@@ -106,10 +110,13 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
106
  * @since 2.0.0
107
  */
108
  public function wpml_widget_text( $text, $instance = null, $widget = null ) {
109
- if ( bstw()->check_widget( $widget ) && ! empty( $instance ) ) {
110
- if ( function_exists( 'icl_t' ) ) {
111
- if ( ! isset( $instance['panels_info'] ) ) { // Avoid translation of Page Builder (SiteOrigin panels) widgets
112
- $text = icl_t( 'Widgets', 'widget body - ' . $widget->id_base . '-' . $widget->number, $text );
 
 
 
113
  }
114
  }
115
  }
78
  /**
79
  * Add widget text to WPML String translation
80
  *
81
+ * @uses is_plugin_active()
82
  * @uses icl_register_string() Part of WPML
83
  *
84
  * @param mixed[] $instance
87
  * @since 2.0.0
88
  */
89
  public function wpml_widget_update( $instance, $widget ) {
90
+ if( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) && ! is_plugin_active( 'wpml-widgets/wpml-widgets.php' ) ) {
91
+ if ( function_exists( 'icl_register_string' ) && ! empty( $widget->number ) ) {
92
+ if ( ! isset( $instance['panels_info'] ) ) { // Avoid translation of Page Builder (SiteOrigin panels) widgets
93
+ icl_register_string( 'Widgets', 'widget body - ' . $widget->id_base . '-' . $widget->number, $instance['text'] );
94
+ }
95
  }
96
  }
97
  return $instance;
100
  /**
101
  * Translate widget text
102
  *
103
+ * @uses is_plugin_active()
104
  * @uses icl_t() Part of WPML
105
  *
106
  * @param string $text
110
  * @since 2.0.0
111
  */
112
  public function wpml_widget_text( $text, $instance = null, $widget = null ) {
113
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
114
+ if( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
115
+ if ( bstw()->check_widget( $widget ) && ! empty( $instance ) ) {
116
+ if ( function_exists( 'icl_t' ) ) {
117
+ if ( ! isset( $instance['panels_info'] ) ) { // Avoid translation of Page Builder (SiteOrigin panels) widgets
118
+ $text = icl_t( 'Widgets', 'widget body - ' . $widget->id_base . '-' . $widget->number, $text );
119
+ }
120
  }
121
  }
122
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.blackstudio.it/en/wordpress-plugins/black-studio-tinymce
4
  Tags: wysiwyg, widget, tinymce, editor, image, media, 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, image widget, media widget
5
  Requires at least: 3.1
6
  Tested up to: 4.5
7
- Stable tag: 2.2.10
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
@@ -180,6 +180,9 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
180
 
181
  == Changelog ==
182
 
 
 
 
183
  = 2.2.10 (2016-06-08) =
184
  * Fixed menubar transparency issue with Page Builder + TinyMCE Advanced
185
 
@@ -442,5 +445,5 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
442
 
443
  == Upgrade Notice ==
444
 
445
- = 2.2.10 =
446
  Version 2.x is a major update. If you are upgrading from version 1.x please ensure to backup your database before upgrading.
4
  Tags: wysiwyg, widget, tinymce, editor, image, media, 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, image widget, media widget
5
  Requires at least: 3.1
6
  Tested up to: 4.5
7
+ Stable tag: 2.2.11
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
180
 
181
  == Changelog ==
182
 
183
+ = 2.2.11 (2016-08-19) =
184
+ * Fixed compatibility issue with Polylang in Customizer
185
+
186
  = 2.2.10 (2016-06-08) =
187
  * Fixed menubar transparency issue with Page Builder + TinyMCE Advanced
188
 
445
 
446
  == Upgrade Notice ==
447
 
448
+ = 2.2.11 =
449
  Version 2.x is a major update. If you are upgrading from version 1.x please ensure to backup your database before upgrading.