Problem/Motivation

See profiling/discussion in #2348729: Convert theme_views_view_field to twig.

Proposed resolution

Something other than drush dis -y contextual

Possibly it could do something in hook_theme_registry_alter() instead?

Remaining tasks

User interface changes

API changes

Data model changes

Comments

catch created an issue. See original summary.

dawehner’s picture

What about require users of #contextual_links to append contextual_preprocess() to the theme registry entries they need it for?

Cottser’s picture

Issue tags: +Twig

Thanks for making the issue @catch!

Can we make an API addition to hook_theme() to allow adding preprocess functions instead of just replacing them? The 'preprocess functions' key seems like a sledgehammer.

'additional preprocess functions' or something…

Either way I guess we would rename contextual_preprocess() to something else so it doesn't get automatically picked up.

catch’s picture

Most of the things we can contextually edit are entities, so I think we should look at whether it's feasible to move this into hook_entity_view_alter() or somewhere similar.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.