[wp-trac] [WordPress Trac] #46195: is_block_editor() returns false in the block editor
WordPress Trac
noreply at wordpress.org
Wed Mar 6 22:25:35 UTC 2019
#46195: is_block_editor() returns false in the block editor
-------------------------------------+-----------------------------
Reporter: Chouby | Owner: desrosj
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.1.1
Component: Editor | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: administration
-------------------------------------+-----------------------------
Comment (by aduth):
Does the assignment need to account for the `replace_editor` filter? Prior
to this most recent patch, if a plugin applied a filter to
`replace_editor`, then `is_block_editor` would be `false` even if
`use_block_editor_for_post` were `true`.
It seems awfully non-conventional, but I wondered if there might be an
option to assign `WP_Screen::is_block_editor` prior to
`set_current_screen` being called. Pseudo-code:
https://gist.github.com/aduth/6459c96ffbb03f458af1a051473da817
>When edit-form-advanced.php and edit-form-blocks.php are included,
is_block_editor is updated to ensure it is the correct value.
It doesn't appear the patch includes changes to `edit-form-blocks.php`?
I'm trying to follow the explanations provided, but it still seems like
it's accounting for a lack of confidence in the accuracy of the
`WP_Screen::get()` implementation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46195#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list