[wp-trac] [WordPress Trac] #52363: use_block_editor_for_post() does not check if post supports editor
WordPress Trac
noreply at wordpress.org
Wed Feb 17 00:27:37 UTC 2021
#52363: use_block_editor_for_post() does not check if post supports editor
--------------------------+-----------------------------
Reporter: gudmdharalds | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Editor | Version: 5.6
Severity: normal | Resolution: wontfix
Keywords: | Focuses: administration
--------------------------+-----------------------------
Changes (by peterwilsoncc):
* keywords: has-patch =>
* status: assigned => closed
* resolution: => wontfix
* milestone: 5.7 =>
Comment:
Replying to [comment:2 anand.au14]:
> So in my opinion current patch will add a redundant check.
>
> Using {{{add_filter( 'use_block_editor_for_post', '__return_true' );}}}
is like overriding the correct decision already take by WordPress to use
block editor or not. This hook should be used to enabled block editor for
specific post types which are needed.
I agree, the use of the `use_block_editor_for_post` filter in this manner
is a developer error and overriding the correct decision made by WordPress
already.
I'm going to close this as wontfix as bypassing the filter for post types
that don't support the block-editor could break sites using API
middleware.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52363#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list