Get visibility of a block
To test the block style visibility rules, you can use drupal_match_path

For example, in core: block_block_list_alter


  Checks the page, user role, and user-specific visibility settings. Removes the block if the visibility conditions are not met.