You are here

function _protected_node_check_view_mode in Protected Node 1.0.x

Same name and namespace in other branches
  1. 7 protected_node.module \_protected_node_check_view_mode()

Helper function.

Evaluate whether the current view mode is one to check the password for.

Parameters

string $view_mode: Eg: full, teaser, or custom (eg: ds view modes).

Return value

bool TRUE if we are checking passwords, FALSE if not.

1 call to _protected_node_check_view_mode()
protected_node_node_view in ./protected_node.module
Implements hook_node_view().

File

./protected_node.module, line 1414
Protected Node module.

Code

function _protected_node_check_view_mode($view_mode) {
  $permitted_view_modes = variable_get('protected_node_checked_view_modes', _protected_node_get_default_checked_view_modes());
  return in_array($view_mode, $permitted_view_modes);
}