function fontyourface_settings_form in @font-your-face 7
Same name and namespace in other branches
- 6.2 fontyourface.module \fontyourface_settings_form()
- 6 fontyourface.module \fontyourface_settings_form()
Creates settings form.
5 string references to 'fontyourface_settings_form'
- fontdeck_form_alter in modules/
fontdeck/ fontdeck.module - Implements hook_form_alter().
- fonts_com_form_alter in modules/
fonts_com/ fonts_com.module - Implements hook_form_alter().
- fontyourface_menu in ./
fontyourface.module - Implements hook_menu().
- local_fonts_form_alter in modules/
local_fonts/ local_fonts.module - Implements hook_form_alter().
- typekit_api_form_alter in modules/
typekit_api/ typekit_api.module - Implements hook_form_alter().
File
- ./
fontyourface.module, line 427
Code
function fontyourface_settings_form($form, &$form_state) {
$form = array(
'header' => array(
'#markup' => '<div> ' . l(t('Apply fonts under appearance'), 'admin/appearance/fontyourface') . '.</div>',
),
'providers' => array(
'#type' => 'fieldset',
'#title' => 'Providers',
),
'logging' => array(
'#type' => 'fieldset',
'#title' => 'Logging',
'detailed_logs' => array(
'#type' => 'checkbox',
'#default_value' => variable_get('fontyourface_detailed_logging', FALSE),
'#title' => t('Keep detailed watchdog logs'),
'#description' => t("Don't leave this on when testing is complete. It will make everything run a bit slower."),
),
'update' => array(
'#type' => 'submit',
'#value' => t('Change logging settings'),
),
),
);
foreach (module_implements('fontyourface_info') as $module) {
$info_function = $module . '_fontyourface_info';
$provider = $info_function();
$count = db_query("SELECT COUNT(fid) AS total FROM {fontyourface_font} WHERE provider = :provider", array(
':provider' => $module,
))
->fetchObject();
$form['providers'][$module . '_import'] = array(
'#prefix' => '<div>',
'#suffix' => '</div>',
'count' => array(
'#type' => 'item',
'#markup' => t('@provider is enabled with @count fonts.', array(
'@provider' => $provider['name'],
'@count' => $count->total,
)) . ' ',
),
'import' => array(
'#type' => 'submit',
'#value' => 'Import ' . $provider['name'],
),
);
}
// foreach
return $form;
}