You are here

function _revisioning_set_info_message in Revisioning 8

Same name and namespace in other branches
  1. 6.4 revisioning.pages.inc \_revisioning_set_info_message()
  2. 6.3 revisioning.pages.inc \_revisioning_set_info_message()
  3. 7 revisioning.pages.inc \_revisioning_set_info_message()

Set info message.

1 call to _revisioning_set_info_message()
_revisioning_show_pending_nodes in ./revisioning.pages.inc
Return as a themed table a list of nodes that have pending revisions.

File

./revisioning.pages.inc, line 314
Rendering and altering of pages and forms used by Revisioning.

Code

function _revisioning_set_info_message() {
  if (user_access('publish revisions')) {
    $moderated_types = array();
    foreach (node_type_get_types() as $type) {
      if (revisioning_content_is_moderated($type->type) && (user_access('view revisions') || user_access('view revisions of any ' . $type->type . ' content'))) {
        $moderated_types[] = $type->name;
      }
    }
    if (count($moderated_types) > 0) {
      drupal_set_message(t('You have permission to publish content revisions of type(s): %moderated_types.', array(
        '%moderated_types' => implode(', ', $moderated_types),
      )));
    }
  }
}