WordPress.org

Ready to get started?Download WordPress

Forums

WP Page Widget
[resolved] Incompatibility with Black Studio TinyMCE widget (4 posts)

  1. Marco Chiesi
    Member
    Posted 1 year ago #

    Hi there,
    I am the author of the Black Studio TinyMCE plugin. An user reported a compatibility issue between my plugin and yours. Please see the original post for further info (I also wrote a temporary patch there).

    It seems the problem is generated by code on WP Page Widgets which calls some Black Studio TinyMCE functions, but it causes problems in some admin pages.

    I found 2 different issues:
    1. The function pw_admin_head should be hooked to admin_init and not to admin_head.
    2. On edit-tags.php page, it is necessary to check for the presence action=edit parameter in the url, to distinguish the taxonomy editing mode from the listing mode (in the latter the action parameter is not set).

    By the way, I believe it would be better to perform those operations on the Black Studio TinyMCE side, because the initialization code of the plugin may change in the future, and it's easier to maintain it on my side. In the last months I already added some compatibility code for WP Page Widgets on my plugin, but it was only for posts & pages. I may extend it, and include also taxonomies and search/front page. In that case you should remove your pw_admin_head function.

    Please let me know if you have any comments about this issue.
    Thanks.

    http://wordpress.org/extend/plugins/wp-page-widget/

  2. Metalscorpion
    Member
    Posted 1 year ago #

    Hello Marco Chiesi!

    We accept remove the pw_admin_head function in next revision, and then the code check compatibility will in your Black Studio TinyMCE plugin.
    Today, I upgraded both plugins to latest version. Remove pw_admin_head function in our plugin. Replace the compatibility check case in Black Studio TinyMCE plugin, line 118:
    // Compatibility for WP Page Widget plugin
    if (is_plugin_active('wp-page-widget/wp-page-widgets.php') && ( $pagenow == "post-new.php" || $pagenow == "post.php" )) {
    $load_editor = true;
    }

    by:
    // Compatibility for WP Page Widget plugin
    if (is_plugin_active('wp-page-widgets/wp-page-widgets.php') && ( in_array($pagenow, array('post-new.php', 'post.php')) || (($pagenow == 'edit-tags.php') && isset($_GET['action']) && $_GET['action'] == 'edit') || ( in_array($pagenow, array('admin.php')) && (($_GET['page'] == 'pw-front-page') || ($_GET['page'] == 'pw-search-page')) )) ) {
    $load_editor = true;
    }

    Then both plugins are Great Works on everywhere! So we should change the code in both plugins by this way.

    How do you think?

    Cho - CodeAndMore

  3. Marco Chiesi
    Member
    Posted 1 year ago #

    Thank you Metalscorpion. I will include this change in the next release.

  4. Marco Chiesi
    Member
    Posted 1 year ago #

    Sorry for the delay. I finally released a new version (1.2.0) of Black Studio TinyMCE Widget, which contains the new code and fixes the incompatibility. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.