How to make a custom block listen to context module? I've been creating my own module that consist an array of blocks. I plan to print them using context as oppose programatically as I already have the module on use (no need to reinvent the wheel). However, whenever I use context to display a block on a region, it always display it on the highest part of html body tag.
e.g.

&lt;body&gt;
  block content rendered here...


as oppose to my custom region,

&lt;div class="l-info-bar"&gt;
  I want my block content rendered here...


I cleared the cache several times. Made sure that the context is set to display the block on info bar region.

Here's my code for reference. 

    function custom_module_block_info() {
      $blocks = array();
      $blocks['my_block_top_navigation'] = array(
        'info' =&gt; t('Top Bar Navigation Menu'),
        'cache' =&gt; DRUPAL_CACHE_GLOBAL,
      );
      $blocks['my_block_avatar'] = array(
        'info' =&gt; t('Avatar'),
        'cache' =&gt; DRUPAL_CACHE_GLOBAL,
      );  

      return $blocks;
    }
    /**
    * Implements hook_block_view().
    */
    function custom_module_block_view($delta = '') {
      $block = array();
      switch ($delta) {
        case 'my_block_top_navigation':
          $block['subject'] = '';
          $block['content'] = _custom_module_block_top_navigation_content();
          break;
        case 'my_block_avatar':
          $block['subject'] = '';
          $block['content'] = _custom_module_block_avatar_content();
          break;     
      }
      return $block;
    }

function _custom_module_block_top_navigation_content() {
    lots of code here...
}

function _custom_module_block_avatar_content() {


   lots of code here...
}


I'm guessing you have to prep your block so context can actually place it to certain region?

Update1: I forgot to mentioned that normal blocks works on context and normal block display (only my custom block doesn't work on normal way and context—which is why I though problem lies in my coding—not context module). I also tried printing the block through code and works perfectly but I don't want extra code I don't need because I have context on use.

Update 2: I also replaced the block content with print t('TEST') and still printing above body through normal means and context. Works well printing using code.
Firstly, You can try putting a regular block at a regular region created by drupal core in context. That should work.

Then compare the different results you got for your custom block and custom region. Try putting your custom block at regular region, or putting regular block at your custom region.

Also, You may need to double check the 'custom region' you mentioned at question does exist at page.tpl.php. I.e the code does print the 'custom region' in page template, like

&lt;?php print render($page['your_custom_reagion']); ?&gt;