You are here

function _node_revision_delete_delete_content_type_config in Node Revision Delete 7.3

Same name and namespace in other branches
  1. 7.2 node_revision_delete.module \_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.

3 calls to _node_revision_delete_delete_content_type_config()
node_revision_delete_content_type_configuration_delete_form_submit in ./node_revision_delete.admin.inc
Form submit handler for the content type configuration delete form.
node_revision_delete_node_type_delete in ./node_revision_delete.module
Implements hook_node_type_delete().
_node_revision_delete_form_node_type_submit in ./node_revision_delete.module
Custom submit handler to save the configuration variables.

File

./node_revision_delete.helpers.inc, line 44
Helper functions.

Code

function _node_revision_delete_delete_content_type_config($content_type) {

  // Getting the variables with the content types configuration.
  $node_revision_delete_track = variable_get('node_revision_delete_track');

  // Checking if the config exists.
  if (isset($node_revision_delete_track[$content_type])) {

    // Deleting the value from the array.
    unset($node_revision_delete_track[$content_type]);

    // Saving the values in the config.
    variable_set('node_revision_delete_track', $node_revision_delete_track);
    return TRUE;
  }
  return FALSE;
}