Black Studio TinyMCE Widget - Version 2.6.5

Version Description

(2019-01-09) = * Fixed missing dashicons issue (compatibility with WP 5 Block editor and Page Builder by SiteOrigin)

Download this release

Release Info

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

Code changes from version 2.6.4 to 2.6.5

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.4
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.4';
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.5
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.5';
39
40
/**
41
* The single instance of the plugin class
includes/class-compatibility-plugins.php CHANGED
@@ -457,8 +457,36 @@ if ( ! class_exists( 'Black_Studio_TinyMCE_Compatibility_Plugins' ) ) {
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
}
457
* @since 2.0.0
458
*/
459
public function siteorigin_panels_enable_pages( $pages ) {
460
+ $current_post = null;
461
+ if ( isset( $_GET['post'] ) ) {
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
}
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.4
9
License: GPLv3
10
License URI: https://www.gnu.org/licenses/gpl.html
11
@@ -212,6 +212,9 @@ DELETE FROM wp_usermeta WHERE meta_key LIKE '_bstw%';
212
213
== Changelog ==
214
215
= 2.6.4 (2018-11-29) =
216
* Fixed z-index issue causing newly created widgets to go behind admin menu on small screens
217
@@ -530,6 +533,6 @@ DELETE FROM wp_usermeta WHERE meta_key LIKE '_bstw%';
530
531
== Upgrade Notice ==
532
533
- = 2.6.4 =
534
If you're using WPML, double check our FAQ, as version 2.6 introduced some changes regarding widgets translations.
535
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.5
9
License: GPLv3
10
License URI: https://www.gnu.org/licenses/gpl.html
11
212
213
== Changelog ==
214
215
+ = 2.6.5 (2019-01-09) =
216
+ * Fixed missing dashicons issue (compatibility with WP 5 Block editor and Page Builder by SiteOrigin)
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
220
533
534
== Upgrade Notice ==
535
536
+ = 2.6.5 =
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.