You are here

function theme_block_visibility in Block Visibility 7

Theme function for block visibility

1 theme call to theme_block_visibility()
block_visibility_form_block_admin_display_form_alter in ./block_visibility.module
Form alter for block_admin_display_form()

File

./block_visibility.module, line 152

Code

function theme_block_visibility($variables) {
  if (isset($variables['element']['#do_render']) && $variables['element']['#do_render']) {
    $output = '';
    foreach ($variables['element']['#visibles'] as $visible) {
      $output .= '<div class="block_visibility_title">' . $visible['#title'] . ($visible['#description'] ? '<div class="block_visibility_description">' . $visible['#description'] . '</div>' : '') . '</div>';
    }
    return $output;
  }
  else {

    // We get here the initial time in template_preprocess_block_admin_display_form which
    // isn't smart enough to know where to place this column. Render nothing this time and
    // fix it when we come back the second time.
    return '';
  }
}