use_block_editor_for_post_type( string $post_type )

Returns whether a post type is compatible with the block editor.


Description

The block editor depends on the REST API, and if the post type is not shown in the REST API, then it won’t work with the block editor.


Parameters

$post_type

(Required) The post type.


Return

(bool) Whether the post type can be edited with the block editor.


Source

File: wp-includes/post.php

function use_block_editor_for_post_type( $post_type ) {
	if ( class_exists( 'WP_Compat' ) ) {
		WP_Compat::using_block_function();
	}
	return false;
}

Changelog

Changelog
Version Description
6.1.0 Moved to wp-includes from wp-admin.
5.0.0 Introduced.