You are here

function _vup_in_array_r in view_unpublished 7

Utility function, multidimensional in_array().

1 call to _vup_in_array_r()
view_unpublished_user_perms in ./view_unpublished.module
Utility function that returns the user's view_unpublished permissions in the following format:

File

./view_unpublished.module, line 256
Main functions and hook implementations of the View Unpublished module.

Code

function _vup_in_array_r($needle, $haystack, $strict = TRUE) {
  foreach ($haystack as $item) {
    if (($strict ? $item === $needle : $item == $needle) || is_array($item) && _vup_in_array_r($needle, $item, $strict)) {
      return TRUE;
    }
  }
  return FALSE;
}