Version Description
(2019-01-29) = * Fixed issue that was causing lots of auto-drafts when used in conjunction with WP 5 Block Editor and Page Builder by SiteOrigin
Download this release
Release Info
Developer | marcochiesi |
Plugin | Black Studio TinyMCE Widget |
Version | 2.6.6 |
Comparing to | |
See all releases |
Code changes from version 2.6.5 to 2.6.6
- black-studio-tinymce-widget.php +2 -2
- includes/class-admin.php +8 -0
- includes/class-compatibility-plugins.php +2 -30
- readme.txt +6 -3
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.6.
|
7 |
Author: Black Studio
|
8 |
Author URI: https://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.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.6.6
|
7 |
Author: Black Studio
|
8 |
Author URI: https://www.blackstudio.it
|
9 |
Requires at least: 3.1
|
35 |
* @var string
|
36 |
* @since 2.0.0
|
37 |
*/
|
38 |
+
public static $version = '2.6.6';
|
39 |
|
40 |
/**
|
41 |
* The single instance of the plugin class
|
includes/class-admin.php
CHANGED
@@ -275,7 +275,15 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Admin' ) ) {
|
|
275 |
* @since 2.0.0
|
276 |
*/
|
277 |
public function editor( $text, $editor_id, $name = '', $type = 'visual' ) {
|
|
|
|
|
|
|
|
|
278 |
wp_editor( $text, $editor_id, array( 'textarea_name' => $name, 'default_editor' => $type == 'visual' ? 'tmce' : 'html' ) );
|
|
|
|
|
|
|
|
|
279 |
}
|
280 |
|
281 |
/**
|
275 |
* @since 2.0.0
|
276 |
*/
|
277 |
public function editor( $text, $editor_id, $name = '', $type = 'visual' ) {
|
278 |
+
global $wp_styles;
|
279 |
+
if ( is_a( $wp_styles, 'WP_Styles' ) ) {
|
280 |
+
$wp_styles->remove( 'editor-buttons' );
|
281 |
+
}
|
282 |
wp_editor( $text, $editor_id, array( 'textarea_name' => $name, 'default_editor' => $type == 'visual' ? 'tmce' : 'html' ) );
|
283 |
+
if ( is_a( $wp_styles, 'WP_Styles' ) ) {
|
284 |
+
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
285 |
+
$wp_styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) );
|
286 |
+
}
|
287 |
}
|
288 |
|
289 |
/**
|
includes/class-compatibility-plugins.php
CHANGED
@@ -457,36 +457,8 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
|
|
457 |
* @since 2.0.0
|
458 |
*/
|
459 |
public function siteorigin_panels_enable_pages( $pages ) {
|
460 |
-
$
|
461 |
-
|
462 |
-
$post_id = (int) $_GET['post'];
|
463 |
-
} elseif ( isset( $_POST['post_ID'] ) ) {
|
464 |
-
$post_id = (int) $_POST['post_ID'];
|
465 |
-
} else {
|
466 |
-
$post_id = 0;
|
467 |
-
}
|
468 |
-
if ( $post_id ) {
|
469 |
-
$current_post = get_post( $post_id );
|
470 |
-
} else {
|
471 |
-
$post_type = null;
|
472 |
-
if ( ! isset( $_GET['post_type'] ) ) {
|
473 |
-
$post_type = 'post';
|
474 |
-
} elseif ( in_array( $_GET['post_type'], get_post_types( array( 'show_ui' => true ) ) ) ) {
|
475 |
-
$post_type = $_GET['post_type'];
|
476 |
-
}
|
477 |
-
if ( $post_type ) {
|
478 |
-
$current_post = get_default_post_to_edit( $post_type, true );
|
479 |
-
}
|
480 |
-
}
|
481 |
-
// Set global $post so that it can be processed correctly by SiteOrigin Page Builder
|
482 |
-
global $post;
|
483 |
-
$original_post = $post;
|
484 |
-
$post = $current_post;
|
485 |
-
if ( ! function_exists( 'use_block_editor_for_post' ) || ! use_block_editor_for_post( $post ) ) {
|
486 |
-
$pages[] = 'post-new.php';
|
487 |
-
$pages[] = 'post.php';
|
488 |
-
}
|
489 |
-
$post = $original_post;
|
490 |
if ( isset( $_GET['page'] ) && 'so_panels_home_page' == $_GET['page'] ) {
|
491 |
$pages[] = 'themes.php';
|
492 |
}
|
457 |
* @since 2.0.0
|
458 |
*/
|
459 |
public function siteorigin_panels_enable_pages( $pages ) {
|
460 |
+
$pages[] = 'post-new.php';
|
461 |
+
$pages[] = 'post.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
if ( isset( $_GET['page'] ) && 'so_panels_home_page' == $_GET['page'] ) {
|
463 |
$pages[] = 'themes.php';
|
464 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: widget, visual, editor, wysiwyg, html, text, tinymce, image, media, galler
|
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 5.0
|
7 |
Requires PHP: 5.2
|
8 |
-
Stable tag: 2.6.
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl.html
|
11 |
|
@@ -212,8 +212,11 @@ DELETE FROM wp_usermeta WHERE meta_key LIKE '_bstw%';
|
|
212 |
|
213 |
== Changelog ==
|
214 |
|
|
|
|
|
|
|
215 |
= 2.6.5 (2019-01-09) =
|
216 |
-
* Fixed missing dashicons issue (compatibility with WP 5 Block
|
217 |
|
218 |
= 2.6.4 (2018-11-29) =
|
219 |
* Fixed z-index issue causing newly created widgets to go behind admin menu on small screens
|
@@ -533,6 +536,6 @@ DELETE FROM wp_usermeta WHERE meta_key LIKE '_bstw%';
|
|
533 |
|
534 |
== Upgrade Notice ==
|
535 |
|
536 |
-
= 2.6.
|
537 |
If you're using WPML, double check our FAQ, as version 2.6 introduced some changes regarding widgets translations.
|
538 |
Important: Always ensure to backup your database before upgrading.
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 5.0
|
7 |
Requires PHP: 5.2
|
8 |
+
Stable tag: 2.6.6
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl.html
|
11 |
|
212 |
|
213 |
== Changelog ==
|
214 |
|
215 |
+
= 2.6.6 (2019-01-29) =
|
216 |
+
* Fixed issue that was causing lots of auto-drafts when used in conjunction with WP 5 Block Editor and Page Builder by SiteOrigin
|
217 |
+
|
218 |
= 2.6.5 (2019-01-09) =
|
219 |
+
* Fixed missing dashicons issue (compatibility with WP 5 Block Editor and Page Builder by SiteOrigin)
|
220 |
|
221 |
= 2.6.4 (2018-11-29) =
|
222 |
* Fixed z-index issue causing newly created widgets to go behind admin menu on small screens
|
536 |
|
537 |
== Upgrade Notice ==
|
538 |
|
539 |
+
= 2.6.6 =
|
540 |
If you're using WPML, double check our FAQ, as version 2.6 introduced some changes regarding widgets translations.
|
541 |
Important: Always ensure to backup your database before upgrading.
|