You are here

function profile2_diff_inline_ajax in Profile 2 7.2

AJAX callback for rendering the inline diff of a user.

1 string reference to 'profile2_diff_inline_ajax'
profile2_diff_inline_form in contrib/profile2_diff.module
Form builder: Inline diff controls.

File

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

Code

function profile2_diff_inline_ajax($form, $form_state) {
  module_load_include('inc', 'profile2_diff', 'profile2_diff.pages');
  $profile = $form['profile']['#value'];
  $old_vid = isset($form_state['values']['revision']) ? $form_state['values']['revision'] : 0;
  return "<div id='diff-inline-{$profile->pid}'>" . profile2_diff_inline_show($profile, $old_vid) . "</div>";
}