-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #6122: Allow themes to have config folders.
By @docwilmot, @quicksketch, @klonos, @kiamlaluno, and @yorkshire-pudding.
- Loading branch information
Showing
7 changed files
with
91 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.../modules/simpletest/tests/themes/test_theme_config/config/test_theme_config.settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"_config_name": "test_theme_config.settings", | ||
"test_theme_checkbox_one": true, | ||
"test_theme_checkbox_two": false, | ||
"test_theme_textfield": "Default field value" | ||
} |
6 changes: 6 additions & 0 deletions
6
core/modules/simpletest/tests/themes/test_theme_config/test_theme_config.info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name = Test theme config | ||
description = Theme for testing the theme default configuration | ||
version = BACKDROP_VERSION | ||
backdrop = 1.x | ||
type = theme | ||
hidden = TRUE |
21 changes: 21 additions & 0 deletions
21
core/modules/simpletest/tests/themes/test_theme_config/theme-settings.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Theme settings file for the test_theme_config theme. | ||
*/ | ||
|
||
$form['test_theme_checkbox_one'] = array( | ||
'#type' => 'checkbox', | ||
'#title' => 'Test theme checkbox one', | ||
'#default_value' => theme_get_setting('test_theme_checkbox_one', 'test_theme_config'), | ||
); | ||
$form['test_theme_checkbox_two'] = array( | ||
'#type' => 'checkbox', | ||
'#title' => 'Test theme checkbox two', | ||
'#default_value' => theme_get_setting('test_theme_checkbox_two', 'test_theme_config'), | ||
); | ||
$form['test_theme_textfield'] = array( | ||
'#type' => 'textfield', | ||
'#title' => 'Test theme textfield', | ||
'#default_value' => theme_get_setting('test_theme_textfield', 'test_theme_config'), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d186fd1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to: backdrop/backdrop-issues#6122