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
2126
2127      /**
2128       * Filter whether a post is able to be edited in the block editor.
2129       *
2130       * @since 5.0.0
2131       *
2132       * @param bool   $use_block_editor  Whether the post type can be edited or not. Default true.
2133       * @param string $post_type         The post type being checked.
2134       */
2135      return apply_filters( 'use_block_editor_for_post_type', true, $post_type );
2136 }
2137
2138 /**
2139  * Returns all the block categories that will be shown in the block editor.
2140  *
2141  * @since 5.0.0
2142  *
2143  * @param WP_Post $post Post object.
2144  * @return array Array of block categories.