You are here

function profile2_preprocess_ctools_context_item_form in Profile 2 7

Same name and namespace in other branches
  1. 7.2 profile2.module \profile2_preprocess_ctools_context_item_form()

Implements hook_preprocess_ctools_context_item_form().

When the User context is added, CTools will update the relationship dropdown with ajax. The dropdown is passed through theme_ctools_context_item_form before being passed to ajax_render, so that is our best opportunity to alter it.

See also

ctools_context_ajax_item_add

File

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

Code

function profile2_preprocess_ctools_context_item_form(&$vars) {
  unset($vars['form']['buttons']['relationship']['item']['#options']['entity_from_schema:uid-user-profile2']);
}