Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: use_block_editor_for_post_type

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
2164
2165      /**
2166       * Filter whether a post is able to be edited in the block editor.
2167       *
2168       * @since 5.0.0
2169       *
2170       * @param bool   $use_block_editor  Whether the post type can be edited or not. Default true.
2171       * @param string $post_type         The post type being checked.
2172       */
2173      return apply_filters( 'use_block_editor_for_post_type', true, $post_type );
2174 }
2175
2176 /**
2177  * Returns all the block categories that will be shown in the block editor.
2178  *
2179  * @since 5.0.0
2180  *
2181  * @param WP_Post $post Post object.
2182  * @return array[] Array of block categories.