function blockcache_alter_admin_settings in Block Cache Alter 7
Same name and namespace in other branches
- 6 blockcache_alter.module \blockcache_alter_admin_settings()
Menu callback, settings page for blockcache alter
1 string reference to 'blockcache_alter_admin_settings'
- blockcache_alter_menu in ./
blockcache_alter.module - Implementation of hook_menu().
File
- ./
blockcache_alter.module, line 33 - Block cache alter module.
Code
function blockcache_alter_admin_settings() {
$status = _blockcache_alter_core_patch();
$form['bca_corepatch'] = array(
'#type' => 'checkbox',
'#title' => t('Core patch ?'),
'#description' => t('Check this box if you applied the core patch that comes with this module. This will extend the caching settings fieldset on the block configuration page. Note: if you did not apply the patch but check the box, the additional functionality simply won\'t work at all.<br /><strong>Current status: you have @status applied a blockcache alter patch.</strong>', array(
'@status' => $status,
)),
'#default_value' => variable_get('bca_corepatch', 0),
);
$form['bca_debug'] = array(
'#type' => 'checkbox',
'#title' => t('Show debug information ?'),
'#description' => t('Debug info: shows helpful debugging whenever blocks are rendered, whether they are pulled form cache or not, and when block caches are refreshed.'),
'#default_value' => variable_get('bca_debug', 0),
'#states' => array(
'visible' => array(
':input[name="bca_corepatch"]' => array(
'checked' => TRUE,
),
),
),
);
$form['bca_user1'] = array(
'#type' => 'checkbox',
'#title' => t('Cache blocks for user 1 (uid 1) ?'),
'#description' => t('This enables block caching for the primary Drupal user (uid 1). Can lead to unexpected results on production websites!'),
'#default_value' => variable_get('bca_user1', 0),
'#states' => array(
'visible' => array(
':input[name="bca_corepatch"]' => array(
'checked' => TRUE,
),
),
),
);
return system_settings_form($form);
}