PluginProbe
SureDonation – Donation Forms, Fundraising Campaigns & Donor Management / 1.5.1
SureDonation – Donation Forms, Fundraising Campaigns & Donor Management v1.5.1
1.6.1 1.6.0 1.5.1 1.5.0 1.4.0 1.3.0 trunk 0.0.1 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0
suredonation / inc / campaign-templates / templates / education / template.php

template.php in SureDonation – Donation Forms, Fundraising Campaigns & Donor Management 1.5.1, at inc/campaign-templates/templates/education/template.php

34 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * "School / Education" campaign template. Goal by number of supporters.
4 *
5 * @package SureDonation
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 return [
13 'id' => 'education',
14 'name' => __( 'School / Education', 'suredonation' ),
15 'category' => __( 'Education', 'suredonation' ),
16 'description' => __( 'Fund a school project, club, or scholarship drive.', 'suredonation' ),
17 /* translators: [School] is a literal placeholder the site owner replaces after creating the campaign; keep it as-is. */
18 'campaign_title' => __( 'Support [School] students', 'suredonation' ),
19 'campaign_description' => __( 'Explain the project and rally supporters to hit the goal together.', 'suredonation' ),
20 'goal_type' => 'donation_count',
21 'goal_amount' => 500,
22 'get_form_blocks' => static function () {
23 return \SureDonation\Inc\Campaign_Templates\Campaign_Templates::build_form_blocks(
24 [
25 'amounts' => [ 20, 50, 100 ],
26 'button_text' => __( 'Support', 'suredonation' ),
27 ]
28 );
29 },
30 'get_page_blocks' => static function ( $ctx ) {
31 return \SureDonation\Inc\Campaigns\Campaign_Page::get_default_layout( (int) ( $ctx['campaign_id'] ?? 0 ) );
32 },
33 ];
34