Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
8b98ecf1
Commit
8b98ecf1
authored
Feb 05, 2021
by
Michael Iseard
Browse files
Fix defaults for campaign
parent
a44c00d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Helpers/Settings.php
View file @
8b98ecf1
...
...
@@ -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
();
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment