Support » Plugin: Gutenberg » support/compatibility for bbcode plugins using add_shortcode()

  • Resolved pgn4web

    (@pgn4web)


    I developed a plugin for wordpress.org that defines a custom bbcode using the add_shortcode() API. So far so good up to wordpress.org 4.9

    I saw the announcements about gutneberg for wordpress.org 5 and I tried my plugin in conjunction with wordpress.org 4.9 and the gutemberg plugin: total fail, my plugin does not work anymore or it does not obviously show how to make it work with the new editor.

    Questions:
    – will wordpress.org 5 guarantee backward compatibility for the add_shortcode() API ?
    – any published guidelines for plugin developers to take into account and prepare their plugins for wordpress.org 5 ?
    – any guidelines/reccomendations for bbcode plugin developers to switch from the add_shortcode() API to something else that will result in a gutenberg block? After all, my plugin takes the bbcode data from the user and creates an iframes showing graphic interactive content derived from that data (and no, it’s a custom developement very unlikely to be in the standard embeds of gutemberg)

    Thanks for helping bbcode plugin developers preparing for the big change!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrew Duthie

    (@aduth)

    It’s expected that shortcodes should continue to work without issues in Gutenberg. A Shortcode block exists which will respect the syntax of any previously supported shortcode in the context of Gutenberg.

    Many users will expect to be able to insert shortcodes into a paragraph block, and this should be supported as well, tracked at the following GitHub issue:

    https://github.com/WordPress/gutenberg/issues/3062

    With some in-progress work here:

    https://github.com/WordPress/gutenberg/pull/3609
    https://github.com/WordPress/gutenberg/pull/3610

    Can you check to see if your shortcode works with the Shortcode block?

    To your other questions:

    any published guidelines for plugin developers to take into account and prepare their plugins for wordpress.org 5 ?

    Related to the first question, since it is the hope that Gutenberg is largely compatible with previous plugin behaviors, there should not be much that a plugin author needs to anticipate. Where breaking changes do occur will certainly be documented as those are introduced.

    any guidelines/reccomendations for bbcode plugin developers to switch from the add_shortcode() API to something else that will result in a gutenberg block?

    This does not yet exist, but I believe it should, as many will find themselves in a similar situation as yourself. While much of what had previously been implemented as shortcodes could serve well as blocks, there should be a clear path for upgrading. The idea of an editable block lends itself to different conventions from a shortcode, so this path is not always 1-to-1; and in fairness, a block introduces new editing capabilities that a plugin author should want to leverage to improve the user experience of modifying a block’s behavior.

    This is covered by the following GitHub issue:

    https://github.com/WordPress/gutenberg/issues/1894

    Thanks for the reply.

    Looking forward to the developments and the new opportunities offered to plugin developers by the block’s behavior.

    With respect to your first question, here is where I got confused because I could not get the gutenberg plugin to work on my test site with wordpress.org 4.9. However the error message I get seems to be completely unrelated to bbcodes and happens on my test environment even after a fresh install of wordpress.org 4.9 and gutenberg. Every time I try to publish an edit from gutenberg I get an “update failed” error with the browser console complaining of error “wordpress/wp-json/wp/v2/posts/10 403 (Forbidden)” from the “load-scripts.php?c=1&…”. Until this is fixed on my test environment I can’t really assess the impact on my bbcode plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘support/compatibility for bbcode plugins using add_shortcode()’ is closed to new replies.