Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

ThemeHooks classes

By admin, 3 October, 2025

Theme Hook Definitions for Views Plugins in Drupal 11: Moving Preprocess Logic to ThemeHooks Classes

In Drupal 11.3.0, a change landed that modernizes how Views plugins handle their preprocess callbacks. If you are maintaining custom Views plugins or themes, this is important to know.


Background: How It Worked Before

Traditionally, Drupal discovered preprocess functions implicitly.
For example, if you had a Views display plugin with a theme hook called views_display_example, Drupal would look for this function automatically:

Tags

  • #Drupal Planet
  • ThemeHooks classes
ThemeHooks classes
Powered by Drupal