For a project I needed to filter a dropdown on a dynamic parent. Setting this parent is only possible in the backend and is static.

I created a patch to be able to alter $max_depth and $parent in content_taxonomy_get_terms() in order to do this in the hook_content_taxonomy_tree_callback_alter().
Possibly others will find use cases that need these variables adjusted, which is why I post this patch here.

It's fully backwardscompatible because it just adds a new alter hook argument.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Koen.Pasman created an issue. See original summary.

Koen.Pasman’s picture

Koen.Pasman’s picture

Status: Active » Needs review