Black Studio TinyMCE Widget - Version 2.2.0

Version Description

(2014-11-18) = * Added filter to hide empty widgets * Added workaround for WordPress Core bug #28403 * Enhanced compatibility for widgets created with 1.x plugin versions * Enhanced compatibility for editor instances used by other plugins * Fixed bug on line breaks being stripped in text mode * Updated translations

Download this release

Release Info

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

Code changes from version 2.1.6 to 2.2.0

black-studio-tinymce-widget.php CHANGED
@@ -3,11 +3,11 @@
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.1.6
7
Author: Black Studio
8
Author URI: http://www.blackstudio.it
9
Requires at least: 3.1
10
- Tested up to: 4.0
11
License: GPLv3
12
Text Domain: black-studio-tinymce-widget
13
Domain Path: /languages
@@ -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.1.6';
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.0
7
Author: Black Studio
8
Author URI: http://www.blackstudio.it
9
Requires at least: 3.1
10
+ Tested up to: 4.1
11
License: GPLv3
12
Text Domain: black-studio-tinymce-widget
13
Domain Path: /languages
35
* @var string
36
* @since 2.0.0
37
*/
38
+ public static $version = '2.2.0';
39
40
/**
41
* The single instance of the plugin class
css/black-studio-tinymce-widget-pre33.min.css CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.bstw-links .icon-plugins{float:right;padding:3px 6px;margin:-8px -8px 0 -2px;background:url(../../../../wp-admin/images/menu.png) -180px -33px no-repeat;width:16px;height:16px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}#mce_fullscreen_container{background-color:#fff}#wp-black-studio-tinymce-widget-wrap{display:none}#TB_overlay,#TB_window{z-index:999999}.wp-editor-container{border-style:solid;border-width:1px;border-collapse:separate;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#ccc #ccc #dfdfdf;clear:both}.wp-switch-editor{height:18px;margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;background-color:#f1f1f1;border-color:#dfdfdf #dfdfdf #ccc;color:#999;position:relative;top:1px}.html-active .switch-html,.tmce-active .switch-tmce{border-color:#ccc #ccc #e9e9e9;background-color:#e9e9e9;color:#333}.wp-media-buttons{cursor:default;padding:8px 8px 0}.wp-media-buttons a{cursor:pointer;padding:0 0 5px 10px}.wp-media-buttons img{vertical-align:middle}.wp_themeSkin .mceStatusbar{border-color:#dfdfdf}
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.bstw-links .icon-plugins{float:right;padding:3px 6px;margin:-8px -8px 0 -2px;background:url(../../../../wp-admin/images/menu.png) -180px -33px no-repeat;width:16px;height:16px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}#mce_fullscreen_container{background-color:#fff}#wp-black-studio-tinymce-widget-wrap{display:none}#TB_overlay,#TB_window{z-index:999999}.wp-editor-container{border-style:solid;border-width:1px;border-collapse:separate;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#ccc #ccc #dfdfdf;clear:both}.wp-switch-editor{height:18px;margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;background-color:#f1f1f1;border-color:#dfdfdf #dfdfdf #ccc;color:#999;position:relative;top:1px}.html-active .switch-html,.tmce-active .switch-tmce{border-color:#ccc #ccc #e9e9e9;background-color:#e9e9e9;color:#333}.wp-media-buttons{cursor:default;padding:8px 8px 0}.wp-media-buttons a{cursor:pointer;padding:0 0 5px 10px}.wp-media-buttons img{vertical-align:middle}.wp_themeSkin .mceStatusbar{border-color:#dfdfdf}
css/black-studio-tinymce-widget.min.css CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.rtl .bstw-links{text-align:left;right:auto;left:18px}.bstw-links .icon16:before{padding:0}.bstw-links .icon16{float:right;padding:3px 6px;margin:-6px -8px 0 -2px}.rtl .bstw-links .icon16{float:left;margin:-6px -2px 0 -8px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}.bstw-loading{position:absolute;left:0;right:0;top:0;bottom:0;background-color:#fff;background-image:url(../../../../wp-admin/images/loading.gif);background-position:center center;background-repeat:no-repeat;z-index:100000;display:none;opacity:.5}#wp-black-studio-tinymce-widget-wrap{display:none}div[id*=black-studio-tinymce] .wp-editor-wrap{margin-bottom:1em}#available-widgets [class*=black-studio-tinymce] .widget-title:before{content:"\f116"}.wp-customizer .mce-floatpanel.mce-popover{z-index:500000!important}div[id*=black-studio-tinymce] .mce-wp-fullscreen{display:none}.ui-dialog.panels-admin-dialog{z-index:100002!important}#TB_overlay,#TB_window{z-index:999999!important}.media-modal{z-index:1000100!important}body.wait,body.wait *{cursor:wait!important}#zedity_content_overlay{z-index:100000!important}.mce-rtl .mce-colorbutton button{padding-right:3px!important;padding-left:3px!important}.mce-rtl .mce-colorbutton .mce-preview{margin:0!important;padding:0!important}
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
.bstw-links{font-size:11px;margin-top:-3px;text-align:right;position:absolute;right:18px}.rtl .bstw-links{text-align:left;right:auto;left:18px}.bstw-links .icon16:before{padding:0}.bstw-links .icon16{float:right;padding:3px 6px;margin:-6px -8px 0 -2px}.rtl .bstw-links .icon16{float:left;margin:-6px -2px 0 -8px}.bstw-links .bstw-links-list{display:none}.bstw-links a{text-decoration:none}.bstw-loading{position:absolute;left:0;right:0;top:0;bottom:0;background-color:#fff;background-image:url(../../../../wp-admin/images/loading.gif);background-position:center center;background-repeat:no-repeat;z-index:100000;display:none;opacity:.5}#wp-black-studio-tinymce-widget-wrap{display:none}div[id*=black-studio-tinymce] .wp-editor-wrap{margin-bottom:1em}#available-widgets [class*=black-studio-tinymce] .widget-title:before{content:"\f116"}.wp-customizer .mce-floatpanel.mce-popover{z-index:500000!important}div[id*=black-studio-tinymce] .mce-wp-fullscreen{display:none}.ui-dialog.panels-admin-dialog{z-index:100002!important}#TB_overlay,#TB_window{z-index:999999!important}.media-modal{z-index:1000100!important}body.wait,body.wait *{cursor:wait!important}#zedity_content_overlay{z-index:100000!important}.mce-rtl .mce-colorbutton button{padding-right:3px!important;padding-left:3px!important}.mce-rtl .mce-colorbutton .mce-preview{margin:0!important;padding:0!important}
includes/class-admin.php CHANGED
@@ -119,8 +119,9 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
119
add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
120
add_action( 'admin_print_styles', array( $this, 'admin_print_styles' ) );
121
add_action( 'admin_print_footer_scripts', array( $this, 'admin_print_footer_scripts' ) );
122
- add_action( 'black_studio_tinymce_editor', array( $this, 'editor' ), 10, 3 );
123
add_action( 'black_studio_tinymce_before_editor', array( $this, 'display_links' ) ); // consider donating if you remove links
124
add_filter( 'wp_editor_settings', array( $this, 'editor_settings' ), 5, 2 );
125
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fix_rtl' ), 10 );
126
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fullscreen' ), 10, 2 );
@@ -266,11 +267,26 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
266
* @param string $text
267
* @param string $editor_id
268
* @param string $name
269
* @return void
270
* @since 2.0.0
271
*/
272
- public function editor( $text, $editor_id, $name = '' ) {
273
- wp_editor( $text, $editor_id, array( 'textarea_name' => $name ) );
274
}
275
276
/**
@@ -283,12 +299,10 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
283
*/
284
public function editor_settings( $settings, $editor_id ) {
285
if ( strstr( $editor_id, 'black-studio-tinymce' ) ) {
286
- $settings['default_editor'] = 'tmce';
287
- $is_base_instance = 'widget-black-studio-tinymce-__i__-text' == $editor_id;
288
$settings['tinymce'] = array(
289
- 'wp_skip_init' => $is_base_instance,
290
'add_unload_trigger' => false,
291
- 'wp_autoresize_on' => false
292
);
293
$settings['editor_height'] = 350;
294
$settings['dfw'] = true;
119
add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
120
add_action( 'admin_print_styles', array( $this, 'admin_print_styles' ) );
121
add_action( 'admin_print_footer_scripts', array( $this, 'admin_print_footer_scripts' ) );
122
add_action( 'black_studio_tinymce_before_editor', array( $this, 'display_links' ) ); // consider donating if you remove links
123
+ add_action( 'black_studio_tinymce_editor', array( $this, 'editor' ), 10, 4 );
124
+ add_action( 'black_studio_tinymce_after_editor', array( $this, 'fix_the_editor_content_filter' ) );
125
add_filter( 'wp_editor_settings', array( $this, 'editor_settings' ), 5, 2 );
126
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fix_rtl' ), 10 );
127
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_fullscreen' ), 10, 2 );
267
* @param string $text
268
* @param string $editor_id
269
* @param string $name
270
+ * @param string $type
271
* @return void
272
* @since 2.0.0
273
*/
274
+ public function editor( $text, $editor_id, $name = '', $type = 'visual' ) {
275
+ wp_editor( $text, $editor_id, array( 'textarea_name' => $name, 'default_editor' => $type == 'visual' ? 'tmce' : 'html' ) );
276
+ }
277
+
278
+ /**
279
+ * Remove editor content filters for multiple editor instances
280
+ * Workaround for WordPress Core bug #28403 https://core.trac.wordpress.org/ticket/28403
281
+ *
282
+ * @uses remove_filter
283
+ *
284
+ * @return void
285
+ * @since 2.1.7
286
+ */
287
+ function fix_the_editor_content_filter() {
288
+ remove_filter( 'the_editor_content', 'wp_htmledit_pre' );
289
+ remove_filter( 'the_editor_content', 'wp_richedit_pre' );
290
}
291
292
/**
299
*/
300
public function editor_settings( $settings, $editor_id ) {
301
if ( strstr( $editor_id, 'black-studio-tinymce' ) ) {
302
$settings['tinymce'] = array(
303
+ 'wp_skip_init' => 'widget-black-studio-tinymce-__i__-text' == $editor_id,
304
'add_unload_trigger' => false,
305
+ 'wp_autoresize_on' => false,
306
);
307
$settings['editor_height'] = 350;
308
$settings['dfw'] = true;
includes/class-compatibility-plugins.php CHANGED
@@ -220,7 +220,6 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
220
add_filter( 'black_studio_tinymce_enable_pages', array( $this, 'siteorigin_panels_enable_pages' ) );
221
add_filter( 'wp_editor_settings', array( $this, 'siteorigin_panels_editor_settings' ), 20, 2 );
222
remove_filter( 'widget_text', array( bstw()->text_filters(), 'wpautop' ), 8 );
223
- add_action( 'black_studio_tinymce_after_editor', array( $this, 'siteorigin_panels_after_editor' ) );
224
}
225
}
226
@@ -313,18 +312,6 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
313
return $settings;
314
}
315
316
- /**
317
- * Remove editor content filters for use within Page Builder (SiteOrigin Panels)
318
- * Workaround for WordPress Core bug #28403 https://core.trac.wordpress.org/ticket/28403
319
- *
320
- * @return void
321
- * @since 2.0.0
322
- */
323
- public function siteorigin_panels_after_editor() {
324
- remove_filter( 'the_editor_content', 'wp_htmledit_pre' );
325
- remove_filter( 'the_editor_content', 'wp_richedit_pre' );
326
- }
327
-
328
/**
329
* Disable old compatibility code provided by Page Builder (SiteOrigin Panels)
330
*
220
add_filter( 'black_studio_tinymce_enable_pages', array( $this, 'siteorigin_panels_enable_pages' ) );
221
add_filter( 'wp_editor_settings', array( $this, 'siteorigin_panels_editor_settings' ), 20, 2 );
222
remove_filter( 'widget_text', array( bstw()->text_filters(), 'wpautop' ), 8 );
223
}
224
}
225
312
return $settings;
313
}
314
315
/**
316
* Disable old compatibility code provided by Page Builder (SiteOrigin Panels)
317
*
includes/class-text-filters.php CHANGED
@@ -132,8 +132,8 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Text_Filters' ) ) {
132
* @since 2.1.0
133
*/
134
public function need_wpautop( $instance ) {
135
- // Widgets created with previous plugin versions do not have the filter parameter set so we base the choice on the type parameter
136
- $need_wpautop = $instance['type'] == 'visual';
137
if ( isset( $instance['filter'] ) ) {
138
$need_wpautop = $instance['filter'] == 1;
139
}
132
* @since 2.1.0
133
*/
134
public function need_wpautop( $instance ) {
135
+ // Widgets created with previous plugin versions do not have the filter parameter set so we base the choice on the type and text fields
136
+ $need_wpautop = $instance['type'] == 'visual' && substr( $instance['text'], 0, 3 ) != '<p>';
137
if ( isset( $instance['filter'] ) ) {
138
$need_wpautop = $instance['filter'] == 1;
139
}
includes/class-widget.php CHANGED
@@ -53,13 +53,16 @@ if ( ! class_exists( 'WP_Widget_Black_Studio_TinyMCE' ) ) {
53
$after_text = apply_filters( 'black_studio_tinymce_after_text', '</div>', $instance );
54
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
55
$text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance, $this );
56
- $output = $before_widget;
57
- if ( ! empty( $title ) ) {
58
- $output .= $before_title . $title . $after_title;
59
}
60
- $output .= $before_text . $text . $after_text;
61
- $output .= $after_widget;
62
- echo $output; // xss ok
63
}
64
65
/**
@@ -110,7 +113,7 @@ if ( ! class_exists( 'WP_Widget_Black_Studio_TinyMCE' ) ) {
110
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'type' => 'visual' ) );
111
// Guess (wpautop) filter value for widgets created with previous version
112
if ( ! isset( $instance['filter'] ) ) {
113
- $instance['filter'] = $instance['type'] == 'visual'? 1 : 0;
114
}
115
$title = strip_tags( $instance['title'] );
116
do_action( 'black_studio_tinymce_before_editor' );
53
$after_text = apply_filters( 'black_studio_tinymce_after_text', '</div>', $instance );
54
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
55
$text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance, $this );
56
+ $hide_empty = apply_filters( 'black_studio_tinymce_hide_empty', false, $instance );
57
+ if ( ! ( $hide_empty && empty( $text ) ) ) {
58
+ $output = $before_widget;
59
+ if ( ! empty( $title ) ) {
60
+ $output .= $before_title . $title . $after_title;
61
+ }
62
+ $output .= $before_text . $text . $after_text;
63
+ $output .= $after_widget;
64
+ echo $output; // xss ok
65
}
66
}
67
68
/**
113
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'type' => 'visual' ) );
114
// Guess (wpautop) filter value for widgets created with previous version
115
if ( ! isset( $instance['filter'] ) ) {
116
+ $instance['filter'] = $instance['type'] == 'visual' && substr( $instance['text'], 0, 3 ) != '<p>' ? 1 : 0;
117
}
118
$title = strip_tags( $instance['title'] );
119
do_action( 'black_studio_tinymce_before_editor' );
js/black-studio-tinymce-widget-pointer.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
jQuery(document).ready(function(a){function b(b){var c=bstw_pointers.pointers[b],d=a.extend(c.options,{close:function(){a.post(ajaxurl,{pointer:c.pointer_id,action:"dismiss-wp-pointer"})}});a(c.target).pointer(d).pointer("open")}b(0)});
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
jQuery(document).ready(function(a){function b(b){var c=bstw_pointers.pointers[b],d=a.extend(c.options,{close:function(){a.post(ajaxurl,{pointer:c.pointer_id,action:"dismiss-wp-pointer"})}});a(c.target).pointer(d).pointer("open")}b(0)});
js/black-studio-tinymce-widget-pre33.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate();try{tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a("div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action").live("click",function(){b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).click(function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})})}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").live("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a("a[id^=widget-black-studio-tinymce][id$=tmce]").live("click",function(){b(a(this)).set_mode("visual")}),a("a[id^=widget-black-studio-tinymce][id$=html]").live("click",function(){b(a(this)).set_mode("html")}),a(".wp-media-buttons a").live("click",function(){edCanvas=b(a(this)).get_textarea().get(),wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(".bstw-links-icon").live("click",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate();try{tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a("div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action").live("click",function(){b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).click(function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})})}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").live("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a("a[id^=widget-black-studio-tinymce][id$=tmce]").live("click",function(){b(a(this)).set_mode("visual")}),a("a[id^=widget-black-studio-tinymce][id$=html]").live("click",function(){b(a(this)).set_mode("html")}),a(".wp-media-buttons a").live("click",function(){edCanvas=b(a(this)).get_textarea().get(),wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(".bstw-links-icon").live("click",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
js/black-studio-tinymce-widget-pre39.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate(),tinyMCEPreInit.mceInit[d]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d].selector="#"+d;try{tinymce.init(tinymce.extend({},tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d])),tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}this.is_tinymce_active()&&"function"==typeof tinymce.get(d).on&&tinymce.get(d).on("keyup change",function(){var b=tinymce.get(d).getContent();a("#"+d).val(b).change()})}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action",function(){if(b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),!a(this).parents("#available-widgets").length){var c,d=parseInt(a("input[name=widget-width]",b(a(this)).get_widget()).val(),10),e=a(window).width(),f=b(a(this)).get_widget().parent().width(),g=parseInt(a("#wpcontent").css("margin-left"),10),h=!("undefined"==typeof isRtl||!isRtl);d+g+30>e&&(c=b(a(this)).get_widget().closest("div.widget-liquid-right").length?h?"margin-right":"margin-left":h?"margin-left":"margin-right",a(b(a(this)).get_widget()).css(c,f-(e-30-g)+"px"))}}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){b(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){b(a(this)).set_mode("html")}),a(document).on("widget-added",function(a,c){c.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),b(c).activate_after_open())}),a(document).on("click",".wp-media-buttons a",function(){window.wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
!function(a){function b(c){var d=null;return"string"==typeof c?d=c:"object"==typeof c&&c instanceof jQuery&&(d=a("textarea[id^=widget-black-studio-tinymce]",c.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(a("#"+d).addClass("mceEditor"),"object"==typeof tinymce&&"function"==typeof tinymce.execCommand){this.deactivate(),tinyMCEPreInit.mceInit[d]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d].selector="#"+d;try{tinymce.init(tinymce.extend({},tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[d])),tinymce.execCommand("mceAddControl",!1,d)}catch(b){window.alert(b)}this.is_tinymce_active()&&"function"==typeof tinymce.get(d).on&&tinymce.get(d).on("keyup change",function(){var b=tinymce.get(d).getContent();a("#"+d).val(b).change()})}return this},deactivate:function(){if("object"==typeof tinymce&&"function"==typeof tinymce.execCommand&&this.is_tinymce_active()){var b=tinymce.get(d).getContent();tinymce.get(d).remove(),a("#"+d).val(b)}return this},activate_after_open:function(){return"visual"===this.get_mode()&&(0===a("div.widget:has(#"+d+") :animated").size()&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_tinymce_active()?this.set_mode("visual"):setTimeout(function(){b(d).activate_after_open()},100)),this},activate_after_ajax:function(){return"visual"===this.get_mode()&&(0===a.active&&!this.is_tinymce_active()&&this.is_textearea_visible()?this.set_mode("visual"):this.is_widget_inside_visible()&&!this.is_tinymce_active()&&setTimeout(function(){b(d).activate_after_ajax()},100)),this},get_widget:function(){return a("#"+d).closest("div.widget")},get_widget_inside:function(){return a("#"+d).closest("div.widget-inside")},get_editor_wrap:function(){return a("#"+d).closest("div.wp-editor-wrap")},get_textarea:function(){return a("#"+d)},get_id:function(){return d},get_tinymce:function(){return tinymce.get(d)},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val()},set_mode:function(b){return"visual"===b&&(this.get_editor_wrap().removeClass("html-active").addClass("tmce-active"),this.activate()),"html"===b&&(this.get_editor_wrap().removeClass("tmce-active").addClass("html-active"),this.deactivate()),a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_widget_inside()).val(b),this},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(d)&&null!==tinymce.get(d)},is_textearea_visible:function(){return a("#"+d).is(":visible")},is_widget_inside_visible:function(){return a(" div.widget-inside:has(#"+d+")").is(":visible")},check_duplicates:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this},fix_css:function(){return this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},set_media_target:function(){return a(".insert-media",this.get_widget()).data("editor",d),this}}}a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] a.widget-action",function(){if(b(a(this)).check_duplicates().fix_css().set_media_target().activate_after_open(),a("input[name=savewidget]",b(a(this)).get_widget()).on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),!a(this).parents("#available-widgets").length){var c,d=parseInt(a("input[name=widget-width]",b(a(this)).get_widget()).val(),10),e=a(window).width(),f=b(a(this)).get_widget().parent().width(),g=parseInt(a("#wpcontent").css("margin-left"),10),h=!("undefined"==typeof isRtl||!isRtl);d+g+30>e&&(c=b(a(this)).get_widget().closest("div.widget-liquid-right").length?h?"margin-right":"margin-left":h?"margin-left":"margin-right",a(b(a(this)).get_widget()).css(c,f-(e-30-g)+"px"))}}),a("div.widget[id*=black-studio-tinymce] input[name=savewidget]").on("click",function(){b(a(this)).is_tinymce_active()&&b(a(this)).deactivate(),a(this).unbind("ajaxSuccess").ajaxSuccess(function(){b(a(this)).activate_after_ajax()})}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){b(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){b(a(this)).set_mode("html")}),a(document).on("widget-added",function(a,c){c.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),b(c).activate_after_open())}),a(document).on("click",".wp-media-buttons a",function(){window.wpActiveEditor=b(a(this)).get_id()}),a("body.widgets_access").size()>0&&b(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate_after_open(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
js/black-studio-tinymce-widget.js CHANGED
@@ -45,7 +45,7 @@ var bstw;
45
tinyMCEPreInit.mceInit[id] = tinyMCEPreInit.mceInit['black-studio-tinymce-widget'];
46
tinyMCEPreInit.mceInit[id].selector = '#' + id;
47
}
48
- if ( ! this.is_tinymce_active() ) {
49
tinyMCEPreInit.mceInit[id].setup = function( ed ) {
50
// Real time preview (Theme customizer)
51
ed.on( 'keyup change', function() {
@@ -69,7 +69,6 @@ var bstw;
69
deactivate: function() {
70
if ( ! $( '#' + id ).hasClass( 'activating' ) ) {
71
if ( this.is_tinymce_active() ) {
72
- this.update_content();
73
tinymce.get( id ).remove();
74
}
75
if ( this.is_tinymce_configured() ) {
45
tinyMCEPreInit.mceInit[id] = tinyMCEPreInit.mceInit['black-studio-tinymce-widget'];
46
tinyMCEPreInit.mceInit[id].selector = '#' + id;
47
}
48
+ if ( ! this.is_tinymce_active() && this.get_mode() === 'visual' ) {
49
tinyMCEPreInit.mceInit[id].setup = function( ed ) {
50
// Real time preview (Theme customizer)
51
ed.on( 'keyup change', function() {
69
deactivate: function() {
70
if ( ! $( '#' + id ).hasClass( 'activating' ) ) {
71
if ( this.is_tinymce_active() ) {
72
tinymce.get( id ).remove();
73
}
74
if ( this.is_tinymce_configured() ) {
js/black-studio-tinymce-widget.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
- var bstw;!function(a){bstw=function(b){var c=null;return"string"==typeof b?c=b:"object"==typeof b&&b instanceof jQuery&&(c=a("textarea[id^=widget-black-studio-tinymce][id$=text]",b.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(!a("#"+c).hasClass("active")&&!a("#"+c).hasClass("activating")){if(a("#"+c).addClass("activating"),this.is_quicktags_configured()||(tinyMCEPreInit.qtInit[c]=tinyMCEPreInit.qtInit["black-studio-tinymce-widget"],tinyMCEPreInit.qtInit[c].id=c),!this.is_quicktags_active()){var b,d;b=QTags.instances,QTags.instances=[],quicktags(tinyMCEPreInit.qtInit[c]),QTags._buttonsInit(),d=QTags.instances[c],QTags.instances=b,QTags.instances[c]=d}this.is_tinymce_configured()||(tinyMCEPreInit.mceInit[c]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[c].selector="#"+c),this.is_tinymce_active()?a("#"+c).addClass("active").removeClass("activating"):(tinyMCEPreInit.mceInit[c].setup=function(b){b.on("keyup change",function(){"visual"===bstw(c).get_mode()&&bstw(c).update_content(),a("#"+c).change()}),a("#"+c).addClass("active").removeClass("activating")},this.go())}return this},deactivate:function(){return a("#"+c).hasClass("activating")||(this.is_tinymce_active()&&(this.update_content(),tinymce.get(c).remove()),this.is_tinymce_configured()&&delete tinyMCEPreInit.mceInit[c],this.is_quicktags_active()&&(a(".quicktags-toolbar",this.get_widget_inside()).remove(),delete QTags.instances[c]),this.is_quicktags_configured()&&delete tinyMCEPreInit.qtInit[c],a("#"+c).removeClass("active")),this},update_content:function(){var a;return"visual"===this.get_mode()?(a=tinymce.get(c).save(),tinyMCEPreInit.mceInit[c].wpautop&&(a=window.switchEditors.pre_wpautop(a)),this.get_textarea().val(a)):this.is_tinymce_active()&&(a=this.get_textarea().val(),tinyMCEPreInit.mceInit[c].wpautop&&(a=window.switchEditors.wpautop(a)),tinymce.get(c).setContent(a)),this},go:function(a){return"undefined"==typeof a&&(a=this.get_mode()),window.switchEditors.go(c,"visual"===a?"tmce":"html"),this},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_container()).val()},set_mode:function(b){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_container()).val(b),this},get_container:function(){return a("#"+c).closest(bstw_data.container_selectors)},get_widget:function(){return a("#"+c).closest("div.widget")},get_widget_inside:function(){return a("#"+c).closest("div.widget-inside")},get_textarea:function(){return a("#"+c)},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(c)&&null!==tinymce.get(c)},is_tinymce_configured:function(){return"undefined"!=typeof tinyMCEPreInit.mceInit[c]},is_quicktags_active:function(){return"object"==typeof QTags.instances[c]},is_quicktags_configured:function(){return"object"==typeof tinyMCEPreInit.qtInit[c]},prepare:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},responsive:function(){if(this.get_widget_inside().is(":visible")){var b,c=parseInt(a("input[name=widget-width]",this.get_widget()).val(),10),d=a(window).width(),e=this.get_widget().parent().width(),f=parseInt(a("#wpcontent").css("margin-left"),10),g=!("undefined"==typeof isRtl||!isRtl);c+f+30>d&&(b=this.get_widget().closest("div.widget-liquid-right").length?g?"margin-right":"margin-left":g?"margin-left":"margin-right",this.get_widget().css(b,e-(d-30-f)+"px"))}return this}}},a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] .widget-action",function(){a(this).parents("#available-widgets").length||(bstw(a(this)).prepare().responsive().activate(),a("input[name=savewidget]",bstw(a(this)).get_widget()).on("click",function(){var b=a(this).closest(".widget").find(".wp-editor-wrap").height();a(this).closest(".widget").find(".wp-editor-wrap").height(b).append('<div class="bstw-loading"></div>'),a(this).closest(".widget").find(".bstw-loading").height(b).show(),bstw(a(this)).update_content()}))}),a(document).on("widget-added",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),bstw(b).activate())}),a(document).on("widget-updated",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),bstw(b).deactivate().activate())}),a(document).on("widget-synced",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),"visual"===bstw(b).get_mode()&&bstw(b).update_content())}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){bstw(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){bstw(a(this)).set_mode("html")}),a(document).on("click.wp-editor",".wp-editor-wrap",function(){this.id&&(window.wpActiveEditor=this.id.slice(3,-5))}),a(document).on("sortstart",function(b,c){var d=["body.wp-customizer .expanded > div[id*=black-studio-tinymce].widget",".widget-liquid-right div[id*=black-studio-tinymce].widget.open"];a(d.join(", ")).filter(":has(.widget-inside:visible)").each(function(){a(".widget-title",this).trigger("click"),bstw(a(this)).deactivate()}),c.item.is("[id*=black-studio-tinymce]")&&bstw(c.item.find("textarea[id^=widget-black-studio-tinymce]")).deactivate()}),a(document).on("sortstop",function(a,b){b.item.is("[id*=black-studio-tinymce]")&&bstw(b.item.find("textarea[id^=widget-black-studio-tinymce]")).activate()}),a(document).on("sortupdate",function(b,c){null!==b&&a(c.item).is(".ui-draggable")||(a("body").addClass("wait"),setTimeout(function(){a("textarea[id^=widget-black-studio-tinymce].active").each(function(){bstw(a(this)).deactivate()}),a("body").removeClass("wait")},1e3))}),"object"==typeof bstw_data.activate_events&&bstw_data.activate_events.length>0&&a(document).on(bstw_data.activate_events.join(" "),function(b){bstw(a(b.target)).activate()}),"object"==typeof bstw_data.deactivate_events&&bstw_data.deactivate_events.length>0&&a(document).on(bstw_data.deactivate_events.join(" "),function(b){bstw(a(b.target)).deactivate()}),a(window).resize(function(){a("textarea[id^=widget-black-studio-tinymce]").each(function(){bstw(a(this)).responsive()})}),a("body.widgets_access").size()>0&&bstw(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate(),a("#qt_widget-black-studio-tinymce-__i__-text_toolbar").remove(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
+ var bstw;!function(a){bstw=function(b){var c=null;return"string"==typeof b?c=b:"object"==typeof b&&b instanceof jQuery&&(c=a("textarea[id^=widget-black-studio-tinymce][id$=text]",b.closest(bstw_data.container_selectors)).attr("id")),{activate:function(){if(!a("#"+c).hasClass("active")&&!a("#"+c).hasClass("activating")){if(a("#"+c).addClass("activating"),this.is_quicktags_configured()||(tinyMCEPreInit.qtInit[c]=tinyMCEPreInit.qtInit["black-studio-tinymce-widget"],tinyMCEPreInit.qtInit[c].id=c),!this.is_quicktags_active()){var b,d;b=QTags.instances,QTags.instances=[],quicktags(tinyMCEPreInit.qtInit[c]),QTags._buttonsInit(),d=QTags.instances[c],QTags.instances=b,QTags.instances[c]=d}this.is_tinymce_configured()||(tinyMCEPreInit.mceInit[c]=tinyMCEPreInit.mceInit["black-studio-tinymce-widget"],tinyMCEPreInit.mceInit[c].selector="#"+c),this.is_tinymce_active()||"visual"!==this.get_mode()?a("#"+c).addClass("active").removeClass("activating"):(tinyMCEPreInit.mceInit[c].setup=function(b){b.on("keyup change",function(){"visual"===bstw(c).get_mode()&&bstw(c).update_content(),a("#"+c).change()}),a("#"+c).addClass("active").removeClass("activating")},this.go())}return this},deactivate:function(){return a("#"+c).hasClass("activating")||(this.is_tinymce_active()&&tinymce.get(c).remove(),this.is_tinymce_configured()&&delete tinyMCEPreInit.mceInit[c],this.is_quicktags_active()&&(a(".quicktags-toolbar",this.get_widget_inside()).remove(),delete QTags.instances[c]),this.is_quicktags_configured()&&delete tinyMCEPreInit.qtInit[c],a("#"+c).removeClass("active")),this},update_content:function(){var a;return"visual"===this.get_mode()?(a=tinymce.get(c).save(),tinyMCEPreInit.mceInit[c].wpautop&&(a=window.switchEditors.pre_wpautop(a)),this.get_textarea().val(a)):this.is_tinymce_active()&&(a=this.get_textarea().val(),tinyMCEPreInit.mceInit[c].wpautop&&(a=window.switchEditors.wpautop(a)),tinymce.get(c).setContent(a)),this},go:function(a){return"undefined"==typeof a&&(a=this.get_mode()),window.switchEditors.go(c,"visual"===a?"tmce":"html"),this},get_mode:function(){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_container()).val()},set_mode:function(b){return a("input[id^=widget-black-studio-tinymce][id$=type]",this.get_container()).val(b),this},get_container:function(){return a("#"+c).closest(bstw_data.container_selectors)},get_widget:function(){return a("#"+c).closest("div.widget")},get_widget_inside:function(){return a("#"+c).closest("div.widget-inside")},get_textarea:function(){return a("#"+c)},is_tinymce_active:function(){return"object"==typeof tinymce&&"object"==typeof tinymce.get(c)&&null!==tinymce.get(c)},is_tinymce_configured:function(){return"undefined"!=typeof tinyMCEPreInit.mceInit[c]},is_quicktags_active:function(){return"object"==typeof QTags.instances[c]},is_quicktags_configured:function(){return"object"==typeof tinyMCEPreInit.qtInit[c]},prepare:function(){return a('[name="'+this.get_textarea().attr("name")+'"]').size()>1&&0===a("div.error",this.get_widget_inside()).length&&this.get_widget_inside().prepend('<div class="error"><strong>'+bstw_data.error_duplicate_id+"</strong></div>"),this.get_widget().css("position","relative").css("z-index","100000"),a("#wpbody-content").css("overflow","visible"),this},responsive:function(){if(this.get_widget_inside().is(":visible")){var b,c=parseInt(a("input[name=widget-width]",this.get_widget()).val(),10),d=a(window).width(),e=this.get_widget().parent().width(),f=parseInt(a("#wpcontent").css("margin-left"),10),g=!("undefined"==typeof isRtl||!isRtl);c+f+30>d&&(b=this.get_widget().closest("div.widget-liquid-right").length?g?"margin-right":"margin-left":g?"margin-left":"margin-right",this.get_widget().css(b,e-(d-30-f)+"px"))}return this}}},a(document).ready(function(){a(document).on("click","div.widget[id*=black-studio-tinymce] .widget-title, div.widget[id*=black-studio-tinymce] .widget-action",function(){a(this).parents("#available-widgets").length||(bstw(a(this)).prepare().responsive().activate(),a("input[name=savewidget]",bstw(a(this)).get_widget()).on("click",function(){var b=a(this).closest(".widget").find(".wp-editor-wrap").height();a(this).closest(".widget").find(".wp-editor-wrap").height(b).append('<div class="bstw-loading"></div>'),a(this).closest(".widget").find(".bstw-loading").height(b).show(),bstw(a(this)).update_content()}))}),a(document).on("widget-added",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),bstw(b).activate())}),a(document).on("widget-updated",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),bstw(b).deactivate().activate())}),a(document).on("widget-synced",function(a,b){b.is("[id*=black-studio-tinymce]")&&(a.preventDefault(),"visual"===bstw(b).get_mode()&&bstw(b).update_content())}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=tmce]",function(){bstw(a(this)).set_mode("visual")}),a(document).on("click","a[id^=widget-black-studio-tinymce][id$=html]",function(){bstw(a(this)).set_mode("html")}),a(document).on("click.wp-editor",".wp-editor-wrap",function(){this.id&&(window.wpActiveEditor=this.id.slice(3,-5))}),a(document).on("sortstart",function(b,c){var d=["body.wp-customizer .expanded > div[id*=black-studio-tinymce].widget",".widget-liquid-right div[id*=black-studio-tinymce].widget.open"];a(d.join(", ")).filter(":has(.widget-inside:visible)").each(function(){a(".widget-title",this).trigger("click"),bstw(a(this)).deactivate()}),c.item.is("[id*=black-studio-tinymce]")&&bstw(c.item.find("textarea[id^=widget-black-studio-tinymce]")).deactivate()}),a(document).on("sortstop",function(a,b){b.item.is("[id*=black-studio-tinymce]")&&bstw(b.item.find("textarea[id^=widget-black-studio-tinymce]")).activate()}),a(document).on("sortupdate",function(b,c){null!==b&&a(c.item).is(".ui-draggable")||(a("body").addClass("wait"),setTimeout(function(){a("textarea[id^=widget-black-studio-tinymce].active").each(function(){bstw(a(this)).deactivate()}),a("body").removeClass("wait")},1e3))}),"object"==typeof bstw_data.activate_events&&bstw_data.activate_events.length>0&&a(document).on(bstw_data.activate_events.join(" "),function(b){bstw(a(b.target)).activate()}),"object"==typeof bstw_data.deactivate_events&&bstw_data.deactivate_events.length>0&&a(document).on(bstw_data.deactivate_events.join(" "),function(b){bstw(a(b.target)).deactivate()}),a(window).resize(function(){a("textarea[id^=widget-black-studio-tinymce]").each(function(){bstw(a(this)).responsive()})}),a("body.widgets_access").size()>0&&bstw(a("textarea[id^=widget-black-studio-tinymce]").attr("id")).activate(),a("#qt_widget-black-studio-tinymce-__i__-text_toolbar").remove(),a(document).on("click",".bstw-links-icon",function(b){b.preventDefault(),a(this).closest(".bstw-links").children(".bstw-links-list").toggle()})})}(jQuery);
js/wp-page-widget.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Black Studio TinyMCE Widget - v2.1.6 */
2
!function(a){a(document).ready(function(){a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget input.widget-control-save",function(){a(this).unbind("ajaxSuccess").ajaxSuccess(function(){a(this).trigger("widget-updated",[bstw(a(this)).get_widget()]).unbind("ajaxSuccess")})}),a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget .widget-title",function(){var b=bstw(a(this)).get_textarea();b.hasClass("active")&&(bstw(a(this)).deactivate(),a(this).trigger("widget-added",[bstw(a(this)).get_widget()]))})})}(jQuery);
1
+ /* Black Studio TinyMCE Widget - v2.2.0 */
2
!function(a){a(document).ready(function(){a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget input.widget-control-save",function(){a(this).unbind("ajaxSuccess").ajaxSuccess(function(){a(this).trigger("widget-updated",[bstw(a(this)).get_widget()]).unbind("ajaxSuccess")})}),a(document).on("click","#pw-sidebars-customize div[id*=black-studio-tinymce].widget .widget-title",function(){var b=bstw(a(this)).get_textarea();b.hasClass("active")&&(bstw(a(this)).deactivate(),a(this).trigger("widget-added",[bstw(a(this)).get_widget()]))})})}(jQuery);
languages/black-studio-tinymce-widget-de_DE.mo CHANGED
Binary file
languages/black-studio-tinymce-widget-de_DE.po CHANGED
@@ -3,13 +3,14 @@
3
# Translators:
4
# Christian Foellmann <foellmann@foe-services.de>, 2014
5
# marcochiesi <marco@blackstudio.it>, 2014
6
msgid ""
7
msgstr ""
8
"Project-Id-Version: Black Studio TinyMCE Widget\n"
9
"Report-Msgid-Bugs-To: https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
10
- "POT-Creation-Date: 2014-10-12 23:55:50+00:00\n"
11
- "PO-Revision-Date: 2014-10-12 23:53+0000\n"
12
- "Last-Translator: marcochiesi <marco@blackstudio.it>\n"
13
"Language-Team: German (Germany) (http://www.transifex.com/projects/p/black-studio-tinymce-widget/language/de_DE/)\n"
14
"MIME-Version: 1.0\n"
15
"Content-Type: text/plain; charset=UTF-8\n"
@@ -28,61 +29,61 @@ msgstr ""
28
29
#. translators: error message shown when multiple instance of the plugin are
30
#. detected
31
- #: black-studio-tinymce-widget.php:260
32
msgid ""
33
"ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
34
"detected. Please activate only one instance at a time."
35
msgstr ""
36
37
#. translators: error message shown when a duplicated widget ID is detected
38
- #: includes/class-admin.php:245
39
msgid ""
40
"ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
41
"new widget with the same content and then delete this one."
42
msgstr "FEHLER: Doppelte Widget-ID gefunden. Um den Verlust von Daten zu verhindern, erstelle ein neues Widget mit dem gleichen Inhalt und lösche das Aktuelle."
43
44
#. translators: text used for plugin home link
45
- #: includes/class-admin.php:319
46
msgid "Home"
47
msgstr "Home"
48
49
#. translators: text used for support faq link
50
- #: includes/class-admin.php:321
51
msgid "FAQ"
52
msgstr "FAQ"
53
54
#. translators: text used for support forum link
55
- #: includes/class-admin.php:323
56
msgid "Support"
57
msgstr "Support"
58
59
#. translators: text used for reviews link
60
- #: includes/class-admin.php:325
61
msgid "Rate"
62
msgstr "Bewerten"
63
64
#. translators: text used for follow on twitter link
65
- #: includes/class-admin.php:327
66
msgid "Follow"
67
msgstr "Folgen"
68
69
#. translators: text used for donation link
70
- #: includes/class-admin.php:329
71
msgid "Donate"
72
msgstr "Spende"
73
74
#. translators: text used for the icon that shows the plugin links
75
- #: includes/class-admin.php:349
76
msgid "About Black Studio TinyMCE Widget plugin"
77
msgstr ""
78
79
- #. translators: text for the dismissable admin pointer tooltip
80
- #: includes/class-admin.php:428
81
- msgid ""
82
- "The Visual Editor widget allows you to insert rich text and media objects in"
83
- " your sidebars"
84
- msgstr ""
85
-
86
#. translators: title of the widget
87
#: includes/class-widget.php:28
88
msgid "Visual Editor"
3
# Translators:
4
# Christian Foellmann <foellmann@foe-services.de>, 2014
5
# marcochiesi <marco@blackstudio.it>, 2014
6
+ # Marcus C. J. Hartmann <marcus.hartmann@mcjh-medien.de>, 2014
7
msgid ""
8
msgstr ""
9
"Project-Id-Version: Black Studio TinyMCE Widget\n"
10
"Report-Msgid-Bugs-To: https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
11
+ "POT-Creation-Date: 2014-11-18 09:48:00+00:00\n"
12
+ "PO-Revision-Date: 2014-10-28 17:01+0000\n"
13
+ "Last-Translator: Marcus C. J. Hartmann <marcus.hartmann@mcjh-medien.de>\n"
14
"Language-Team: German (Germany) (http://www.transifex.com/projects/p/black-studio-tinymce-widget/language/de_DE/)\n"
15
"MIME-Version: 1.0\n"
16
"Content-Type: text/plain; charset=UTF-8\n"
29
30
#. translators: error message shown when multiple instance of the plugin are
31
#. detected
32
+ #: black-studio-tinymce-widget.php:280
33
msgid ""
34
"ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
35
"detected. Please activate only one instance at a time."
36
msgstr ""
37
38
+ #. translators: text for the dismissable admin pointer tooltip
39
+ #: includes/class-admin-pointer.php:168
40
+ msgid ""
41
+ "The Visual Editor widget allows you to insert rich text and media objects in"
42
+ " your sidebars"
43
+ msgstr "Das Widget für optische Beabreitung ermöglicht es dir, Medienobjekte und Texte im .rtf-Format in deine Seitenleisten einzufügen."
44
+
45
#. translators: error message shown when a duplicated widget ID is detected
46
+ #: includes/class-admin.php:247
47
msgid ""
48
"ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
49
"new widget with the same content and then delete this one."
50
msgstr "FEHLER: Doppelte Widget-ID gefunden. Um den Verlust von Daten zu verhindern, erstelle ein neues Widget mit dem gleichen Inhalt und lösche das Aktuelle."
51
52
#. translators: text used for plugin home link
53
+ #: includes/class-admin.php:339
54
msgid "Home"
55
msgstr "Home"
56
57
#. translators: text used for support faq link
58
+ #: includes/class-admin.php:341
59
msgid "FAQ"
60
msgstr "FAQ"
61
62
#. translators: text used for support forum link
63
+ #: includes/class-admin.php:343
64
msgid "Support"
65
msgstr "Support"
66
67
#. translators: text used for reviews link
68
+ #: includes/class-admin.php:345
69
msgid "Rate"
70
msgstr "Bewerten"
71
72
#. translators: text used for follow on twitter link
73
+ #: includes/class-admin.php:347
74
msgid "Follow"
75
msgstr "Folgen"
76
77
#. translators: text used for donation link
78
+ #: includes/class-admin.php:349
79
msgid "Donate"
80
msgstr "Spende"
81
82
#. translators: text used for the icon that shows the plugin links
83
+ #: includes/class-admin.php:369
84
msgid "About Black Studio TinyMCE Widget plugin"
85
msgstr ""
86
87
#. translators: title of the widget
88
#: includes/class-widget.php:28
89
msgid "Visual Editor"
languages/black-studio-tinymce-widget-fr_FR.mo CHANGED
Binary file
languages/black-studio-tinymce-widget-fr_FR.po CHANGED
@@ -7,8 +7,8 @@ msgid ""
7
msgstr ""
8
"Project-Id-Version: Black Studio TinyMCE Widget\n"
9
"Report-Msgid-Bugs-To: https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
10
- "POT-Creation-Date: 2014-10-12 23:55:50+00:00\n"
11
- "PO-Revision-Date: 2014-10-12 23:53+0000\n"
12
"Last-Translator: marcochiesi <marco@blackstudio.it>\n"
13
"Language-Team: French (France) (http://www.transifex.com/projects/p/black-studio-tinymce-widget/language/fr_FR/)\n"
14
"MIME-Version: 1.0\n"
@@ -28,61 +28,61 @@ msgstr ""
28
29
#. translators: error message shown when multiple instance of the plugin are
30
#. detected
31
- #: black-studio-tinymce-widget.php:260
32
msgid ""
33
"ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
34
"detected. Please activate only one instance at a time."
35
msgstr ""
36
37
#. translators: error message shown when a duplicated widget ID is detected
38
- #: includes/class-admin.php:245
39
msgid ""
40
"ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
41
"new widget with the same content and then delete this one."
42
msgstr "ERREUR : ID de widget en double détecté. Pour éviter la perte de votre contenu, veuillez créer un nouveau widget avec le même contenu et supprimez celui-ci."
43
44
#. translators: text used for plugin home link
45
- #: includes/class-admin.php:319
46
msgid "Home"
47
msgstr "Accueil"
48
49
#. translators: text used for support faq link
50
- #: includes/class-admin.php:321
51
msgid "FAQ"
52
msgstr "FAQ"
53
54
#. translators: text used for support forum link
55
- #: includes/class-admin.php:323
56
msgid "Support"
57
msgstr "Aide"
58
59
#. translators: text used for reviews link
60
- #: includes/class-admin.php:325
61
msgid "Rate"
62
msgstr "Avis"
63
64
#. translators: text used for follow on twitter link
65
- #: includes/class-admin.php:327
66
msgid "Follow"
67
msgstr "Suivre"
68
69
#. translators: text used for donation link
70
- #: includes/class-admin.php:329
71
msgid "Donate"
72
msgstr "Don"
73
74
#. translators: text used for the icon that shows the plugin links
75
- #: includes/class-admin.php:349
76
msgid "About Black Studio TinyMCE Widget plugin"
77
msgstr "À propos de l'extension Black Studio TinyMCE Widget"
78
79
- #. translators: text for the dismissable admin pointer tooltip
80
- #: includes/class-admin.php:428
81
- msgid ""
82
- "The Visual Editor widget allows you to insert rich text and media objects in"
83
- " your sidebars"
84
- msgstr ""
85
-
86
#. translators: title of the widget
87
#: includes/class-widget.php:28
88
msgid "Visual Editor"
7
msgstr ""
8
"Project-Id-Version: Black Studio TinyMCE Widget\n"
9
"Report-Msgid-Bugs-To: https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
10
+ "POT-Creation-Date: 2014-11-18 09:48:00+00:00\n"
11
+ "PO-Revision-Date: 2014-10-18 09:21+0000\n"
12
"Last-Translator: marcochiesi <marco@blackstudio.it>\n"
13
"Language-Team: French (France) (http://www.transifex.com/projects/p/black-studio-tinymce-widget/language/fr_FR/)\n"
14
"MIME-Version: 1.0\n"
28
29
#. translators: error message shown when multiple instance of the plugin are
30
#. detected
31
+ #: black-studio-tinymce-widget.php:280
32
msgid ""
33
"ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
34
"detected. Please activate only one instance at a time."
35
msgstr ""
36
37
+ #. translators: text for the dismissable admin pointer tooltip
38
+ #: includes/class-admin-pointer.php:168
39
+ msgid ""
40
+ "The Visual Editor widget allows you to insert rich text and media objects in"
41
+ " your sidebars"
42
+ msgstr ""
43
+
44
#. translators: error message shown when a duplicated widget ID is detected
45
+ #: includes/class-admin.php:247
46
msgid ""
47
"ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
48
"new widget with the same content and then delete this one."
49
msgstr "ERREUR : ID de widget en double détecté. Pour éviter la perte de votre contenu, veuillez créer un nouveau widget avec le même contenu et supprimez celui-ci."
50
51
#. translators: text used for plugin home link
52
+ #: includes/class-admin.php:339
53
msgid "Home"
54
msgstr "Accueil"
55
56
#. translators: text used for support faq link
57
+ #: includes/class-admin.php:341
58
msgid "FAQ"
59
msgstr "FAQ"
60
61
#. translators: text used for support forum link
62
+ #: includes/class-admin.php:343
63
msgid "Support"
64
msgstr "Aide"
65
66
#. translators: text used for reviews link
67
+ #: includes/class-admin.php:345
68
msgid "Rate"
69
msgstr "Avis"
70
71
#. translators: text used for follow on twitter link
72
+ #: includes/class-admin.php:347
73
msgid "Follow"
74
msgstr "Suivre"
75
76
#. translators: text used for donation link
77
+ #: includes/class-admin.php:349
78
msgid "Donate"
79
msgstr "Don"
80
81
#. translators: text used for the icon that shows the plugin links
82
+ #: includes/class-admin.php:369
83
msgid "About Black Studio TinyMCE Widget plugin"
84
msgstr "À propos de l'extension Black Studio TinyMCE Widget"
85
86
#. translators: title of the widget
87
#: includes/class-widget.php:28
88
msgid "Visual Editor"
languages/black-studio-tinymce-widget-pt_BR.mo CHANGED
Binary file
languages/black-studio-tinymce-widget-pt_BR.po CHANGED
@@ -6,8 +6,8 @@ msgid ""
6
msgstr ""
7
"Project-Id-Version: Black Studio TinyMCE Widget\n"
8
"Report-Msgid-Bugs-To: https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
9
- "POT-Creation-Date: 2014-10-12 23:55:50+00:00\n"
10
- "PO-Revision-Date: 2014-10-12 23:53+0000\n"
11
"Last-Translator: marcochiesi <marco@blackstudio.it>\n"
12
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/black-studio-tinymce-widget/language/pt_BR/)\n"
13
"MIME-Version: 1.0\n"
@@ -27,61 +27,61 @@ msgstr ""
27
28
#. translators: error message shown when multiple instance of the plugin are
29
#. detected
30
- #: black-studio-tinymce-widget.php:260
31
msgid ""
32
"ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
33
"detected. Please activate only one instance at a time."
34
msgstr ""
35
36
#. translators: error message shown when a duplicated widget ID is detected
37
- #: includes/class-admin.php:245
38
msgid ""
39
"ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
40
"new widget with the same content and then delete this one."
41
msgstr ""
42
43
#. translators: text used for plugin home link
44
- #: includes/class-admin.php:319
45
msgid "Home"
46
msgstr "Home"
47
48
#. translators: text used for support faq link
49
- #: includes/class-admin.php:321
50
msgid "FAQ"
51
msgstr "FAQ"
52
53
#. translators: text used for support forum link
54
- #: includes/class-admin.php:323
55
msgid "Support"
56
msgstr "Suporte"
57
58
#. translators: text used for reviews link
59
- #: includes/class-admin.php:325
60
msgid "Rate"
61
msgstr "Classificar"
62
63
#. translators: text used for follow on twitter link
64
- #: includes/class-admin.php:327
65
msgid "Follow"
66
msgstr "Seguir"
67
68
#. translators: text used for donation link
69
- #: includes/class-admin.php:329
70
msgid "Donate"
71
msgstr "Doar"
72
73
#. translators: text used for the icon that shows the plugin links
74
- #: includes/class-admin.php:349
75
msgid "About Black Studio TinyMCE Widget plugin"
76
msgstr ""
77
78
- #. translators: text for the dismissable admin pointer tooltip
79
- #: includes/class-admin.php:428
80
- msgid ""
81
- "The Visual Editor widget allows you to insert rich text and media objects in"
82
- " your sidebars"
83
- msgstr ""
84
-
85
#. translators: title of the widget
86
#: includes/class-widget.php:28
87
msgid "Visual Editor"
6
msgstr ""
7
"Project-Id-Version: Black Studio TinyMCE Widget\n"
8
"Report-Msgid-Bugs-To: https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
9
+ "POT-Creation-Date: 2014-11-18 09:48:00+00:00\n"
10
+ "PO-Revision-Date: 2014-10-18 09:21+0000\n"
11
"Last-Translator: marcochiesi <marco@blackstudio.it>\n"
12
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/black-studio-tinymce-widget/language/pt_BR/)\n"
13
"MIME-Version: 1.0\n"
27
28
#. translators: error message shown when multiple instance of the plugin are
29
#. detected
30
+ #: black-studio-tinymce-widget.php:280
31
msgid ""
32
"ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
33
"detected. Please activate only one instance at a time."
34
msgstr ""
35
36
+ #. translators: text for the dismissable admin pointer tooltip
37
+ #: includes/class-admin-pointer.php:168
38
+ msgid ""
39
+ "The Visual Editor widget allows you to insert rich text and media objects in"
40
+ " your sidebars"
41
+ msgstr ""
42
+
43
#. translators: error message shown when a duplicated widget ID is detected
44
+ #: includes/class-admin.php:247
45
msgid ""
46
"ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
47
"new widget with the same content and then delete this one."
48
msgstr ""
49
50
#. translators: text used for plugin home link
51
+ #: includes/class-admin.php:339
52
msgid "Home"
53
msgstr "Home"
54
55
#. translators: text used for support faq link
56
+ #: includes/class-admin.php:341
57
msgid "FAQ"
58
msgstr "FAQ"
59
60
#. translators: text used for support forum link
61
+ #: includes/class-admin.php:343
62
msgid "Support"
63
msgstr "Suporte"
64
65
#. translators: text used for reviews link
66
+ #: includes/class-admin.php:345
67
msgid "Rate"
68
msgstr "Classificar"
69
70
#. translators: text used for follow on twitter link
71
+ #: includes/class-admin.php:347
72
msgid "Follow"
73
msgstr "Seguir"
74
75
#. translators: text used for donation link
76
+ #: includes/class-admin.php:349
77
msgid "Donate"
78
msgstr "Doar"
79
80
#. translators: text used for the icon that shows the plugin links
81
+ #: includes/class-admin.php:369
82
msgid "About Black Studio TinyMCE Widget plugin"
83
msgstr ""
84
85
#. translators: title of the widget
86
#: includes/class-widget.php:28
87
msgid "Visual Editor"
languages/black-studio-tinymce-widget.pot CHANGED
@@ -1,99 +1,99 @@
1
- # Copyright (C) 2014 Black Studio
2
- # This file is distributed under the GPLv3.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Black Studio TinyMCE Widget 2.1.0\n"
6
- "Report-Msgid-Bugs-To: "
7
- "https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
8
- "POT-Creation-Date: 2014-10-13 01:05:52+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=utf-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: Black Studio <info@blackstudio.it>\n"
14
- "Language-Team: Black Studio <info@blackstudio.it>\n"
15
- "X-Generator: grunt-wp-i18n 0.4.8\n"
16
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
- "X-Poedit-Basepath: .\n"
18
- "X-Poedit-Language: English\n"
19
- "X-Poedit-Country: United States\n"
20
- "X-Poedit-SourceCharset: utf-8\n"
21
- "X-Poedit-KeywordsList: "
22
- "__;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_"
23
- "x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
24
- "X-Poedit-Bookmarks: \n"
25
- "X-Poedit-SearchPath-0: .\n"
26
- "X-Textdomain-Support: yes\n"
27
-
28
- #: black-studio-tinymce-widget.php:280
29
- #. translators: error message shown when multiple instance of the plugin are
30
- #. detected
31
- msgid ""
32
- "ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
33
- "detected. Please activate only one instance at a time."
34
- msgstr ""
35
-
36
- #: includes/class-admin-pointer.php:167
37
- #. translators: text for the dismissable admin pointer tooltip
38
- msgid ""
39
- "The Visual Editor widget allows you to insert rich text and media objects "
40
- "in your sidebars"
41
- msgstr ""
42
-
43
- #: includes/class-admin.php:243
44
- #. translators: error message shown when a duplicated widget ID is detected
45
- msgid ""
46
- "ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
47
- "new widget with the same content and then delete this one."
48
- msgstr ""
49
-
50
- #: includes/class-admin.php:315
51
- #. translators: text used for plugin home link
52
- msgid "Home"
53
- msgstr ""
54
-
55
- #: includes/class-admin.php:317
56
- #. translators: text used for support faq link
57
- msgid "FAQ"
58
- msgstr ""
59
-
60
- #: includes/class-admin.php:319
61
- #. translators: text used for support forum link
62
- msgid "Support"
63
- msgstr ""
64
-
65
- #: includes/class-admin.php:321
66
- #. translators: text used for reviews link
67
- msgid "Rate"
68
- msgstr ""
69
-
70
- #: includes/class-admin.php:323
71
- #. translators: text used for follow on twitter link
72
- msgid "Follow"
73
- msgstr ""
74
-
75
- #: includes/class-admin.php:325
76
- #. translators: text used for donation link
77
- msgid "Donate"
78
- msgstr ""
79
-
80
- #: includes/class-admin.php:345
81
- #. translators: text used for the icon that shows the plugin links
82
- msgid "About Black Studio TinyMCE Widget plugin"
83
- msgstr ""
84
-
85
- #: includes/class-widget.php:28
86
- #. translators: title of the widget
87
- msgid "Visual Editor"
88
- msgstr ""
89
-
90
- #: includes/class-widget.php:30
91
- #. translators: description of the widget, shown in available widgets
92
- msgid "Arbitrary text or HTML with visual editor"
93
- msgstr ""
94
-
95
- #. Description of the plugin/theme
96
- msgid ""
97
- "Adds a new \"Visual Editor\" widget type based on the native WordPress "
98
- "TinyMCE editor."
99
msgstr ""
1
+ # Copyright (C) 2014 Black Studio
2
+ # This file is distributed under the GPLv3.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Black Studio TinyMCE Widget 2.2.0\n"
6
+ "Report-Msgid-Bugs-To: "
7
+ "https://github.com/black-studio/black-studio-tinymce-widget/issues\n"
8
+ "POT-Creation-Date: 2014-11-18 09:48:00+00:00\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=utf-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: Black Studio <info@blackstudio.it>\n"
14
+ "Language-Team: Black Studio <info@blackstudio.it>\n"
15
+ "X-Generator: grunt-wp-i18n 0.4.8\n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Poedit-Basepath: .\n"
18
+ "X-Poedit-Language: English\n"
19
+ "X-Poedit-Country: United States\n"
20
+ "X-Poedit-SourceCharset: utf-8\n"
21
+ "X-Poedit-KeywordsList: "
22
+ "__;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_"
23
+ "x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
24
+ "X-Poedit-Bookmarks: \n"
25
+ "X-Poedit-SearchPath-0: .\n"
26
+ "X-Textdomain-Support: yes\n"
27
+
28
+ #: black-studio-tinymce-widget.php:280
29
+ #. translators: error message shown when multiple instance of the plugin are
30
+ #. detected
31
+ msgid ""
32
+ "ERROR: Multiple instances of the Black Studio TinyMCE Widget plugin were "
33
+ "detected. Please activate only one instance at a time."
34
+ msgstr ""
35
+
36
+ #: includes/class-admin-pointer.php:168
37
+ #. translators: text for the dismissable admin pointer tooltip
38
+ msgid ""
39
+ "The Visual Editor widget allows you to insert rich text and media objects "
40
+ "in your sidebars"
41
+ msgstr ""
42
+
43
+ #: includes/class-admin.php:247
44
+ #. translators: error message shown when a duplicated widget ID is detected
45
+ msgid ""
46
+ "ERROR: Duplicate widget ID detected. To avoid content loss, please create a "
47
+ "new widget with the same content and then delete this one."
48
+ msgstr ""
49
+
50
+ #: includes/class-admin.php:339
51
+ #. translators: text used for plugin home link
52
+ msgid "Home"
53
+ msgstr ""
54
+
55
+ #: includes/class-admin.php:341
56
+ #. translators: text used for support faq link
57
+ msgid "FAQ"
58
+ msgstr ""
59
+
60
+ #: includes/class-admin.php:343
61
+ #. translators: text used for support forum link
62
+ msgid "Support"
63
+ msgstr ""
64
+
65
+ #: includes/class-admin.php:345
66
+ #. translators: text used for reviews link
67
+ msgid "Rate"
68
+ msgstr ""
69
+
70
+ #: includes/class-admin.php:347
71
+ #. translators: text used for follow on twitter link
72
+ msgid "Follow"
73
+ msgstr ""
74
+
75
+ #: includes/class-admin.php:349
76
+ #. translators: text used for donation link
77
+ msgid "Donate"
78
+ msgstr ""
79
+
80
+ #: includes/class-admin.php:369
81
+ #. translators: text used for the icon that shows the plugin links
82
+ msgid "About Black Studio TinyMCE Widget plugin"
83
+ msgstr ""
84
+
85
+ #: includes/class-widget.php:28
86
+ #. translators: title of the widget
87
+ msgid "Visual Editor"
88
+ msgstr ""
89
+
90
+ #: includes/class-widget.php:30
91
+ #. translators: description of the widget, shown in available widgets
92
+ msgid "Arbitrary text or HTML with visual editor"
93
+ msgstr ""
94
+
95
+ #. Description of the plugin/theme
96
+ msgid ""
97
+ "Adds a new \"Visual Editor\" widget type based on the native WordPress "
98
+ "TinyMCE editor."
99
msgstr ""
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.1
7
- Stable tag: 2.1.6
8
License: GPLv3
9
License URI: http://www.gnu.org/licenses/gpl.html
10
@@ -141,6 +141,11 @@ add_filter( 'black_studio_tinymce_before_text', '__return_empty_string' );
141
add_filter( 'black_studio_tinymce_after_text', '__return_empty_string' );
142
`
143
144
= How to customize widget contents (using hooks) =
145
146
You may alter widget title and text via code using the `widget_title` and `widget_text` filter hooks (see [Codex](http://codex.wordpress.org/Plugin_API/Filter_Reference#Widgets) for details).
@@ -173,6 +178,14 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
173
174
== Changelog ==
175
176
= 2.1.6 (2014-10-23) =
177
* Fixed bug on line breaks being changed on editor load
178
* Improved TinyMCE editor stuff loading
@@ -383,5 +396,5 @@ Plugin's data is stored in serialized format inside a record in the `wp_options`
383
384
== Upgrade Notice ==
385
386
- = 2.1.6 =
387
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.1
7
+ Stable tag: 2.2.0
8
License: GPLv3
9
License URI: http://www.gnu.org/licenses/gpl.html
10
141
add_filter( 'black_studio_tinymce_after_text', '__return_empty_string' );
142
`
143
144
+ There's also an additional hook, that you may use to specify to not display widgets if their content is empty:
145
+ `
146
+ add_filter( 'black_studio_tinymce_hide_empty', '__return_true' );
147
+ `
148
+
149
= How to customize widget contents (using hooks) =
150
151
You may alter widget title and text via code using the `widget_title` and `widget_text` filter hooks (see [Codex](http://codex.wordpress.org/Plugin_API/Filter_Reference#Widgets) for details).
178
179
== Changelog ==
180
181
+ = 2.2.0 (2014-11-18) =
182
+ * Added filter to hide empty widgets
183
+ * Added workaround for WordPress Core bug #28403
184
+ * Enhanced compatibility for widgets created with 1.x plugin versions
185
+ * Enhanced compatibility for editor instances used by other plugins
186
+ * Fixed bug on line breaks being stripped in text mode
187
+ * Updated translations
188
+
189
= 2.1.6 (2014-10-23) =
190
* Fixed bug on line breaks being changed on editor load
191
* Improved TinyMCE editor stuff loading
396
397
== Upgrade Notice ==
398
399
+ = 2.2.0 =
400
Version 2.x is a major update. If you are upgrading from version 1.x please ensure to backup your database before upgrading.