function cleanpager_path in Clean Pagination 7
Same name and namespace in other branches
- 6 cleanpager.module \cleanpager_path()
Remove number at end of path
4 calls to cleanpager_path()
- cleanpager_check_match in ./
cleanpager.module - Checks if the page should use clean pagination
- cleanpager_init in ./
cleanpager.module - Implements hook_init().
- cleanpager_theme_pager_link in ./
cleanpager.module - Override theme for a pager link
- _cleanpager_generate_current_page_url in ./
cleanpager.module - Generate the current page url with page.
File
- ./
cleanpager.module, line 199
Code
function cleanpager_path() {
// Make sure the path came from the browser to use it.
$q = _cleanpager_get_q();
$q_array = explode('/', $q);
if (_cleanpager_is_pager_element(end($q_array))) {
array_pop($q_array);
// Check for page/page_number
if (variable_get('cleanpager_use_additional_path', TRUE)) {
if (end($q_array) == CLEANPAGER_ADDITIONAL_PATH_VARIABLE) {
array_pop($q_array);
$q = implode('/', $q_array);
}
}
else {
$q = implode('/', $q_array);
}
}
return $q;
}