#55435 closed defect (bug) (duplicate)
use_block_editor_for_post_type filter is broken in 5.9.2
| Reported by: | haykuro | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 6.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
https://github.com/WordPress/WordPress/commit/93d4851bbf9175bd62859ae3d42d266dd947b1f8
This commit seems to have broken the use_block_editor_for_post_type filter in WP >= 5.9.
https://github.com/WordPress/WordPress/blob/5.9.2/wp-includes/default-filters.php#L592
Is part of default-filters:
<?php add_action( 'use_block_editor_for_post_type', '_disable_block_editor_for_navigation_post_type', 10, 2 );
But that function _disable_block_editor_for_navigation_post_type is only registered if user is on admin screen.
So, if you're on homepage and try to: apply_filters( 'use_block_editor_for_post_type', true, 'post' ) it will return null and throw a warning:
call_user_func_array() expects parameter 1 to be a valid callback, function '_disable_block_editor_for_navigation_post_type' not found or invalid function name
Change History (4)
This ticket was mentioned in Slack in #slackhelp by haykuro. View the logs.
4 years ago
#3
@
4 years ago
- Resolution → duplicate
- Status reviewing → closed
Duplicate of #54795.
I just noticed there's an existing similar ticket here: https://core.trac.wordpress.org/ticket/54795 (2 months ago)
My apologies if this is a duplicate.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report and welcome to WordPress Trac @haykuro,
Moving for 5.9.3 consideration.