You are here

function _node_revision_delete_delete_content_type_config in Node Revision Delete 7.2

Same name and namespace in other branches
  1. 7.3 node_revision_delete.helpers.inc \_node_revision_delete_delete_content_type_config()

Delete the content type config variable.

Parameters

string $content_type: Content type machine name.

Return value

bool Return TRUE if the content type config was deleted or FALSE if not exists.

1 call to _node_revision_delete_delete_content_type_config()
_node_revision_delete_form_node_type_delete in ./node_revision_delete.module
Custom submit handler to delete the configuration variables.

File

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

Code

function _node_revision_delete_delete_content_type_config($content_type) {

  // Getting the variable with the content type configuration.
  $variable_track = 'node_revision_delete_track_' . $content_type;
  $node_revision_delete_track = variable_get($variable_track, NULL);

  // Checking if the config exists.
  if (!is_null($node_revision_delete_track)) {
    variable_del($variable_track);
    variable_del('node_revision_delete_number_' . $content_type);
    return TRUE;
  }
  return FALSE;
}