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 suggest that 'block_view_alter' hooks would be invoked in multiblock_call_block(). I've made following changes to do this:
diff --git a/sites/all/modules/multiblock/multiblock.module b/sites/all/modules/multiblock/multiblock.module
index 5469722..849e76b 100644
--- a/sites/all/modules/multiblock/multiblock.module
+++ b/sites/all/modules/multiblock/multiblock.module
@@ -106,6 +106,17 @@ function multiblock_call_block($delta, $op, $edit) {
else {
$block = module_invoke($block_info->module, 'block_'. $op, $block_info->orig_delta);
}
+ if ('view' == $op) {
+ foreach (module_implements('block_view_alter') as $module) {
+ $hook = $module . '_block_view_alter';
+ if (function_exists($hook)) {
+ $hook($block, (object) array(
+ 'module' => $block_info->module,
+ 'delta' => $block_info->orig_delta,
+ ));
+ }
+ }
+ }
return $block;
}
// No such multiblock, shouldn't ever happen.
I needed this because some cloned menus didn't get translated.
Comments
Comment #1
alberto56 CreditAttribution: alberto56 commentedRelated: #2112485: Provide information about multiblock to all other modules' hook_block_...() hooks, not just save
Comment #2
intrafusionI believe this issue will have been handled by #2112485: Provide information about multiblock to all other modules' hook_block_...() hooks, not just save
Marking as fixed