# cooked/1.11.4/includes/class.cooked-gutenberg.php

Cooked – Recipe Management, version 1.11.4. 34 lines.

- Page: https://pluginprobe.com/plugins/cooked/1.11.4/code/includes/class.cooked-gutenberg.php
- Raw: https://pluginprobe.com/plugins/cooked/1.11.4/raw/includes/class.cooked-gutenberg.php
- Modified: 2025-06-06T16:39:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cooked/1.11.4/code/includes/class.cooked-gutenberg.php#L10-L20`.

```php
<?php
/**
 * Cooked Gutenberg Functions
 *
 * @package     Cooked
 * @subpackage  Gutenberg Functions
 * @since       1.0.0
*/

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Cooked_Gutenberg Class
 *
 * This class handles the Cooked Recipe Meta Box creation.
 *
 * @since 1.0.0
 */
class Cooked_Gutenberg {

    public function __construct() {
        add_filter( 'use_block_editor_for_post_type', [&$this, 'gutenberg_support'], 10, 2 );
        add_filter( 'gutenberg_can_edit_post_type', [&$this, 'gutenberg_support'], 10, 2 );
    }

    public function gutenberg_support( $can_edit, $post_type ) {
        if ( $post_type == 'cp_recipe' )
            return false;

        return $can_edit;
    }

}
```
