PluginProbe
Cooked – Recipe Management / 1.9.5
Cooked – Recipe Management v1.9.5
1.16.1 1.16.0 1.15.0 trunk 1.10.0 1.11.0 1.11.1 1.11.2 1.11.3 1.11.4 1.12.0 1.13.0 1.14.0 1.7.10 1.7.11 1.7.12 1.7.13 1.7.15.1 1.7.15.3 1.7.15.4 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 All 37 releases
cooked / includes / class.cooked-gutenberg.php

class.cooked-gutenberg.php in Cooked – Recipe Management 1.9.5, at includes/class.cooked-gutenberg.php

34 lines 731 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Cooked Gutenberg Functions
4 *
5 * @package Cooked
6 * @subpackage Gutenberg Functions
7 * @since 1.0.0
8 */
9
10 // Exit if accessed directly
11 if ( ! defined( 'ABSPATH' ) ) exit;
12
13 /**
14 * Cooked_Gutenberg Class
15 *
16 * This class handles the Cooked Recipe Meta Box creation.
17 *
18 * @since 1.0.0
19 */
20 class Cooked_Gutenberg {
21
22 public function __construct() {
23 add_filter( 'use_block_editor_for_post_type', [&$this, 'gutenberg_support'], 10, 2 );
24 add_filter( 'gutenberg_can_edit_post_type', [&$this, 'gutenberg_support'], 10, 2 );
25 }
26
27 public function gutenberg_support( $can_edit, $post_type ) {
28 if ( $post_type == 'cp_recipe' )
29 return false;
30
31 return $can_edit;
32 }
33
34 }