You are here

function _profile2_revision_base_path in Profile 2 7.2

Return the base path of revision pages, depending on profile page type. If $ops is TRUE, adds '/ops' suffix to the page-mode URL.

11 calls to _profile2_revision_base_path()
profile2_diff_block_view in contrib/profile2_diff.module
Implements hook_block_view().
profile2_diff_diffs_show in contrib/profile2_diff.pages.inc
Create output string for a comparison of 'profile' between versions 'old_vid' and 'new_vid'.
profile2_diff_entity_view_alter in contrib/profile2_diff.module
Implementation of hook_entity_view_alter().
profile2_diff_inline_form_submit in contrib/profile2_diff.module
Form submission handler for diff_inline_form() for JS-disabled clients.
profile2_diff_latest in contrib/profile2_diff.pages.inc
Menu callback - show latest diff for a given profile.

... See full list

File

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

Code

function _profile2_revision_base_path($profile, $ops = FALSE) {
  return empty($profile
    ->type()->data['use_page']) ? "user/{$profile->uid}/revisions/{$profile->type}" : "profile-{$profile->type}/{$profile->uid}/revisions" . ($ops ? '/ops' : '');
}