Title: use_block_editor_for_post
Published: December 6, 2018
Last modified: May 20, 2026

---

# use_block_editor_for_post( int|WP_Post $post ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#wp--skip-link--target)

Returns whether the post can be edited in the block editor.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#parameters)󠁿

 `$post`int|[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
required

Post ID or [WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)
object.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#return)󠁿

 bool Whether the post can be edited in the block editor.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#source)󠁿

    ```php
    function use_block_editor_for_post( $post ) {
    	$post = get_post( $post );

    	if ( ! $post ) {
    		return false;
    	}

    	// We're in the meta box loader, so don't use the block editor.
    	if ( is_admin() && isset( $_GET['meta-box-loader'] ) ) {
    		check_admin_referer( 'meta-box-loader', 'meta-box-loader-nonce' );
    		return false;
    	}

    	$use_block_editor = use_block_editor_for_post_type( $post->post_type );

    	/**
    	 * Filters whether a post is able to be edited in the block editor.
    	 *
    	 * @since 5.0.0
    	 *
    	 * @param bool    $use_block_editor Whether the post can be edited or not.
    	 * @param WP_Post $post             The post being checked.
    	 */
    	return apply_filters( 'use_block_editor_for_post', $use_block_editor, $post );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/post.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/post.php#L8552)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/post.php#L8552-L8576)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#hooks)󠁿

 [apply_filters( ‘use_block_editor_for_post’, bool $use_block_editor, WP_Post $post )](https://developer.wordpress.org/reference/hooks/use_block_editor_for_post/)

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

## 󠀁[Related](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#related)󠁿

| Uses | Description | 
| [use_block_editor_for_post_type()](https://developer.wordpress.org/reference/functions/use_block_editor_for_post_type/)`wp-includes/post.php` |

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

  | 
| [check_admin_referer()](https://developer.wordpress.org/reference/functions/check_admin_referer/)`wp-includes/pluggable.php` |

Ensures intent by verifying that a user was referred from another admin page with the correct security nonce.

  | 
| [is_admin()](https://developer.wordpress.org/reference/functions/is_admin/)`wp-includes/load.php` |

Determines whether the current request is for an administrative interface page.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  | 
| [get_post()](https://developer.wordpress.org/reference/functions/get_post/)`wp-includes/post.php` |

Retrieves post data given a post ID or post object.

  |

[Show 3 more](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#)

| Used by | Description | 
| [WP_Screen::get()](https://developer.wordpress.org/reference/classes/wp_screen/get/)`wp-admin/includes/class-wp-screen.php` |

Fetches a screen object.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/use_block_editor_for_post/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.1.0](https://developer.wordpress.org/reference/since/6.1.0/) | Moved to wp-includes from wp-admin. | 
| [5.0.0](https://developer.wordpress.org/reference/since/5.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fuse_block_editor_for_post%2F)
before being able to contribute a note or feedback.