Updated: Comment #0

Problem/Motivation

The Views module pioneered the usage of the __ pattern for theme suggestions. This is a part of core since Drupal 7, and now views_theme() has unnecessary 'pattern' lines that redeclare the default pattern of $hook . '__'. See #653622: Make the '__' pattern for theme suggestions easier to use for more background.

The default pattern can be seen in drupal_find_theme_templates() and drupal_find_theme_functions():

$pattern = isset($info['pattern']) ? $info['pattern'] : ($hook . '__');

Proposed resolution

Remove these lines.

Remaining tasks

Patch needs to be written.

User interface changes

n/a

API changes

n/a

None yet.

CommentFileSizeAuthor
#2 remove_pattern-2062315-2.patch1.3 KBk4v
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

star-szr’s picture

Title: Unnecessary 'pattern' lines in views_theme() » Remove unnecessary 'pattern' lines in views_theme()

Re-title to be actionable :)

k4v’s picture

like this?

k4v’s picture

Status: Active » Needs review
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yay, less code! :)

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.