You are here

function profile2_diff_admin_paths in Profile 2 7.2

Implements hook_admin_paths().

File

contrib/profile2_diff.module, line 99
Provides functionality to show a diff between two profile2 revisions.

Code

function profile2_diff_admin_paths() {
  $paths = array();
  if (variable_get('diff_admin_path_profile2', 0)) {
    foreach (profile2_get_types() as $type_name => $type) {
      if (empty($type->data['use_page'])) {
        $paths["user/*/revisions/{$type_name}/diff/*"] = TRUE;
      }
      else {
        $paths["profile-{$type_name}/*/revisions/ops/diff/*"] = TRUE;
      }
    }
  }
  return $paths;
}