You are here

function nopremium_node_view_alter in Node Option Premium 7

Implementation of hook_node_view_alter().

File

./nopremium.module, line 126
Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function nopremium_node_view_alter(&$build) {
  $node = $build['#node'];
  if ($build['#view_mode'] != 'teaser' && $build['#view_mode'] != 'search_index' && $node->premium && !nopremium_access_full_content($node)) {
    nopremium_alter_node($build);
  }
}