[wp-trac] [WordPress Trac] #51819: use_block_editor_for_post() not avaialble by front end

WordPress Trac noreply at wordpress.org
Fri May 20 16:18:08 UTC 2022

#51819: use_block_editor_for_post() not avaialble by front end
 Reporter:  theMikeD           |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Editor             |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:

Comment (by ethitter):

 I'm involved in a project that is converting sites to use the Gutenberg
 editor. In several cases, we need to check at `init` if a particular post
 type is Gutenberg-enabled so that we can disable classic metaboxes and
 other functionality that we've re-implemented in Gutenberg components, but
 that is also still in use on non-Gutenberg post types. It's not possible
 to wait until a later action because these checks often must interact with
 plugins that we ourselves do not maintain, and which perform their setup
 at the `init` action. Ideally, `use_block_editor_for_post()` and
 `use_block_editor_for_post_type()` would be available at that point, which
 would be possible by moving them to `wp-includes`. Neither function
 depends on other functions that are available only in `wp-admin` (other
 than `use_block_editor_for_post()` relying on
 `use_block_editor_for_post_type()`), so moving them to `wp-includes` seems
 both feasible and beneficial.

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

More information about the wp-trac mailing list