Posted by bleen18 on October 22, 2012 at 2:50pm
Project:
Drupal core
Introduced in branch:
8.x Description:
The following theme functions have been removed in favor of theme hook suggestions:
theme_pager_first() » theme_pager_link__first()
theme_pager_previous() » theme_pager_link__previous()
theme_pager_next() » theme_pager_link__next()
theme_pager_last() » theme_pager_link__last()For example, to override the "pager first" link you should now add a function like this one:
/**
* @param array $variables
* An associative array containing:
* - text: The link text. Also used to figure out the title attribute of the
* link, if it is not provided in $variables['attributes']['title']; in
* this case, $variables['text'] must be one of the standard pager link
* text strings that would be generated by the pager theme functions, such
* as a number or t('« first').
* - page_new: The first result to display on the linked page.
* - element: An optional integer to distinguish between multiple pagers on
* one page.
* - parameters: An associative array of query string parameters to append to
* the pager link.
* - attributes: An associative array of HTML attributes to apply to the
* pager link.
*/
function mytheme_pager_link__first(&$variables) {
return '<a' . new Attribute($variables['attributes']) . '>' . check_plain($variables['text']) . '</a>';
}Impacts:
Themers