Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 52
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Recipe Block.
4 *
5 * @since 11.1
6 *
7 * @package automattic/jetpack
8 */
9
10use Automattic\Jetpack\Blocks;
11
12if ( ! defined( 'ABSPATH' ) ) {
13    exit( 0 );
14}
15
16add_action(
17    'init',
18    function () {
19        Blocks::jetpack_register_block(
20            __DIR__,
21            array(
22                'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render' ),
23            )
24        );
25
26        Blocks::jetpack_register_block(
27            'jetpack/recipe-details',
28            array(
29                'parent' => array( 'jetpack/recipe' ),
30            )
31        );
32
33        Blocks::jetpack_register_block(
34            'jetpack/recipe-hero',
35            array(
36                'parent'          => array( 'jetpack/recipe' ),
37                'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render_hero' ),
38            )
39        );
40
41        Blocks::jetpack_register_block(
42            'jetpack/recipe-ingredients-list',
43            array(
44                'parent' => array( 'jetpack/recipe' ),
45            )
46        );
47
48        Blocks::jetpack_register_block(
49            'jetpack/recipe-ingredient-item',
50            array(
51                'parent' => array( 'jetpack/recipe' ),
52            )
53        );
54
55        Blocks::jetpack_register_block(
56            'jetpack/recipe-steps',
57            array(
58                'parent' => array( 'jetpack/recipe' ),
59            )
60        );
61
62        Blocks::jetpack_register_block(
63            'jetpack/recipe-step',
64            array(
65                'parent'          => array( 'jetpack/recipe' ),
66                'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render_step' ),
67            )
68        );
69    }
70);
71
72require_once __DIR__ . '/class-jetpack-recipe-block.php';