Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Remove @todo tags for code examples at functions hook_theme_suggestions_HOOK_alter()
and function hook_theme_suggestions_HOOK()
in file Theme.api.php
Proposed resolution
Remaining tasks
User interface changes
none
API changes
Documentation only
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#12 | interdiff-2632996-8-12.txt | 41.93 KB | Ankit Agrawal |
#12 | 2632996-12.patch | 907 bytes | Ankit Agrawal |
#8 | interdiff-2632996-7-8.txt | 531 bytes | Ankit Agrawal |
#8 | 2632996-8.patch | 884 bytes | Ankit Agrawal |
#5 | interdiff-code-example-for-function-hook_theme_suggestions_HOOK_alter-2632996-3-5.txt | 478 bytes | mohit_aghera |
Comments
Comment #2
Mac_Weber CreditAttribution: Mac_Weber as a volunteer commentedbad title due to issue clone
Comment #3
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #4
hussainwebYou don't need to return $suggestions. See bartik_theme_suggestions_form_alter for an example.
Comment #5
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commented@hussainweb,
Thanks for pointing out the issue. Fixing in updated patch.
Comment #6
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #7
hussainwebExtra line. You should remove the extra blank line so that there is just one blank line before @param.
Comment #8
Ankit Agrawal CreditAttribution: Ankit Agrawal as a volunteer commentedUpdated the code. Please check.
Comment #9
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #10
Mac_Weber CreditAttribution: Mac_Weber as a volunteer commentedI've created this issue while testing a new tool to post using the D.O API.
Actually, we already have code example there and I think we don't need anything more complex than what is already there.
We just need to remove the @todo tags.
Comment #11
star-szrThanks!
Comment #12
Ankit Agrawal CreditAttribution: Ankit Agrawal as a volunteer commentedRemoved the @todo tags from hook_theme_suggestions[_HOOK]() and hook_theme_suggestions[_HOOK]_alter().
Comment #13
Ankit Agrawal CreditAttribution: Ankit Agrawal as a volunteer commentedComment #14
joelpittetThanks @Ankit Agrawal
Comment #15
Mac_Weber CreditAttribution: Mac_Weber as a volunteer commentedThis issue is a duplicate of #2111079: Add @code sample and test coverage per hook_theme_suggestions[_HOOK]() and hook_theme_suggestions[_HOOK]_alter()
Closing this one in favor of the other because we already have patches there covering more stuff and also it replaces the tags by code in the documentation.