You are here

function blocktheme_admin_settings in Block Theme 7

Same name and namespace in other branches
  1. 5 blocktheme.module \blocktheme_admin_settings()
  2. 6 blocktheme.module \blocktheme_admin_settings()

Block Theme settings page.

1 string reference to 'blocktheme_admin_settings'
blocktheme_menu in ./blocktheme.module
Implements hook_menu().

File

./blocktheme.module, line 48
Provides a configuration option to select custom themes for blocks

Code

function blocktheme_admin_settings() {
  $form = array();
  $form['blocktheme_themes'] = array(
    '#type' => 'textarea',
    '#default_value' => variable_get('blocktheme_themes', ''),
    '#title' => t('Custom Block Templates'),
    '#description' => t('Enter one value per row in the form: <em>customtemplate|Friendly Name</em>, where "customtemplate" corresponds to a tpl file called <em>block--blocktheme--customtemplate.tpl.php</em> as well as to the value of an extra variable <em>$blocktheme</em> in the block template.'),
    '#wysiwyg' => FALSE,
  );
  $form['blocktheme_show_custom_block_theme'] = array(
    '#type' => 'checkbox',
    '#default_value' => variable_get('blocktheme_show_custom_block_theme', ''),
    '#title' => t('Show Custom Block Theme'),
    '#description' => t('Show the custom block theme used for a block in the <a href="@block-admin-page">block admin page</a>.', array(
      '@block-admin-page' => url('admin/build/block'),
    )),
  );
  $form['#submit'][] = 'blocktheme_admin_settings_submit';
  return system_settings_form($form);
}