You are here

function mediafront_block_show in MediaFront 7

Same name and namespace in other branches
  1. 6 mediafront.module \mediafront_block_show()

Determine if we should show the views block.

Parameters

type $view:

Return value

type

2 calls to mediafront_block_show()
mediafront_views_pre_render in ./mediafront.module
Views pre-render
mediafront_views_query_alter in ./mediafront.module
Implements hook_views_query_alter().

File

./mediafront.module, line 555

Code

function mediafront_block_show($view) {
  $exclude = variable_get('mediafront_block_playlist_exclude', array());
  $playlists = variable_get('mediafront_block_playlist', '');
  $enabled = is_array($playlists) ? isset($playlists[$view->name]) : $playlists == $view->name;
  return $enabled && !in_array($view->current_display, $exclude);
}