function webform_variable_get in Webform 7.3
Same name and namespace in other branches
- 5.2 webform.module \webform_variable_get()
- 6.3 webform.module \webform_variable_get()
- 6.2 webform.module \webform_variable_get()
- 7.4 webform.module \webform_variable_get()
Retreive a Drupal variable with the appropriate default value.
21 calls to webform_variable_get()
- theme_webform_admin_content in includes/
webform.admin.inc - Generate a list of all webforms avaliable on this site.
- webform_admin_settings in includes/
webform.admin.inc - Menu callback for admin/config/content/webform.
- webform_admin_type_list in includes/
webform.admin.inc - Create a comma-separate list of content types that are webform enabled.
- webform_block_info in ./
webform.module - Implements hook_block_info().
- webform_check_record in ./
webform.module - Utility function to check if a webform record is necessary in the database.
File
- ./
webform.module, line 3225 - This module provides a simple way to create forms and questionnaires.
Code
function webform_variable_get($variable) {
switch ($variable) {
case 'webform_allowed_tags':
$result = variable_get('webform_allowed_tags', array(
'a',
'em',
'strong',
'code',
'img',
));
break;
case 'webform_default_from_name':
$result = variable_get('webform_default_from_name', variable_get('site_name', ''));
break;
case 'webform_default_from_address':
$result = variable_get('webform_default_from_address', variable_get('site_mail', ini_get('sendmail_from')));
break;
case 'webform_default_subject':
$result = variable_get('webform_default_subject', t('Form submission from: %title'));
break;
case 'webform_node_types':
$result = variable_get('webform_node_types', array(
'webform',
));
break;
case 'webform_node_types_primary':
$result = variable_get('webform_node_types_primary', array(
'webform',
));
break;
}
return $result;
}