use_block_editor_for_post WordPress Filter Hook

The use_block_editor_for_post Wordpress hook allows you to programmatically determine whether the block editor should be used for a given post. This can be useful for making sure that certain content is always edited in the classic editor, or for conditionally displaying different editor interfaces based on the post type or other factors.

apply_filters( 'use_block_editor_for_post', bool $use_block_editor, WP_Post $post ) #

Filters whether a post is able to be edited in the block editor.


Parameters

$use_block_editor

(bool)Whether the post can be edited or not.

$post

(WP_Post)The post being checked.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More