You are here

function hook_content_lock_path_protected_alter in Content locking (anti-concurrent editing) 7.3

Alter the protected path and return grants/denies.

Parameters

array $protected:

string $path: The path to check protection for.

1 invocation of hook_content_lock_path_protected_alter()
content_lock_is_path_protected in ./content_lock.module
Check if an internal Drupal path should be protected with a token.

File

./content_lock.api.php, line 58
Document content_lock hooks.

Code

function hook_content_lock_path_protected_alter(&$protected, $path) {

  // If TRUE is in array, path is protected.
  if (in_array(TRUE, $protected)) {

    // Set this path as not protected.
    $protected = array();
  }
  else {

    // Set this path as protected path.
    $protected['custom_module'] = TRUE;
  }
}