[wp-trac] [WordPress Trac] #45217: Allow falling back to classic editor via meta box registration.

WordPress Trac noreply at wordpress.org
Thu Nov 1 00:47:49 UTC 2018


#45217: Allow falling back to classic editor via meta box registration.
------------------------------------------------+---------------------
 Reporter:  peterwilsoncc                       |       Owner:  (none)
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  5.0
Component:  Editor                              |     Version:
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch ux-feedback needs-design  |     Focuses:
------------------------------------------------+---------------------
Changes (by pento):

 * keywords:  has-patch => has-patch ux-feedback needs-design


Comment:

 Thanks for the patch, @peterwilsoncc! This is a good start, I think we can
 use this as the base for making the experience better.

 `use_block_editor_with_meta_boxes()` will be called before
 `register_and_do_post_meta_boxes()` runs, so there are likely to be a
 bunch of meta boxes that won't be registered at this point. Rather than
 having inconsistent redirect behaviour depending upon when a plugin
 registers a meta box, I wonder if we can do the following:

 In `do_meta_boxes()`, we currently don't show a meta box in the block
 editor if it has the `__block_editor_compatible_meta_box` set to `false`,
 the meta box is just skipped. Instead, we could show a placeholder for
 that meta box that asks the author if they want to use the classic
 interface to edit this post.

 When they click on the button, we can store a flag saying that meta box X,
 generated by Plugin Y, version Z, registered to Post Types A, B, and C
 isn't compatible, and the author chose to use classic instead. For future
 loads of those post types, if that plugin (at that version) is active,
 assume that they still want to use classic, and
 `use_block_editor_for_post_type()` could return `false`.

 In the classic interface, we can then show a similar message in the meta
 box, mentioning that they're using classic for this meta box, and do they
 want to go back to the block editor?

 @karmatosed: How does this flow sound to you?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45217#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list