function lazyloader_admin_exclude in Image Lazyloader 7.2
Admin form: Exclude options.
1 string reference to 'lazyloader_admin_exclude'
- lazyloader_menu in ./
lazyloader.module - Implements hook_menu().
File
- ./
lazyloader.admin.inc, line 133 - Lazyloader Admin
Code
function lazyloader_admin_exclude() {
$form = array();
$form['lazyloader_page_exclude_option'] = array(
'#type' => 'radios',
'#title' => t('Enable on specific pages'),
'#default_value' => variable_get('lazyloader_page_exclude_option', LAZYLOADER_PAGE_EXCLUDE_OPTION),
'#options' => array(
'exclude' => t('All pages except those listed'),
'include' => t('Only the listed pages'),
),
);
$form['lazyloader_paths'] = array(
'#type' => 'textarea',
'#title_display' => 'invisible',
'#title' => t('Pages'),
'#default_value' => variable_get('lazyloader_paths', LAZYLOADER_PATHS),
'#description' => t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. i.e. <em>blog/*</em> or node/1"),
);
$options = array();
$types = node_type_get_types();
foreach ($types as $type) {
$options[$type->type] = $type->name;
}
$form['lazyloader_content_types'] = array(
'#type' => 'checkboxes',
'#options' => $options,
'#title' => t('Enabled on content types'),
'#default_value' => variable_get('lazyloader_content_types', array()),
'#description' => t('Enable Lazyloader on the selected content types only. If no content types are selected Lazyloader is enabled for all content types.'),
);
$options = array();
$styles = image_styles();
foreach ($styles as $style) {
$options[$style['name']] = $style['name'];
}
$form['lazyloader_image_styles'] = array(
'#type' => 'checkboxes',
'#options' => $options,
'#title' => t('Enabled for image styles'),
'#default_value' => variable_get('lazyloader_image_styles', array()),
'#description' => t('Enable Lazyloader for the selected image styles only. If no image styles are selected Lazyloader is enabled for all image styles.'),
);
$form['lazyloader_excluded_filenames'] = array(
'#type' => 'textarea',
'#title' => t('Exclude images by filename'),
'#default_value' => variable_get('lazyloader_excluded_filenames', LAZYLOADER_EXCLUDED_FILENAMES),
'#description' => t('Any filenames entered in this field will be excluded from lazyloading. Enter one filename per line.'),
);
$form['actions']['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset'),
'#weight' => 10,
);
$form['#submit'][] = 'lazyloader_admin_exclude_submit';
return system_settings_form($form);
}