You are here

function profile2_admin_paths in Profile 2 7.2

Implements hook_admin_paths().

File

./profile2.module, line 263
Support for configurable user profiles.

Code

function profile2_admin_paths() {

  // Show revision pages using admin theme when required.
  $paths = array();
  foreach (profile2_get_types() as $type_name => $type) {
    if (!empty($type->data['revision_admin'])) {
      if (empty($type->data['use_page'])) {
        $paths["user/*/revisions/{$type_name}"] = TRUE;
        $paths["user/*/revisions/{$type_name}/*"] = TRUE;
      }
      else {
        $paths["profile-{$type_name}/*/revisions"] = TRUE;
        $paths["profile-{$type_name}/*/revisions/*"] = TRUE;
      }
    }
  }
  return $paths;
}