app
1 year ago
app.tsx
1 year ago
block.json
1 year ago
edit.tsx
1 year ago
icon.jsx
1 year ago
index.tsx
1 year ago
render.php
1 year ago
utils.ts
1 year ago
render.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | use Give\Campaigns\Models\Campaign; |
| 4 | use Give\Campaigns\Repositories\CampaignRepository; |
| 5 | |
| 6 | /** |
| 7 | * @var array $attributes |
| 8 | * @var Campaign $campaign |
| 9 | */ |
| 10 | |
| 11 | if ( |
| 12 | ! isset($attributes['campaignId']) |
| 13 | || ! $campaign = give(CampaignRepository::class)->getById($attributes['campaignId']) |
| 14 | ) { |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | ?> |
| 19 | |
| 20 | <div <?= get_block_wrapper_attributes() ?>> |
| 21 | <div data-givewp-campaign-goal data-id="<?= $campaign->id ?>"></div> |
| 22 | </div> |
| 23 |