You are here

function linkit_form_menu_edit_item_alter in Linkit 7.3

Implements hook_form_FORM_ID_alter() for "menu_edit_item".

File

./linkit.module, line 1229
Main file for Linkit module.

Code

function linkit_form_menu_edit_item_alter(&$form, &$form_state) {

  // If a 'menu' profile type exists, use it to add Linkit to menu links.
  $profiles = linkit_profile_menu_load_all();
  foreach ($profiles as $profile) {
    $form['link_path']['#linkit'] = array(
      'profile' => $profile->name,
      'button_text' => t($profile->data['button_text']),
    );
    break;
  }
}