You are here

function node_revision_delete_content_types in Node Revision Delete 7.2

Helper function to return the list of tracked content types.

Return value

array Array of tracked content type as $machine_name => max revisions to keep.

4 calls to node_revision_delete_content_types()
node_revision_delete_cron in ./node_revision_delete.module
Implements hook_cron().
node_revision_delete_form in ./node_revision_delete.admin.inc
Page callback: Form constructor for Node Revision Delete administration form.
node_revision_delete_form_submit in ./node_revision_delete.admin.inc
Form submit handler for the settings form.
node_revision_delete_workbench_moderation_transition in ./node_revision_delete.module
Implements hook_workbench_moderation_transition().

File

./node_revision_delete.module, line 223
Node Revision Delete Module.

Code

function node_revision_delete_content_types() {
  $tracked_content_types = array();
  foreach (node_type_get_names() as $type => $name) {
    if (variable_get('node_revision_delete_track_' . $type)) {
      $tracked_content_types[$type] = (int) variable_get('node_revision_delete_number_' . $type);
    }
  }
  return $tracked_content_types;
}