PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.19.6
GiveWP – Donation Plugin and Fundraising Platform v2.19.6
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / MultiFormGoals / MultiFormGoal / Block.php
Block.php
41 lines 754 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\MultiFormGoals\MultiFormGoal;
4
5 use Give\MultiFormGoals\MultiFormGoal\Model as MultiFormGoal;
6
7 class Block
8 {
9
10 /**
11 * Registers Multi-Form Goal block
12 *
13 * @since 2.9.0
14 **/
15 public function addBlock()
16 {
17 register_block_type(
18 'give/multi-form-goal',
19 [
20 'render_callback' => [$this, 'renderCallback'],
21 ]
22 );
23 }
24
25 /**
26 * Returns Progress Bar block markup
27 *
28 * @since 2.9.0
29 **/
30 public function renderCallback($attributes, $content)
31 {
32 $multiFormGoal = new MultiFormGoal(
33 [
34 'innerBlocks' => $content,
35 ]
36 );
37
38 return $multiFormGoal->getOutput();
39 }
40 }
41