Commit 8b98ecf1 authored by Michael Iseard's avatar Michael Iseard
Browse files

Fix defaults for campaign

parent a44c00d4
......@@ -97,24 +97,24 @@ class Settings {
'type' => 'string',
'show_in_rest' => true,
],
'theme_colors' => [
'type' => 'object',
'show_in_rest' => [
'theme_colors' => [
'type' => 'object',
'default' => [
'primary' => '#ff9f1c',
'secondary' => '#2ec4b6',
],
'show_in_rest' => [
'schema' => [
'type' => 'object',
'type' => 'object',
'properties' => [
'primary' => [
'type' => 'string'
'primary' => [
'type' => 'string',
],
'secondary' => [
'type' => 'string'
'type' => 'string',
],
]
]
],
'default' => [
'primary' => '#ff9f1c',
'secondary' => '#2ec4b6'
],
],
]
],
'address_enabled' => [
......@@ -173,7 +173,7 @@ class Settings {
'show_in_rest' => true,
'default' => false,
],
'disable_object_cache' => [
'disable_object_cache' => [
'type' => 'boolean',
'show_in_rest' => true,
'default' => false,
......@@ -193,10 +193,10 @@ class Settings {
'type' => 'string',
],
'campaign_goal' => [
'type' => 'string'
'type' => 'string',
],
'show_progress' => [
'type' => 'boolean'
'type' => 'boolean',
],
'modal_title' => [
'type' => 'string',
......@@ -226,6 +226,20 @@ class Settings {
],
],
],
'default' => [
0 => [
'id' => 'default',
'name' => 'Default',
'modal_title' => __( 'Support us!', 'kudos-donations' ),
'welcome_text' => __( 'Your support is greatly appreciated and will help to keep us going.',
'kudos-donations' ),
'address_required' => true,
'amount_type' => 'both',
'fixed_amounts' => '1,5,20,50',
'donation_type' => 'both',
'protected' => true,
],
],
'sanitize_callback' => [ new Campaigns(), 'sanitize_campaigns' ],
],
]
......@@ -291,9 +305,6 @@ class Settings {
}
}
$campaigns = new Campaigns();
$campaigns->add_default();
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment