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.
I was quite surprised to see that neither this is available as a feature or that no one requested it here (as far as I can tell).
Comments
Comment #1
mstef CreditAttribution: mstef commentedI was going to use hook_block_info_alter() to remove them, but not after I saw this line and realized that would throw errors:
And while I'm asking, why insert it directly and not just declare it in hook_block_info()?
Comment #2
mstef CreditAttribution: mstef commentedShould be: (you did reference the function you need too..)
I'll provide a patch. That way I can at least use an alter hook properly without causing an eror from the drupal_write_record() that is in there.
Comment #3
mstef CreditAttribution: mstef commentedHere's an issue an patch for the _block_rehash(): #2158713: Use core functions to rehash blocks after node insert
I'll leave this option because I still feel this would be a great, and much needed, feature for this module (without having to hook in).
Comment #4
Johnny vd Laar CreditAttribution: Johnny vd Laar commentedI've closed your related issue. As described in that issue you can now do this with a proper block_info_alter. I don't think I want to add yet another interface option for this.