Problem/Motivation
The problem: bs_lib.module still has template_preprocess_bs_lib_toggle_button(). It merges #options into the variables of the bs_lib_toggle_button template. Drupal 11.3 deprecates finding this function by its name, and Drupal 12 removes it, so the preprocess would silently stop running. Toggle buttons would then render without their attributes.
Proposed resolution
1. Add 'initial preprocess' => static::class . ':preprocessBsLibToggleButton' to bs_lib_toggle_button in BsLibHooks::theme().
2. Move the function's body into a new BsLibHooks::preprocessBsLibToggleButton(array &$variables): void.
3. Keep template_preprocess_bs_lib_toggle_button() as a thin wrapper that calls the method, for Drupal before 11.2.
Remaining tasks
Implement.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork bs_lib-3628471
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
pivica commentedDone.