You are here

function cleanpager_check_match in Clean Pagination 5

Same name and namespace in other branches
  1. 6 cleanpager.module \cleanpager_check_match()
  2. 7 cleanpager.module \cleanpager_check_match()

Checks if the page should use clean pagination

3 calls to cleanpager_check_match()
cleanpager_init in ./cleanpager.module
cleanpager_menu in ./cleanpager.module
Implementation of hook_menu()
phptemplate_pager_link in ./cleanpager.module
Override theme for a pager link

File

./cleanpager.module, line 79

Code

function cleanpager_check_match() {
  $matches = variable_get('cleanpager_pages', '');
  if (trim($matches) != '') {
    $matches = explode("\n", $matches);
    foreach ($matches as $match) {
      $match = trim($match);
      $match = str_replace('/', '\\/', $match);
      if (preg_match('/' . $match . '([0-9]*)/', $_GET['q'])) {
        return true;
        break;
      }
    }
  }
  return false;
}