1 layout.api.php hook_block_info_alter(&$blocks)

Modify block definitions after loading form code.

Parameters

$blocks: A multidimensional array of blocks keyed by the defining module and delta; the values are blocks returned by hook_block_info().

See also

hook_block_info()

Related topics

File

core/modules/layout/layout.api.php, line 555
Describe hooks provided by the Layout module.

Code

function hook_block_info_alter(&$blocks) {
  // Always check that the block is in the list before attempting to alter it.
  if (isset($blocks['user']['login'])) {
    // Change the administrative title the user login block.
    $blocks['user']['login']['info'] = t('Login form');
  }
}