/** * Disabling the Gutenberg editor all post types except post. * * @param bool $can_edit Whether to use the Gutenberg editor. * @param string $post_type Name of WordPress post type. * @return bool $can_edit */ function gutenberg_can_edit_post_type_83744857( $can_edit, $post_type ) { $gutenberg_supported_types = array( 'post' ); if ( ! in_array( $post_type, $gutenberg_supported_types, true ) ) { $can_edit = false; } return $can_edit; } add_filter( 'gutenberg_can_edit_post_type', 'gutenberg_can_edit_post_type_83744857', 10, 2 );
Recent Comments