function hfs_header_settings_form in Header and Footer Scripts 7
Administrative settings.
Return value
Add styles and scripts in header.
1 string reference to 'hfs_header_settings_form'
- hfs_menu in ./
hfs.module - Implements hook_menu().
File
- ./
hfs.admin.inc, line 16 - Administrative page code for the Header Footer Script module.
Code
function hfs_header_settings_form($form, &$form_state) {
$header_section = variable_get('hfs_header_scripts');
$form['hfs_header'] = array(
'#type' => 'fieldset',
'#title' => t('Add Scripts and Styles in Header'),
'#description' => t('All the defined scripts and styles in this section would be added under the <strong>head</strong> tag.'),
);
$form['hfs_header']['styles'] = array(
'#type' => 'textarea',
'#title' => t('Header Styles'),
'#default_value' => isset($header_section['styles']) ? $header_section['styles'] : '',
'#description' => t('<p>You can add multiple <strong>stylesheets</strong> here with multiple ways, For example: </p><p>1. <link type="text/css" rel="stylesheet" href="http://www.example.com/style.css" media="all" /></p><p> 2. <link type="text/css" rel="stylesheet" href="/style.css" media="all" /></p><p> 3. <style>#header { color: grey; }</style></p>'),
'#rows' => 10,
);
$form['hfs_header']['scripts'] = array(
'#type' => 'textarea',
'#title' => t('Header Scripts'),
'#default_value' => isset($header_section['scripts']) ? $header_section['scripts'] : '',
'#description' => t('<p>You can add multiple <strong>scripts</strong> here with multiple ways, For example: </p><p>1. <script type="text/javascript" src="http://www.example.com/script.js"></script></p><p> 2. <script type="text/javascript" src="/script.js"></script></p><p> 3. <script type="text/javascript"><!--//--><![CDATA[//><!--// close script tag //--><!]]></script></p>'),
'#rows' => 10,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save Header Settings',
);
return $form;
}