PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | extensions/blocks/recipe/recipe.php +52 -43 12.0.3 → 16.3-a.1 View file →
@@ -8,56 +8,65 @@
8 8 */
9 9
10 10 use Automattic\Jetpack\Blocks;
11 11
12 -Blocks::jetpack_register_block(
13 - 'jetpack/recipe',
14 - array(
15 - 'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render' ),
16 - )
17 -);
12 +if ( ! defined( 'ABSPATH' ) ) {
13 + exit( 0 );
14 +}
18 15
19 -Blocks::jetpack_register_block(
20 - 'jetpack/recipe-details',
21 - array(
22 - 'parent' => array( 'jetpack/recipe' ),
23 - )
24 -);
16 +add_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 25
26 -Blocks::jetpack_register_block(
27 - 'jetpack/recipe-hero',
28 - array(
29 - 'parent' => array( 'jetpack/recipe' ),
30 - 'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render_hero' ),
31 - )
32 -);
26 + Blocks::jetpack_register_block(
27 + 'jetpack/recipe-details',
28 + array(
29 + 'parent' => array( 'jetpack/recipe' ),
30 + )
31 + );
33 32
34 -Blocks::jetpack_register_block(
35 - 'jetpack/recipe-ingredients-list',
36 - array(
37 - 'parent' => array( 'jetpack/recipe' ),
38 - )
39 -);
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 40
41 -Blocks::jetpack_register_block(
42 - 'jetpack/recipe-ingredient-item',
43 - array(
44 - 'parent' => array( 'jetpack/recipe' ),
45 - )
46 -);
41 + Blocks::jetpack_register_block(
42 + 'jetpack/recipe-ingredients-list',
43 + array(
44 + 'parent' => array( 'jetpack/recipe' ),
45 + )
46 + );
47 47
48 -Blocks::jetpack_register_block(
49 - 'jetpack/recipe-steps',
50 - array(
51 - 'parent' => array( 'jetpack/recipe' ),
52 - )
53 -);
48 + Blocks::jetpack_register_block(
49 + 'jetpack/recipe-ingredient-item',
50 + array(
51 + 'parent' => array( 'jetpack/recipe' ),
52 + )
53 + );
54 54
55 -Blocks::jetpack_register_block(
56 - 'jetpack/recipe-step',
57 - array(
58 - 'parent' => array( 'jetpack/recipe' ),
59 - 'render_callback' => array( 'Automattic\\Jetpack\\Extensions\\Recipe\\Jetpack_Recipe_Block', 'render_step' ),
60 - )
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 + }
61 70 );
62 71
63 72 require_once __DIR__ . '/class-jetpack-recipe-block.php';