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.
- Pass the template_node as second argument to it.
- Rename to hook_simplenews_scheduler_edition_node_alter().
Comment | File | Size | Author |
---|---|---|---|
#4 | alter-argument-1476744.patch | 1.67 KB | Berdir |
#1 | improved_hook.patch | 1.66 KB | Berdir |
Comments
Comment #1
BerdirDid that.
Comment #2
joachim CreditAttribution: joachim commentedThe two function signatures don't seem to match?
Comment #3
BerdirUps.
They are named differently, I think scheduler_node makes more sense, not sure if we should update the clone function.
Comment #4
BerdirForgot the patch.
Comment #5
joachim CreditAttribution: joachim commentedLet's call it $edition_node throughout. Committed the patch with this tweak.
- #1476744 by Berdir: Changed the edition alter hook name and added a parameter for the template scheduler node.
Comment #6
joachim CreditAttribution: joachim commentedSince the original version of this hook was backported to D6, so should this change to it.
Comment #7
joachim CreditAttribution: joachim commented*sigh*... except that getting hold of the template node in _simplenews_scheduler_new_edition() is going to require major rewriting of that function and testing to work with node cloning issues etc etc. Not sure it's worth it :/
Comment #8
joachim CreditAttribution: joachim commentedWe should change the hook name for consistency and easier upgrading though: #1567442: backport change of name of edition alter hook.