function mathjax_global_settings in MathJax: LaTeX for Drupal 6
Same name and namespace in other branches
- 7.2 mathjax.module \mathjax_global_settings()
- 7 mathjax.module \mathjax_global_settings()
Configure global settings for MathJax.
1 string reference to 'mathjax_global_settings'
- mathjax_menu in ./
mathjax.module - Implements hook_menu().
File
- ./
mathjax.module, line 80 - MathJax module.
Code
function mathjax_global_settings() {
$form['mathjax']['mathjax_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Global switch'),
'#default_value' => variable_get('mathjax_enabled', TRUE),
'#description' => t('Check this box to enable MathJax for the entire site.'),
);
$form['mathjax']['mathjax_use_cdn'] = array(
'#type' => 'checkbox',
'#title' => t('Use MathJax Content Delivery Network (CDN)'),
'#default_value' => variable_get('mathjax_use_cdn', TRUE),
'#description' => t('Check this box to load MathJax source from MathJax servers (recommended).'),
);
$form['mathjax']['active'] = array(
'#type' => 'fieldset',
'#title' => t('Page specific activation settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['mathjax']['active']['mathjax_active_type'] = array(
'#type' => 'radios',
'#title' => t('Enable MathJax on specific pages'),
'#options' => array(
'disable' => 'Enable on every page except the listed pages.',
'enable' => 'Enable on the listed pages only.',
),
'#default_value' => variable_get('mathjax_active_type', 'disable'),
);
$form['mathjax']['active']['mathjax_pages'] = array(
'#type' => 'textarea',
'#title' => t('Pages'),
'#default_value' => variable_get('mathjax_pages', "admin*\nnode/add/*\nnode/*/edit"),
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
'%blog' => 'blog',
'%blog-wildcard' => 'blog/*',
'%front' => '<front>',
)),
);
return system_settings_form($form);
}