Download & Extend

theme_pager functions now use theme suggestions (theme_pager_link__*)

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
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done
nobody click here