You are here

function fb_devel_translated_menu_link_alter in Drupal for Facebook 7.4

Same name and namespace in other branches
  1. 6.3 fb_devel.module \fb_devel_translated_menu_link_alter()
  2. 7.3 fb_devel.module \fb_devel_translated_menu_link_alter()

File

./fb_devel.module, line 71
Makes development with Drupal for Facebook much easier. Keep this module enabled until you're confident your app works perfectly.

Code

function fb_devel_translated_menu_link_alter(&$item) {
  if ($item['link_path'] == 'fb/devel_linter' || $item['link_path'] == FB_DEVEL_URL_LINTER) {

    //dpm($item, __FUNCTION__);
    $item['href'] = FB_DEVEL_URL_LINTER;

    // href matters. link_path and router path do not.
    $item['localized_options']['query'] = array(
      'url' => url(current_path(), array(
        'absolute' => TRUE,
      )),
    );
  }
}