[wp-trac] [WordPress Trac] #46195: is_block_editor() returns false in the block editor
WordPress Trac
noreply at wordpress.org
Fri Mar 1 21:35:02 UTC 2019
#46195: is_block_editor() returns false in the block editor
-------------------------------------+-----------------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.1.1
Component: Editor | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: administration
-------------------------------------+-----------------------------
Comment (by desrosj):
After giving it a bit more thought, I think including the changes in
[attachment:"46195.2.diff"] makes sense. This would catch:
- A situation where someone loads `wp-admin/edit-form-blocks.php` on their
own.
- Establish the default value for the post type in the current screen
early.
- The block editor can still be switched with `use_block_editor_for_post`
for new posts after the post is created.
The downfall of both these approaches, though, is that the support
indicated when `current_screen` is fired and later on in the process that
value could be different. This can be avoided by using the blanket
`use_block_editor_for_post_type` filter whenever possible (not filtering
dependent on data specific to an existing post).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46195#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list