I don't know if this is by design, but I experience the following problem.
I alter the block subject in hook_block_view_alter() and it works for me provided I leave the subject empty in the block admin interface. As soon as you set the block title in the admin interface, then any changes you made are overwritten. Moving the hook implementation to the theme has no effect, so it is not a question of module weight.

Comments

dcam’s picture

Status: Active » Closed (works as designed)

See _block_render_blocks(). It's programmed to override subjects defined by hook_block_view() or hook_block_view_alter() with any custom title.

        // Override default block title if a custom display title is present.
        if ($block->title) {
          // Check plain here to allow module generated titles to keep any
          // markup.
          $block->subject = $block->title == '<none>' ? '' : check_plain($block->title);
        }