Closed (works as designed)
Project:
Nodeblock
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2013 at 21:41 UTC
Updated:
3 Jan 2014 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mstef commentedPatch
Comment #2
Johnny vd Laar commentedI intentionally didn't use _block_rehash because it is quite a heavy operation and I already know which block to change. Perhaps we should invoke drupal_alter('block_info', $current_blocks, $theme, $code_blocks); on the single block. But this function kinda is meant for a complete list of blocks.
But if you don't want a block to be created then you just shouldn't check the "Create a block for this node" checkbox or implement a hook_node_insert / update that sets the checkbox to false.
Comment #3
Johnny vd Laar commentedOh I see that we already do a block_info_alter. I've modified the code a little but such that you can unset the block if you want to and don't get a notice:
http://drupalcode.org/project/nodeblock.git/blobdiff/f7ff7a4089322651c7d...