openscholar/openscholar — pull request #5071 by baisong (2014-01-28 20:16:11+00:00)
Title: Add and verify working, canonical rel prev/next link tags

#5059

#### Changes

* Added `template_preprocess_HOOK()` for `theme_pager_link()` to both os_basetheme and hwpi_basetheme.
* In both hooks, added code like below which adds a `` tag to the head of the HTML document for the first occurance of each of: previous and next pager links.

#### New code:

```php
'prev', 'href' => url($_GET['q'], array('query' => array_filter($query, '_hwpi_basetheme_not_empty')))));
}
if (!$rel_next && $text == t('next ›')) {
$rel_next = TRUE;
drupal_add_html_head_link(array('rel' => 'next', 'href' => url($_GET['q'], array('query' => array_filter($query, '_hwpi_basetheme_not_empty')))));
}
// End customizations not in drupal core pager.inc
```