Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit efb5c2592abccb20692310c804011e40af4cc842
Author: Angela McMahon <[email protected]>
Date:   Tue Oct 17 09:46:02 2017 -0500

    INTERIM-140 Added fallback for sites without token_filter

commit 77ff0e1
Author: Angela McMahon <[email protected]>
Date:   Mon Oct 16 16:30:42 2017 -0500

    INTERIM-140 Added token replacement capability to suitcase_interim_block text format
  • Loading branch information
angelamnr committed Oct 17, 2017
1 parent 4b901e2 commit 1f9c4b3
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions theme-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,24 @@ function suitcase_interim_config_form_submit($form, &$form_state) {
if (module_exists('block')) {

if (!filter_format_exists('suitcase_interim_block')) {
$suitcase_interim_block_format = array(
'format' => 'suitcase_interim_block',
'name' => 'Suitcase Interim Block',
);
if (module_exists('token_filter')) {
$suitcase_interim_block_format = array(
'format' => 'suitcase_interim_block',
'name' => 'Suitcase Interim Block',
'filters' => array(
'filter_tokens' => array(
'weight' => 0,
'status' => 1,
),
),
);
}
else {
$suitcase_interim_block_format = array(
'format' => 'suitcase_interim_block',
'name' => 'Suitcase Interim Block',
);
}
$suitcase_interim_block_format = (object) $suitcase_interim_block_format;
filter_format_save($suitcase_interim_block_format);
}
Expand Down

0 comments on commit 1f9c4b3

Please sign in to comment.