Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: use_block_editor_for_post

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2160
2161      /**
2162       * Filters whether a post is able to be edited in the block editor.
2163       *
2164       * @since 5.0.0
2165       *
2166       * @param bool    $use_block_editor Whether the post can be edited or not.
2167       * @param WP_Post $post             The post being checked.
2168       */
2169      return apply_filters( 'use_block_editor_for_post', $use_block_editor, $post );
2170 }
2171
2172 /**
2173  * Returns whether a post type is compatible with the block editor.
2174  *
2175  * The block editor depends on the REST API, and if the post type is not shown in the
2176  * REST API, then it won't work with the block editor.
2177  *
2178  * @since 5.0.0