JavaScript for WordPress Forums Gutenberg Development What will be the accepted method to determine in PHP which editor will be used?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #56016
    Jayce53
    Participant

    I have a plugin that hooks into the classic editor in a whole heap of ways so I’ll have to create and maintain separate code for Gutenberg and keep the existing code for those who won’t use Gutenberg. In WP 4.9.8, the post editor (admin/post.php or admin/post-new.php) is called with a query parameter of “classic-editor” if the classic editor is to be used.

    Any idea if this is something we can rely on in future releases to determine which editor is going to be used?

    #56336
    Zac Gordon
    Keymaster

    I am not sure if this specifically, but check out the source code for the Gutenberg Ramp Plugin. It does testing and turning on and off of Gutenberg and is built by Automattic so should serve as a good example for how to do on your own.

    Also look at how the Classic Editor plugin does it too 👍🏼

    #56338
    Zac Gordon
    Keymaster

    I am not sure if this specifically, but check out the source code for the Gutenberg Ramp Plugin. It does testing and turning on and off of Gutenberg and is built by Automattic so should serve as a good example for how to do on your own.

    Also look at how the Classic Editor plugin does it too 👍🏼

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.