function cleanpager_admin_settings in Clean Pagination 7
Same name and namespace in other branches
- 5 cleanpager.module \cleanpager_admin_settings()
- 6 cleanpager.module \cleanpager_admin_settings()
Defines admin settings form
1 string reference to 'cleanpager_admin_settings'
- cleanpager_menu in ./
cleanpager.module - Implementation of hook_menu()
File
- ./
cleanpager.module, line 26
Code
function cleanpager_admin_settings($form, &$form_state) {
$form = array();
$form['cleanpager_pages'] = array(
'#title' => t('Pages'),
'#description' => t('Set which pages to apply clean pagination to. Put each page on a new line and use the source page path (do not use the url alias), without a leading slash. For example, enter "node/1" for node 1. For the front page, enter "@value".', array(
'@value' => '<front>',
)),
'#type' => 'textarea',
'#rows' => '7',
'#default_value' => variable_get('cleanpager_pages', ''),
);
$form['cleanpager_use_seo_links'] = array(
'#title' => t('Use SEO Links'),
'#description' => t('Using SEO links will add the page URL to the pagination links, and then will remove them via jquery once the page is loaded.'),
'#type' => 'checkbox',
'#default_value' => variable_get('cleanpager_use_seo_links', ''),
);
$form['cleanpager_redirect_301'] = array(
'#title' => t('Use 301 Redirects'),
'#description' => t('If a user lands on a page that has ?page=X in the query string but should have clean pagination, issue a 301 redirect.'),
'#type' => 'checkbox',
'#default_value' => variable_get('cleanpager_redirect_301', FALSE),
);
/*$form['cleanpager_add_can_link']= array(
'#title' => t('Add canonical link to head'),
'#description' => t('DO NOT USE. After further research, adding this link on paged pages is actually a bad idea. It is recommended to just use next and prev links. Add canonical information to header. This will add <a href="http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394">rel="canonical"</a> link to the head of every page that uses cleanpager.'),
'#type' => 'checkbox',
'#default_value' => variable_get('cleanpager_add_can_link', FALSE),
);*/
$form['cleanpager_add_rel_link'] = array(
'#title' => t('Add next/prev links to head'),
'#description' => t('Add pagination information to header. This will add <a href="http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1663744">rel="prev" and rel="next"</a> links to the head of every page with a pager on it, regardless of whether or not it is using cleanpager.'),
'#type' => 'checkbox',
'#default_value' => variable_get('cleanpager_add_rel_link', FALSE),
);
$form['cleanpager_use_additional_path'] = array(
'#title' => t('Use !page_variable/page_number', array(
'!page_variable' => CLEANPAGER_ADDITIONAL_PATH_VARIABLE,
)),
'#description' => t('Instead of simply adding /page_number at the end of paged urls, use /!page_variable/page_number.', array(
'!page_variable' => CLEANPAGER_ADDITIONAL_PATH_VARIABLE,
)),
'#type' => 'checkbox',
'#default_value' => variable_get('cleanpager_use_additional_path', TRUE),
);
$form['cleanpager_add_trailing'] = array(
'#title' => t('Add trailing slash'),
'#description' => t('Add a trailing slash (/) to all urls generated by Clean Pagination. I.E. "pager_url/page/1/"'),
'#type' => 'checkbox',
'#default_value' => variable_get('cleanpager_add_trailing', FALSE),
);
return system_settings_form($form);
}