Custom block assigned to new region invalid I had created a new region to my theme "buynow" and my theme.info contains the following line

regions[buynow] = Buynow


In my custom module i had created a custom block in which i assigned the block to the region buynow

function buynow_block_info() {
  $blocks = array();
  $blocks['buynow'] = array(
    'info' =&gt; t('Shoretel Buynow'),
    'status' =&gt; 1,
    'region' =&gt; 'buynow',
  );
  return $blocks;
}


When i try to enable the module, Iam getting The block was assigned to the invalid region and the block was disabled

How can i set my block to the new region.
You can use this code:

function formalter_block_info() {

 $blocks = array();

 $blocks['buynow'] = array(

 'info' =&gt; t('Shoretel Buynow'),

 'status' =&gt; 1, // This will enable your block by default, and set it to region given in 'region' option

 'region' =&gt; 'buynow', // put &lt;machine-name of your region&gt; in place of footer
 'visibility' =&gt; BLOCK_VISIBILITY_NOTLISTED,

 'weight' =&gt; 2,

 );
return $blocks;
}