You are here

function view_unpublished_views_query_substitutions in view_unpublished 7

Same name and namespace in other branches
  1. 8 view_unpublished.views_execution.inc \view_unpublished_views_query_substitutions()
  2. 6 view_unpublished.module \view_unpublished_views_query_substitutions()

Implements hook_views_query_substitutions().

File

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

Code

function view_unpublished_views_query_substitutions() {
  $substitutions = array();
  foreach (node_type_get_types() as $type => $name) {
    $substitutions["***VIEWUNPUBLISHED_{$type}***"] = intval(user_access('view any unpublished ' . $type . ' content'));
  }
  return $substitutions;
}