[wp-trac] [WordPress Trac] #45207: Meta-box compatibility warnings

WordPress Trac noreply at wordpress.org
Mon Oct 29 03:46:30 UTC 2018


#45207: Meta-box compatibility warnings
--------------------------------+-----------------------
 Reporter:  johnjamesjacoby     |       Owner:  pento
     Type:  defect (bug)        |      Status:  assigned
 Priority:  normal              |   Milestone:  5.0
Component:  Options, Meta APIs  |     Version:  5.0
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:
--------------------------------+-----------------------
Changes (by pento):

 * owner:  (none) => pento
 * status:  new => assigned


Comment:

 Thanks for the feedback, everyone. There are a couple of bugs here that
 are causing the message to appear when it shouldn't.

 - Obviously, it shouldn't be appearing on any other page in the admin,
 except for the classic editor.
 - It should be assuming that meta boxes are compatible with the block
 editor, unless they're flagged as being incompatible.

 Here's the correct behaviour:
 - If `__back_compat_meta_box` and `__block_editor_compatible_meta_box` are
 undefined, don't show the message.
 - If `__back_compat_meta_box` is `true`, don't show the message, as the
 plugin author has flagged that this meta box shouldn't be rendered in the
 block editor, it just exists for rendering in the classic editor.
 - If `__back_compat_meta_box` is `false`, don't show the message, as the
 plugin author has flagged that this meta box should be rendered in the
 block editor, and is presumably not the cause of the classic editor
 interface being loaded.
 - If `__block_editor_compatible_meta_box` is `true`, don't show the
 message, as the plugin author has confirmed that this meta box is
 confirmed to work in the block editor.
 - If `__back_compat_meta_box`  is `false` or undefined, and
 `__block_editor_compatible_meta_box` is `false`, show the message, as the
 plugin author has confirmed that this meta box doesn't work in the block
 editor, and there isn't some other UI implemented for the block editor.

 This message is currently hidden behind the `WP_DEBUG` flag, to show
 plugin authors what it looks like. However, the message is ultimately
 intended for end users, to inform that that a particular meta box (coming
 from whichever plugin defined it) has caused a fall back to the classic
 editor interface.

 Obviously, I don't really expect any plugins to define the the flags in
 such a way that the message shows up in their release version. 🙂 Future
 versions of WordPress will remove the `WP_DEBUG` check, and potentially
 draw on compatibility data from w.org to decide if a meta box is actually
 compatible with the block editor. This will naturally come with plenty of
 warnings and lead time to give plugin authors the opportunity to update
 their plugins, if needed.

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


More information about the wp-trac mailing list