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

WordPress Trac noreply at wordpress.org
Mon Oct 29 03:47:09 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         |   Keywords:  needs-patch
  Focuses:                 |
---------------------------+-------------------------
 The [https://wordpress.org/gutenberg/handbook/extensibility/meta-box/
 block editor handbook] allows plugins to trigger a post/post type to fall
 back to the classic editor by setting the callback argument:

 {{{#!php
 <?php
 add_meta_box(
   'classic-only-meta-box',
   'Classic editor only meta box',
   'my_meta_box_callback',
   null,
   'normal',
   'high',
    array(
      '__block_editor_compatible_meta_box' => false, // Fallback to classic
 editor.
    )
 );
 }}}

 Support for this should be introduced to core as part of the merge.

 The Gutenberg feature plugin used a JavaScript redirect to determine if
 the fallback should be applied due to numerous edge cases, the most likely
 to be hit being not all `add_meta_box()` calls will have run before
 `use_block_editor_for_post()`.

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


More information about the wp-trac mailing list