diff --git a/core/authorize.php b/core/authorize.php
index 1544aa9..181dfe5 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -130,8 +130,8 @@ function authorize_access_allowed() {
     }
     else {
       $links = array_merge($links, array(
-        l(t('Administration pages'), 'admin'),
-        l(t('Front page'), '<front>'),
+        l('admin', t('Administration pages')),
+        l('<front>', t('Front page')),
       ));
     }
 
diff --git a/core/includes/common.inc b/core/includes/common.inc
index f1a7ce0..a03c089 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2301,12 +2301,11 @@ function drupal_http_header_attributes(array $attributes = array()) {
  *
  * @see url()
  */
-function l($text, $path, array $options = array()) {
+function l($path, $content, $options = array(), $attributes = array()) {
   static $use_theme = NULL;
 
   // Merge in defaults.
   $options += array(
-    'attributes' => array(),
     'query' => array(),
     'html' => FALSE,
   );
@@ -2321,13 +2320,13 @@ function l($text, $path, array $options = array()) {
   $is_active = $is_active && (empty($options['language']) || $options['language']->langcode == language(LANGUAGE_TYPE_URL)->langcode);
   $is_active = $is_active && (drupal_container()->get('request')->query->all() == $options['query']);
   if ($is_active) {
-    $options['attributes']['class'][] = 'active';
+    $attributes['class'][] = 'active';
   }
 
   // Remove all HTML and PHP tags from a tooltip. For best performance, we act only
   // if a quick strpos() pre-check gave a suspicion (because strip_tags() is expensive).
-  if (isset($options['attributes']['title']) && strpos($options['attributes']['title'], '<') !== FALSE) {
-    $options['attributes']['title'] = strip_tags($options['attributes']['title']);
+  if (isset($attributes['title']) && strpos($attributes['title'], '<') !== FALSE) {
+    $attributes['title'] = strip_tags($attributes['title']);
   }
 
   // Determine if rendering of the link is to be done with a theme function
@@ -2357,11 +2356,11 @@ function l($text, $path, array $options = array()) {
     }
   }
   if ($use_theme) {
-    return theme('link', array('text' => $text, 'path' => $path, 'options' => $options));
+    return theme('link', array('content' => $content, 'path' => $path, 'options' => $options, 'attributes' => $attributes));
   }
   // The result of url() is a plain-text URL. Because we are using it here
   // in an HTML argument context, we need to encode it properly.
-  return '<a href="' . check_plain(url($path, $options)) . '"' . new Attribute($options['attributes']) . '>' . ($options['html'] ? $text : check_plain($text)) . '</a>';
+  return '<a href="' . check_plain(url($path, $options)) . '"' . new Attribute($attributes) . '>' . ($options['html'] ? $content : check_plain($content)) . '</a>';
 }
 
 /**
@@ -5354,6 +5353,7 @@ function drupal_pre_render_conditional_comments($elements) {
  *   - #title: The link text to pass as argument to l().
  *   - #href: The URL path component to pass as argument to l().
  *   - #options: (optional) An array of options to pass to l().
+ *   - #attributes: (optional) An array of attributes to pass to l().
  *
  * @return
  *   The passed-in elements containing a rendered link in '#markup'.
@@ -5361,30 +5361,23 @@ function drupal_pre_render_conditional_comments($elements) {
 function drupal_pre_render_link($element) {
   // By default, link options to pass to l() are normally set in #options.
   $element += array('#options' => array());
-  // However, within the scope of renderable elements, #attributes is a valid
-  // way to specify attributes, too. Take them into account, but do not override
-  // attributes from #options.
-  if (isset($element['#attributes'])) {
-    $element['#options'] += array('attributes' => array());
-    $element['#options']['attributes'] += $element['#attributes'];
-  }
 
   // This #pre_render callback can be invoked from inside or outside of a Form
   // API context, and depending on that, a HTML ID may be already set in
   // different locations. #options should have precedence over Form API's #id.
   // #attributes have been taken over into #options above already.
-  if (isset($element['#options']['attributes']['id'])) {
-    $element['#id'] = $element['#options']['attributes']['id'];
+  if (isset($element['#attributes']['id'])) {
+    $element['#id'] = $element['#attributes']['id'];
   }
   elseif (isset($element['#id'])) {
-    $element['#options']['attributes']['id'] = $element['#id'];
+    $element['#attributes']['id'] = $element['#id'];
   }
 
   // Conditionally invoke ajax_pre_render_element(), if #ajax is set.
   if (isset($element['#ajax']) && !isset($element['#ajax_processed'])) {
     // If no HTML ID was found above, automatically create one.
     if (!isset($element['#id'])) {
-      $element['#id'] = $element['#options']['attributes']['id'] = drupal_html_id('ajax-link');
+      $element['#id'] = $element['#attributes']['id'] = drupal_html_id('ajax-link');
     }
     // If #ajax['path] was not specified, use the href as Ajax request URL.
     if (!isset($element['#ajax']['path'])) {
@@ -5394,7 +5387,7 @@ function drupal_pre_render_link($element) {
     $element = ajax_pre_render_element($element);
   }
 
-  $element['#markup'] = l($element['#title'], $element['#href'], $element['#options']);
+  $element['#markup'] = l($element['#href'], $element['#title'], $element['#options'], isset($element['#attributes']) ? $element['#attributes'] : array());
   return $element;
 }
 
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index d28316b..dd05b0d 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -1605,7 +1605,8 @@ function theme_menu_link(array $variables) {
   if ($element['#below']) {
     $sub_menu = drupal_render($element['#below']);
   }
-  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
+  // @todo: Do we pass any #attributes to l() here?  Does only wrapper <li> get them?
+  $output = l($element['#href'], $element['#title'], $element['#localized_options']);
   return '<li' . new Attribute($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
 }
 
@@ -1638,7 +1639,7 @@ function theme_menu_local_task($variables) {
     $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active));
   }
 
-  return '<li' . (!empty($variables['element']['#active']) ? ' class="active"' : '') . '>' . l($link_text, $link['href'], $link['localized_options']) . '</li>';
+  return '<li' . (!empty($variables['element']['#active']) ? ' class="active"' : '') . '>' . l($link['href'], $link_text, $link['localized_options']) . '</li>';
 }
 
 /**
@@ -1657,7 +1658,7 @@ function theme_menu_local_action($variables) {
 
   $output = '<li>';
   if (isset($link['href'])) {
-    $output .= l($link['title'], $link['href'], isset($link['localized_options']) ? $link['localized_options'] : array());
+    $output .= l($link['href'], $link['title'], isset($link['localized_options']) ? $link['localized_options'] : array());
   }
   elseif (!empty($link['localized_options']['html'])) {
     $output .= $link['title'];
@@ -2563,7 +2564,8 @@ function menu_get_active_breadcrumb() {
     }
 
     foreach ($active_trail as $parent) {
-      $breadcrumb[] = l($parent['title'], $parent['href'], $parent['localized_options']);
+      // @todo: Make sure ['localized_options']['attributes'] becomes ['attributes'].
+      $breadcrumb[] = l($parent['href'], $parent['title'], $parent['localized_options']);
     }
   }
   return $breadcrumb;
diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index 36be9ad..a0d01fe 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -377,7 +377,7 @@ function theme_pager_link($variables) {
     }
   }
 
-  return l($text, current_path(), array('query' => $query, 'attributes' => $attributes));
+  return l(current_path(), $text, array('query' => $query), $attributes);
 }
 
 /**
diff --git a/core/includes/tablesort.inc b/core/includes/tablesort.inc
index 818b61d..c9f6dee 100644
--- a/core/includes/tablesort.inc
+++ b/core/includes/tablesort.inc
@@ -55,7 +55,7 @@ function tablesort_header($cell, $header, $ts) {
       $ts['sort'] = 'asc';
       $image = '';
     }
-    $cell['data'] = l($cell['data'] . $image, current_path(), array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $cell['data'])), 'html' => TRUE));
+    $cell['data'] = l(current_path(), $cell['data'] . $image, array('query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $cell['data'])), 'html' => TRUE), array('title' => $title));
 
     unset($cell['field'], $cell['sort']);
   }
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index d2fe902..a8d8cf8 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1632,13 +1632,13 @@ function theme_status_messages($variables) {
  * or process functions or override this theme implementation.
  *
  * @param $variables
- *   An associative array containing the keys 'text', 'path', and 'options'. See
- *   the l() function for information about these variables.
+ *   An associative array containing the keys 'path', 'content', 'options', and
+ *   'attributes'. See the l() function for information about these variables.
  *
  * @see l()
  */
 function theme_link($variables) {
-  return '<a href="' . check_plain(url($variables['path'], $variables['options'])) . '"' . new Attribute($variables['options']['attributes']) . '>' . ($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])) . '</a>';
+  return '<a href="' . check_plain(url($variables['path'], $variables['options'])) . '"' . new Attribute($variables['attributes']) . '>' . ($variables['options']['html'] ? $variables['content'] : check_plain($variables['content'])) . '</a>';
 }
 
 /**
@@ -1726,23 +1726,33 @@ function theme_links($variables) {
       }
 
       // Handle links.
+      // @todo: Make sure attributes never end up in options array.
+      // Then remove this:
+      if (isset($link['attributes'])) {
+        $link_attributes = $link['attributes'];
+        unset($link['attributes']);
+      }
+      else {
+        $link_attributes = array();
+      }
+
       if (isset($link['href'])) {
         $is_current_path = ($link['href'] == current_path() || ($link['href'] == '<front>' && drupal_is_front_page()));
         $is_current_language = (empty($link['language']) || $link['language']->langcode == $language_url->langcode);
         if ($is_current_path && $is_current_language) {
           $class[] = 'active';
         }
+        $link_attributes['class'] = $class;
         // Pass in $link as $options, they share the same keys.
-        $item = l($link['title'], $link['href'], $link);
+        $item = l($link['href'], $link['title'], $link, $link_attributes);
       }
       // Handle title-only text items.
       else {
         // Merge in default array properties into $link.
         $link += array(
           'html' => FALSE,
-          'attributes' => array(),
         );
-        $item = '<span' . new Attribute($link['attributes']) . '>';
+        $item = '<span' . new Attribute($link_attributes) . '>';
         $item .= ($link['html'] ? $link['title'] : check_plain($link['title']));
         $item .= '</span>';
       }
@@ -2219,7 +2229,7 @@ function theme_item_list($variables) {
  *   - url: The URL for the link.
  */
 function theme_more_help_link($variables) {
-  return '<div class="more-help-link">' . l(t('More help'), $variables['url']) . '</div>';
+  return '<div class="more-help-link">' . l($variables['url'], t('More help')) . '</div>';
 }
 
 /**
@@ -2234,7 +2244,7 @@ function theme_more_help_link($variables) {
 function theme_feed_icon($variables) {
   $text = t('Subscribe to !feed-title', array('!feed-title' => $variables['title']));
   if ($image = theme('image', array('uri' => 'core/misc/feed.png', 'width' => 16, 'height' => 16, 'alt' => $text))) {
-    return l($image, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
+    return l($variables['url'], $image, array('html' => TRUE), array('class' => array('feed-icon'), 'title' => $text));
   }
 }
 
@@ -2285,7 +2295,7 @@ function theme_html_tag($variables) {
  *   - title: A descriptive verb for the link, like 'Read more'.
  */
 function theme_more_link($variables) {
-  return '<div class="more-link">' . l(t('More'), $variables['url'], array('attributes' => array('title' => $variables['title']))) . '</div>';
+  return '<div class="more-link">' . l($variables['url'], t('More'), array(), array('title' => $variables['title'])) . '</div>';
 }
 
 /**
@@ -2967,7 +2977,7 @@ function drupal_common_theme() {
       'variables' => array('display' => NULL),
     ),
     'link' => array(
-      'variables' => array('text' => NULL, 'path' => NULL, 'options' => array()),
+      'variables' => array('path' => NULL, 'content' => NULL, 'options' => array(), 'attributes' => array()),
     ),
     'links' => array(
       'variables' => array('links' => array(), 'attributes' => array('class' => array('links')), 'heading' => array()),
diff --git a/core/lib/Drupal/Core/Updater/Module.php b/core/lib/Drupal/Core/Updater/Module.php
index acc3028..08e1017 100644
--- a/core/lib/Drupal/Core/Updater/Module.php
+++ b/core/lib/Drupal/Core/Updater/Module.php
@@ -98,9 +98,9 @@ public function getSchemaUpdates() {
    */
   public function postInstallTasks() {
     return array(
-      l(t('Install another module'), 'admin/modules/install'),
-      l(t('Enable newly added modules'), 'admin/modules'),
-      l(t('Administration pages'), 'admin'),
+      l('admin/modules/install', t('Install another module')),
+      l('admin/modules', t('Enable newly added modules')),
+      l('admin', t('Administration pages')),
     );
   }
 
diff --git a/core/lib/Drupal/Core/Updater/Theme.php b/core/lib/Drupal/Core/Updater/Theme.php
index 4bd716a..90a3a08 100644
--- a/core/lib/Drupal/Core/Updater/Theme.php
+++ b/core/lib/Drupal/Core/Updater/Theme.php
@@ -82,8 +82,8 @@ public function postInstall() {
    */
   public function postInstallTasks() {
     return array(
-      l(t('Enable newly added themes'), 'admin/appearance'),
-      l(t('Administration pages'), 'admin'),
+      l('admin/appearance', t('Enable newly added themes')),
+      l('admin', t('Administration pages')),
     );
   }
 }
diff --git a/core/modules/action/action.module b/core/modules/action/action.module
index 6ebf1fb..2a8119f 100644
--- a/core/modules/action/action.module
+++ b/core/modules/action/action.module
@@ -394,7 +394,7 @@ function action_synchronize($delete_orphans = FALSE) {
       }
     }
     else {
-      $link = l(t('Remove orphaned actions'), 'admin/config/system/actions/orphan');
+      $link = l('admin/config/system/actions/orphan', t('Remove orphaned actions'));
       $count = count($actions_in_db);
       $orphans = implode(', ', $orphaned);
       watchdog('action', '@count orphaned actions (%orphans) exist in the actions table. !link', array('@count' => $count, '%orphans' => $orphans, '!link' => $link), WATCHDOG_INFO);
diff --git a/core/modules/aggregator/aggregator.admin.inc b/core/modules/aggregator/aggregator.admin.inc
index a859e85..30ca03b 100644
--- a/core/modules/aggregator/aggregator.admin.inc
+++ b/core/modules/aggregator/aggregator.admin.inc
@@ -32,7 +32,7 @@ function aggregator_view() {
   $rows = array();
   foreach ($result as $feed) {
     $row = array();
-    $row[] = l($feed->title, "aggregator/sources/$feed->fid");
+    $row[] = l("aggregator/sources/$feed->fid", $feed->title);
     $row[] = format_plural($feed->items, '1 item', '@count items');
     $row[] = ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never'));
     $row[] = ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never'));
@@ -68,7 +68,7 @@ function aggregator_view() {
   $rows = array();
   foreach ($result as $category) {
     $row = array();
-    $row[] = l($category->title, "aggregator/categories/$category->cid");
+    $row[] = l("aggregator/categories/$category->cid", $category->title);
     $row[] = format_plural($category->items, '1 item', '@count items');
     $links = array();
     $links['edit'] = array(
@@ -234,7 +234,7 @@ function aggregator_form_feed_submit($form, &$form_state) {
     }
   }
   else {
-    watchdog('aggregator', 'Feed %feed added.', array('%feed' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/config/services/aggregator'));
+    watchdog('aggregator', 'Feed %feed added.', array('%feed' => $form_state['values']['title']), WATCHDOG_NOTICE, l('admin/config/services/aggregator', t('view')));
     drupal_set_message(t('The feed %feed has been added.', array('%feed' => $form_state['values']['title'])));
   }
 }
@@ -671,7 +671,7 @@ function aggregator_form_category_submit($form, &$form_state) {
     }
   }
   else {
-    watchdog('aggregator', 'Category %category added.', array('%category' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/config/services/aggregator'));
+    watchdog('aggregator', 'Category %category added.', array('%category' => $form_state['values']['title']), WATCHDOG_NOTICE, l('admin/config/services/aggregator', t('view')));
     drupal_set_message(t('The category %category has been added.', array('%category' => $form_state['values']['title'])));
   }
 }
diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc
index 78ca5bc..8bb237e 100644
--- a/core/modules/aggregator/aggregator.pages.inc
+++ b/core/modules/aggregator/aggregator.pages.inc
@@ -340,7 +340,7 @@ function template_preprocess_aggregator_item(&$variables) {
 
   $variables['categories'] = array();
   foreach ($item->categories as $category) {
-    $variables['categories'][$category->cid] = l($category->title, 'aggregator/categories/' . $category->cid);
+    $variables['categories'][$category->cid] = l('aggregator/categories/' . $category->cid, $category->title);
   }
 }
 
@@ -539,11 +539,8 @@ function template_preprocess_aggregator_summary_items(&$variables) {
 function template_preprocess_aggregator_summary_item(&$variables) {
   $item = $variables['item'];
 
-  $variables['item_url'] = l(check_plain($item->title), check_url(url($item->link, array('absolute' => TRUE))), array(
-    'attributes' => array(
-      'class' => array('feed-item-url',),
-    ),
-  ));
+  // @todo: Clean up this check_url(url()).  It happens again in l().
+  $variables['item_url'] = l(check_url(url($item->link, array('absolute' => TRUE))), check_plain($item->title), array(), array('class' => array('feed-item-url')));
   $variables['item_age'] = theme('datetime', array(
     'attributes' => array(
       'datetime' => format_date($item->timestamp, 'html_datetime', '', 'UTC'),
@@ -565,7 +562,7 @@ function template_preprocess_aggregator_feed_source(&$variables) {
   $variables['source_icon'] = theme('feed_icon', array('url' => $feed->url, 'title' => t('!title feed', array('!title' => $feed->title))));
 
   if (!empty($feed->image) && !empty($feed->title) && !empty($feed->link)) {
-    $variables['source_image'] = l(theme('image', array('path' => $feed->image, 'alt' => $feed->title)), $feed->link, array('html' => TRUE, 'attributes' => array('class' => 'feed-image')));
+    $variables['source_image'] = l($feed->link, theme('image', array('path' => $feed->image, 'alt' => $feed->title)), array('html' => TRUE), array('class' => array('feed-image')));
   }
   else {
     $variables['source_image'] = '';
@@ -582,6 +579,6 @@ function template_preprocess_aggregator_feed_source(&$variables) {
   }
 
   if (user_access('administer news feeds')) {
-    $variables['last_checked'] = l($variables['last_checked'], 'admin/config/services/aggregator');
+    $variables['last_checked'] = l('admin/config/services/aggregator', $variables['last_checked']);
   }
 }
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 2978146..af43f05 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -66,7 +66,7 @@ function block_help($path, $arg) {
     $demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'stark');
     $themes = list_themes();
     $output = '<p>' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the <em>Save blocks</em> button at the bottom of the page. Click the <em>configure</em> link next to each block to configure its specific title and visibility settings.') . '</p>';
-    $output .= '<p>' . l(t('Demonstrate block regions (@theme)', array('@theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '</p>';
+    $output .= '<p>' . l('admin/structure/block/demo/' . $demo_theme, t('Demonstrate block regions (@theme)', array('@theme' => $themes[$demo_theme]->info['name']))) . '</p>';
     return $output;
   }
 }
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
index b09f2d4..e5541f7 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
@@ -71,9 +71,9 @@ function testCustomBlock() {
 
     // Confirm that the add block link appears on block overview pages.
     $this->drupalGet('admin/structure/block');
-    $this->assertRaw(l('Add block', 'admin/structure/block/add'), 'Add block link is present on block overview page for default theme.');
+    $this->assertRaw(l('admin/structure/block/add', 'Add block'), 'Add block link is present on block overview page for default theme.');
     $this->drupalGet('admin/structure/block/list/seven');
-    $this->assertRaw(l('Add block', 'admin/structure/block/list/seven/add'), 'Add block link is present on block overview page for non-default theme.');
+    $this->assertRaw(l('admin/structure/block/list/seven/add', 'Add block'), 'Add block link is present on block overview page for non-default theme.');
 
     // Confirm that hidden regions are not shown as options for block placement
     // when adding a new block.
diff --git a/core/modules/book/book.admin.inc b/core/modules/book/book.admin.inc
index 27f5cae..76bff4f 100644
--- a/core/modules/book/book.admin.inc
+++ b/core/modules/book/book.admin.inc
@@ -19,8 +19,9 @@ function book_admin_overview() {
 
   // Add any recognized books to the table list.
   foreach (book_get_books() as $book) {
+    // @todo: Make sure $book['attributes'] is set (changed from $book['options']['attributes']).
     $row = array(
-      l($book['title'], $book['href'], $book['options']),
+      l($book['href'], $book['title'], $book['options'], $book['attributes']),
     );
     $links = array();
     $links['edit'] = array(
@@ -166,7 +167,7 @@ function book_admin_edit_submit($form, &$form_state) {
         $node->log = t('Title changed from %original to %current.', array('%original' => $node->title, '%current' => $values['title']));
 
         $node->save();
-        watchdog('content', 'book: updated %title.', array('%title' => $node->label()), WATCHDOG_NOTICE, l(t('view'), 'node/' . $node->nid));
+        watchdog('content', 'book: updated %title.', array('%title' => $node->label()), WATCHDOG_NOTICE, l('node/' . $node->nid, t('view')));
       }
     }
   }
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 0187bda..a0c1d71 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -368,9 +368,9 @@ function book_block_save($delta = '', $edit = array()) {
 function theme_book_title_link($variables) {
   $link = $variables['link'];
 
-  $link['options']['attributes']['class'] = array('book-title');
+  $link['attributes']['class'] = array('book-title');
 
-  return l($link['title'], $link['href'], $link['options']);
+  return l($link['href'], $link['title'], $link['options'], $link['attributes']);
 }
 
 /**
diff --git a/core/modules/book/book.pages.inc b/core/modules/book/book.pages.inc
index ae79318..1b9f256 100644
--- a/core/modules/book/book.pages.inc
+++ b/core/modules/book/book.pages.inc
@@ -16,8 +16,9 @@
  */
 function book_render() {
   $book_list = array();
+  // @todo: Make sure $book['attributes'] is set (changed from $book['options']['attributes']).
   foreach (book_get_books() as $book) {
-    $book_list[] = l($book['title'], $book['href'], $book['options']);
+    $book_list[] = l($book['href'], $book['title'], $book['options'], $book['attributes']);
   }
 
   return theme('item_list', array('items' => $book_list));
diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index 5f50fe8..5da1e6a 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -150,15 +150,15 @@ function checkBookNode(Node $node, $nodes, $previous = FALSE, $up = FALSE, $next
 
     // Check previous, up, and next links.
     if ($previous) {
-      $this->assertRaw(l('<b>‹</b> ' . $previous->label(), 'node/' . $previous->nid, array('html' => TRUE, 'attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page')))), 'Previous page link found.');
+      $this->assertRaw(l('node/' . $previous->nid, '<b>‹</b> ' . $previous->label(), array('html' => TRUE), array('rel' => array('prev'), 'title' => t('Go to previous page'))), 'Previous page link found.');
     }
 
     if ($up) {
-      $this->assertRaw(l('up', 'node/' . $up->nid, array('html'=> TRUE, 'attributes' => array('title' => t('Go to parent page')))), 'Up page link found.');
+      $this->assertRaw(l('node/' . $up->nid, 'up', array('html'=> TRUE), array('title' => t('Go to parent page'))), 'Up page link found.');
     }
 
     if ($next) {
-      $this->assertRaw(l($next->label() . ' <b>›</b>', 'node/' . $next->nid, array('html'=> TRUE, 'attributes' => array('rel' => array('next'), 'title' => t('Go to next page')))), 'Next page link found.');
+      $this->assertRaw(l('node/' . $next->nid, $next->label() . ' <b>›</b>', array('html'=> TRUE), array('rel' => array('next'), 'title' => t('Go to next page'))), 'Next page link found.');
     }
 
     // Compute the expected breadcrumb.
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 7b6eda4..a69f36f 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -597,7 +597,7 @@ function theme_comment_block() {
   $items = array();
   $number = variable_get('comment_block_count', 10);
   foreach (comment_get_recent($number) as $comment) {
-    $items[] = l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) . '&nbsp;<span>' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</span>';
+    $items[] = l('comment/' . $comment->cid, $comment->subject, array('fragment' => 'comment-' . $comment->cid)) . '&nbsp;<span>' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</span>';
   }
 
   if ($items) {
@@ -1659,10 +1659,10 @@ function template_preprocess_comment(&$variables) {
   $variables['signature'] = $comment->signature;
 
   $uri = $comment->uri();
-  $uri['options'] += array('attributes' => array('class' => 'permalink', 'rel' => 'bookmark'));
+  $uri['attributes'] += array('class' => array('permalink'), 'rel' => 'bookmark');
 
-  $variables['title'] = l($comment->subject, $uri['path'], $uri['options']);
-  $variables['permalink'] = l(t('Permalink'), $uri['path'], $uri['options']);
+  $variables['title'] = l($uri['path'], $comment->subject, $uri['options'], $uri['attributes']);
+  $variables['permalink'] = l($uri['path'], t('Permalink'), $uri['options'], $uri['attributes']);
   $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['created']));
 
   if ($comment->pid > 0) {
@@ -1673,9 +1673,9 @@ function template_preprocess_comment(&$variables) {
     $variables['parent_created'] = format_date($comment_parent->created);
     $variables['parent_changed'] = format_date($comment_parent->changed);
     $uri_parent = $comment_parent->uri();
-    $uri_parent['options'] += array('attributes' => array('class' => 'permalink', 'rel' => 'bookmark'));
-    $variables['parent_title'] = l($comment_parent->subject, $uri_parent['path'], $uri_parent['options']);
-    $variables['parent_permalink'] = l(t('Parent permalink'), $uri_parent['path'], $uri_parent['options']);
+    $uri_parent['attributes'] += array('class' => array('permalink'), 'rel' => 'bookmark');
+    $variables['parent_title'] = l($comment_parent->subject, $uri_parent['path'], $uri_parent['options'], $uri_parent['attributes']);
+    $variables['parent_permalink'] = l(t('Parent permalink'), $uri_parent['path'], $uri_parent['options'], $uri_parent['attributes']);
     $variables['parent'] = t('In reply to !parent_title by !parent_username',
         array('!parent_username' => $variables['parent_author'], '!parent_title' => $variables['parent_title']));
   }
diff --git a/core/modules/comment/comment.pages.inc b/core/modules/comment/comment.pages.inc
index 6263660..60de9a9 100644
--- a/core/modules/comment/comment.pages.inc
+++ b/core/modules/comment/comment.pages.inc
@@ -36,7 +36,7 @@
  */
 function comment_reply(Node $node, $pid = NULL) {
   // Set the breadcrumb trail.
-  drupal_set_breadcrumb(array(l(t('Home'), NULL), l($node->label(), 'node/' . $node->nid)));
+  drupal_set_breadcrumb(array(l(NULL, t('Home')), l('node/' . $node->nid, $node->label())));
   $op = isset($_POST['op']) ? $_POST['op'] : '';
   $build = array();
 
diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
index f1f910e..87b5d89 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
@@ -346,7 +346,7 @@ public function save(array $form, array &$form_state) {
       $form_state['values']['cid'] = $comment->cid;
 
       // Add an entry to the watchdog log.
-      watchdog('content', 'Comment posted: %subject.', array('%subject' => $comment->subject), WATCHDOG_NOTICE, l(t('view'), 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)));
+      watchdog('content', 'Comment posted: %subject.', array('%subject' => $comment->subject), WATCHDOG_NOTICE, l('comment/' . $comment->cid, t('view'), array('fragment' => 'comment-' . $comment->cid)));
 
       // Explain the approval queue if necessary.
       if ($comment->status == COMMENT_NOT_PUBLISHED) {
diff --git a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php
index 3920cec..d5f85a7 100644
--- a/core/modules/contact/lib/Drupal/contact/CategoryFormController.php
+++ b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php
@@ -99,11 +99,11 @@ public function save(array $form, array &$form_state) {
 
     if ($status == SAVED_UPDATED) {
       drupal_set_message(t('Category %label has been updated.', array('%label' => $category->label())));
-      watchdog('contact', 'Category %label has been updated.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), $category->uri() . '/edit'));
+      watchdog('contact', 'Category %label has been updated.', array('%label' => $category->label()), WATCHDOG_NOTICE, l($category->uri() . '/edit', t('Edit')));
     }
     else {
       drupal_set_message(t('Category %label has been added.', array('%label' => $category->label())));
-      watchdog('contact', 'Category %label has been added.', array('%label' => $category->label()), WATCHDOG_NOTICE, l(t('Edit'), $category->uri() . '/edit'));
+      watchdog('contact', 'Category %label has been added.', array('%label' => $category->label()), WATCHDOG_NOTICE, l($category->uri() . '/edit', t('Edit')));
     }
 
     // Update the default category.
diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc
index 3b56f45..e8ce974 100644
--- a/core/modules/dblog/dblog.admin.inc
+++ b/core/modules/dblog/dblog.admin.inc
@@ -299,7 +299,7 @@ function theme_dblog_message($variables) {
     if ($variables['link'] && isset($event->wid)) {
       // Truncate message to 56 chars.
       $output = truncate_utf8(filter_xss($output, array()), 56, TRUE, TRUE);
-      $output = l($output, 'admin/reports/event/' . $event->wid, array('html' => TRUE));
+      $output = l('admin/reports/event/' . $event->wid, $output, array('html' => TRUE));
     }
   }
   return $output;
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index ac0d1b4..079a428 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -287,7 +287,7 @@ function field_help($path, $arg) {
       foreach ($modules as $module) {
         $display = $info[$module]['name'];
         if (module_hook($module, 'help')) {
-          $items['items'][] = l($display, 'admin/help/' . $module);
+          $items['items'][] = l('admin/help/' . $module, $display);
         }
         else {
           $items['items'][] = $display;
diff --git a/core/modules/field/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php b/core/modules/field/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php
index acca988..31aeaa9 100644
--- a/core/modules/field/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php
+++ b/core/modules/field/modules/link/lib/Drupal/link/Tests/LinkFieldTest.php
@@ -198,7 +198,7 @@ function testLinkTitle() {
     $this->assertRaw(t('test_entity @id has been updated.', array('@id' => $id)));
 
     $this->renderTestEntity($id);
-    $expected_link = l($title, $value);
+    $expected_link = l($value, $title);
     $this->assertRaw($expected_link);
   }
 
diff --git a/core/modules/field/modules/link/link.module b/core/modules/field/modules/link/link.module
index 947c2e9..5a5d779 100644
--- a/core/modules/field/modules/link/link.module
+++ b/core/modules/field/modules/link/link.module
@@ -384,7 +384,8 @@ function theme_link_formatter_link_separate($vars) {
   if (!empty($vars['title'])) {
     $output .= '<div class="link-title">' . check_plain($vars['title']) . '</div>';
   }
-  $output .= '<div class="link-url">' . l($vars['url_title'], $vars['href'], $vars['options']) . '</div>';
+  // @todo: Make sure $vars['attributes'] is set (removed from $vars['options']['attributes'];
+  $output .= '<div class="link-url">' . l($vars['href'], $vars['url_title'], $vars['options'], $vars['attributes']) . '</div>';
   $output .= '</div>';
   return $output;
 }
diff --git a/core/modules/field_ui/field_ui.admin.inc b/core/modules/field_ui/field_ui.admin.inc
index d301d76..4aacbb3 100644
--- a/core/modules/field_ui/field_ui.admin.inc
+++ b/core/modules/field_ui/field_ui.admin.inc
@@ -42,7 +42,7 @@ function field_ui_fields_list() {
 
         // Add the current instance.
         $admin_path = _field_ui_bundle_admin_path($entity_type, $bundle);
-        $rows[$field_name]['data'][2][] = $admin_path ? l($bundles[$entity_type][$bundle]['label'], $admin_path . '/fields') : $bundles[$entity_type][$bundle]['label'];
+        $rows[$field_name]['data'][2][] = $admin_path ? l($admin_path . '/fields', $bundles[$entity_type][$bundle]['label']) : $bundles[$entity_type][$bundle]['label'];
       }
     }
   }
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 6694598..92442c8 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -1250,12 +1250,12 @@ function theme_file_link($variables) {
   // theme_file_icon() requires a file entity, make sure it gets one.
   $icon = theme('file_icon', array('file' => ($file instanceof File) ? $file : file_load($file->fid), 'icon_directory' => $icon_directory));
 
-  // Set options as per anchor format described at
+  $options = array();
+  // Set attributes as per anchor format described at
   // http://microformats.org/wiki/file-format-examples
-  $options = array(
-    'attributes' => array(
-      'type' => $file->filemime . '; length=' . $file->filesize,
-    ),
+  $attributes = array(
+    'type' => $file->filemime,
+    'length' => $file->filesize,
   );
 
   // Use the description as the link text if available.
@@ -1264,10 +1264,10 @@ function theme_file_link($variables) {
   }
   else {
     $link_text = $file->description;
-    $options['attributes']['title'] = check_plain($file->filename);
+    $attributes['title'] = check_plain($file->filename);
   }
 
-  return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
+  return '<span class="file">' . $icon . ' ' . l($url, $link_text, $options, $attributes) . '</span>';
 }
 
 /**
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index b55066f..0363362 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -388,7 +388,7 @@ function filter_permission() {
     if (!empty($permission)) {
       // Only link to the text format configuration page if the user who is
       // viewing this will have access to that page.
-      $format_name_replacement = user_access('administer filters') ? l($format->name, 'admin/config/content/formats/' . $format->format) : drupal_placeholder($format->name);
+      $format_name_replacement = user_access('administer filters') ? l('admin/config/content/formats/' . $format->format, $format->name) : drupal_placeholder($format->name);
       $perms[$permission] = array(
         'title' => t("Use the !text_format text format", array('!text_format' => $format_name_replacement,)),
         'description' => drupal_placeholder(t('Warning: This permission may have security implications depending on how the text format is configured.')),
@@ -1267,7 +1267,7 @@ function filter_dom_serialize_escape_cdata_element($dom_document, $dom_element,
  * @ingroup themeable
  */
 function theme_filter_tips_more_info() {
-  return '<p>' . l(t('More information about text formats'), 'filter/tips', array('attributes' => array('target' => '_blank'))) . '</p>';
+  return '<p>' . l('filter/tips', t('More information about text formats'), array(), array('target' => '_blank')) . '</p>';
 }
 
 /**
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 459cbeb..b496518 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -268,12 +268,12 @@ function forum_node_view(Node $node, $view_mode) {
   if (_forum_node_check_node_type($node)) {
     if ($view_mode == 'full' && node_is_page($node)) {
       // Breadcrumb navigation
-      $breadcrumb[] = l(t('Home'), NULL);
-      $breadcrumb[] = l($vocabulary->name, 'forum');
+      $breadcrumb[] = l(NULL, t('Home'));
+      $breadcrumb[] = l('forum', $vocabulary->name);
       if ($parents = taxonomy_term_load_parents_all($node->forum_tid)) {
         $parents = array_reverse($parents);
         foreach ($parents as $parent) {
-          $breadcrumb[] = l($parent->label(), 'forum/' . $parent->tid);
+          $breadcrumb[] = l('forum/' . $parent->tid, $parent->label());
         }
       }
       drupal_set_breadcrumb($breadcrumb);
@@ -1074,9 +1074,9 @@ function template_preprocess_forums(&$variables) {
   $title = !empty($vocabulary->name) ? $vocabulary->name : '';
 
   // Breadcrumb navigation:
-  $breadcrumb[] = l(t('Home'), NULL);
+  $breadcrumb[] = l(NULL, t('Home'));
   if ($variables['tid']) {
-    $breadcrumb[] = l($vocabulary->name, 'forum');
+    $breadcrumb[] = l('forum', $vocabulary->name);
   }
   if ($variables['parents']) {
     $variables['parents'] = array_reverse($variables['parents']);
@@ -1085,7 +1085,7 @@ function template_preprocess_forums(&$variables) {
         $title = $p->label();
       }
       else {
-        $breadcrumb[] = l($p->label(), 'forum/' . $p->tid);
+        $breadcrumb[] = l('forum/' . $p->tid, $p->label());
       }
     }
   }
@@ -1218,11 +1218,11 @@ function template_preprocess_forum_topic_list(&$variables) {
       if ($variables['tid'] != $topic->forum_tid) {
         $variables['topics'][$id]->moved = TRUE;
         $variables['topics'][$id]->title = check_plain($topic->title);
-        $variables['topics'][$id]->message = l(t('This topic has been moved'), "forum/$topic->forum_tid");
+        $variables['topics'][$id]->message = l("forum/$topic->forum_tid", t('This topic has been moved'));
       }
       else {
         $variables['topics'][$id]->moved = FALSE;
-        $variables['topics'][$id]->title = l($topic->title, "node/$topic->nid");
+        $variables['topics'][$id]->title = l("node/$topic->nid", $topic->title);
         $variables['topics'][$id]->message = '';
       }
       $variables['topics'][$id]->created = theme('forum_submitted', array('topic' => $topic));
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
index f56cfbb..5ec9008 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
@@ -527,10 +527,10 @@ private function verifyForums($node_user, Node $node, $admin, $response = 200) {
     $this->assertResponse(200);
     $this->assertTitle($node->label() . ' | Drupal', 'Forum node was displayed');
     $breadcrumb = array(
-      l(t('Home'), NULL),
-      l(t('Forums'), 'forum'),
-      l($this->container['name'], 'forum/' . $this->container['tid']),
-      l($this->forum['name'], 'forum/' . $this->forum['tid']),
+      l(NULL, t('Home')),
+      l('forum', t('Forums')),
+      l('forum/' . $this->container['tid'], $this->container['name']),
+      l('forum/' . $this->forum['tid'], $this->forum['name']),
     );
     $this->assertRaw(theme('breadcrumb', array('breadcrumb' => $breadcrumb)), 'Breadcrumbs were displayed');
 
@@ -582,11 +582,11 @@ private function verifyForumView($forum, $parent = NULL) {
     $this->assertTitle($forum['name'] . ' | Drupal', 'Forum name was displayed');
 
     $breadcrumb = array(
-      l(t('Home'), NULL),
-      l(t('Forums'), 'forum'),
+      l(NULL, t('Home')),
+      l('forum', t('Forums')),
     );
     if (isset($parent)) {
-      $breadcrumb[] = l($parent['name'], 'forum/' . $parent['tid']);
+      $breadcrumb[] = l('forum/' . $parent['tid'], $parent['name']);
     }
 
     $this->assertRaw(theme('breadcrumb', array('breadcrumb' => $breadcrumb)), 'Breadcrumbs were displayed');
diff --git a/core/modules/help/help.admin.inc b/core/modules/help/help.admin.inc
index a3bea9e..8177750 100644
--- a/core/modules/help/help.admin.inc
+++ b/core/modules/help/help.admin.inc
@@ -44,8 +44,9 @@ function help_page($name) {
     $admin_tasks = system_get_module_admin_tasks($name, $info[$name]);
     if (!empty($admin_tasks)) {
       $links = array();
+      // @todo: Make sure $task['localized_options']['attributes'] are moved to $task['attributes'].
       foreach ($admin_tasks as $task) {
-        $links[] = l($task['title'], $task['link_path'], $task['localized_options']);
+        $links[] = l($task['link_path'], $task['title'], $task['localized_options']);
       }
       $output .= theme('item_list', array('items' => $links, 'title' => t('@module administration pages', array('@module' => $info[$name]['name']))));
     }
@@ -77,7 +78,7 @@ function help_links_as_list() {
   $output = '<div class="clearfix"><div class="help-items"><ul>';
   $i = 0;
   foreach ($modules as $module => $name) {
-    $output .= '<li>' . l($name, 'admin/help/' . $module) . '</li>';
+    $output .= '<li>' . l('admin/help/' . $module, $name) . '</li>';
     if (($i + 1) % $break == 0 && ($i + 1) != $count) {
       $output .= '</ul></div><div class="help-items' . ($i + 1 == $break * 3 ? ' help-items-last' : '') . '"><ul>';
     }
diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc
index 933a4ad..19d0186 100644
--- a/core/modules/image/image.admin.inc
+++ b/core/modules/image/image.admin.inc
@@ -601,7 +601,7 @@ function theme_image_style_list($variables) {
 
   foreach ($styles as $style) {
     $row = array();
-    $row[] = l($style->label(), 'admin/config/media/image-styles/edit/' . $style->id());
+    $row[] = l('admin/config/media/image-styles/edit/' . $style->id(), $style->label());
     $links = array();
     $links['edit'] = array(
       'title' => t('edit'),
@@ -738,7 +738,7 @@ function theme_image_style_preview($variables) {
   // Build the preview of the original image.
   $original_url = file_create_url($original_path);
   $output .= '<div class="preview-image-wrapper">';
-  $output .= t('original') . ' (' . l(t('view actual size'), $original_url) . ')';
+  $output .= t('original') . ' (' . l($original_url, t('view actual size')) . ')';
   $output .= '<div class="preview-image original-image" style="' . $original_attributes['style'] . '">';
   $output .= '<a href="' . $original_url . '">' . theme('image', array('uri' => $original_path, 'alt' => t('Sample original image'), 'title' => '', 'attributes' => $original_attributes)) . '</a>';
   $output .= '<div class="height" style="height: ' . $original_height . 'px"><span>' . $original_image['height'] . 'px</span></div>';
@@ -749,7 +749,7 @@ function theme_image_style_preview($variables) {
   // Build the preview of the image style.
   $preview_url = file_create_url($preview_file) . '?cache_bypass=' . REQUEST_TIME;
   $output .= '<div class="preview-image-wrapper">';
-  $output .= check_plain($style->label()) . ' (' . l(t('view actual size'), file_create_url($preview_file) . '?' . time()) . ')';
+  $output .= check_plain($style->label()) . ' (' . l(file_create_url($preview_file) . '?' . time(), t('view actual size')) . ')';
   $output .= '<div class="preview-image modified-image" style="' . $preview_attributes['style'] . '">';
   $output .= '<a href="' . file_create_url($preview_file) . '?' . time() . '">' . theme('image', array('uri' => $preview_url, 'alt' => t('Sample modified image'), 'title' => '', 'attributes' => $preview_attributes)) . '</a>';
   $output .= '<div class="height" style="height: ' . $preview_height . 'px"><span>' . $preview_image['height'] . 'px</span></div>';
diff --git a/core/modules/image/image.field.inc b/core/modules/image/image.field.inc
index da7f3ee..6c365d6 100644
--- a/core/modules/image/image.field.inc
+++ b/core/modules/image/image.field.inc
@@ -604,7 +604,7 @@ function theme_image_formatter($variables) {
     $options = isset($variables['path']['options']) ? $variables['path']['options'] : array();
     // When displaying an image inside a link, the html option must be TRUE.
     $options['html'] = TRUE;
-    $output = l($output, $path, $options);
+    $output = l($path, $output, $options);
   }
 
   return $output;
diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php
index c07acf6..da5bd88 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageFieldDisplayTest.php
@@ -69,7 +69,7 @@ function _testImageFieldFormatters($scheme) {
     $instance['display']['default']['type'] = 'image';
     $instance['display']['default']['settings']['image_link'] = 'file';
     field_update_instance($instance);
-    $default_output = l(theme('image', $image_info), file_create_url($image_uri), array('html' => TRUE));
+    $default_output = l(file_create_url($image_uri), theme('image', $image_info), array('html' => TRUE));
     $this->drupalGet('node/' . $nid);
     $this->assertRaw($default_output, 'Image linked to file formatter displaying correctly on full node view.');
     // Verify that the image can be downloaded.
@@ -93,7 +93,7 @@ function _testImageFieldFormatters($scheme) {
     // Test the image linked to content formatter.
     $instance['display']['default']['settings']['image_link'] = 'content';
     field_update_instance($instance);
-    $default_output = l(theme('image', $image_info), 'node/' . $nid, array('html' => TRUE, 'attributes' => array('class' => 'active')));
+    $default_output = l('node/' . $nid, theme('image', $image_info), array('html' => TRUE), array('class' => array('active')));
     $this->drupalGet('node/' . $nid);
     $this->assertRaw($default_output, 'Image linked to content formatter displaying correctly on full node view.');
 
diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install
index f01935a..0faf768 100644
--- a/core/modules/locale/locale.install
+++ b/core/modules/locale/locale.install
@@ -383,7 +383,7 @@ function locale_update_8003() {
       }
       if (array_key_exists($domain, $used_domains)) {
         if (empty($message)) {
-          $message = 'Some languages are using the same domain name, you should change these domain names at ' . l('URL language detection configuration', 'admin/config/regional/language/configure/url' . '.');
+          $message = 'Some languages are using the same domain name, you should change these domain names at ' . l('admin/config/regional/language/configure/url', 'URL language detection configuration') . '.';
         }
       }
       else {
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 85ed5d1..98bf548 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -613,12 +613,12 @@ function locale_form_language_admin_overview_form_alter(&$form, &$form_state) {
     if (!$language->locked && ($langcode != 'en' || locale_translate_english())) {
       $form['languages'][$langcode]['locale_statistics'] = array(
         '#markup' => l(
+          'admin/config/regional/translate/translate',
           t('@translated/@total (@ratio%)', array(
             '@translated' => $stats[$langcode]['translated'],
             '@total' => $total_strings,
             '@ratio' => $stats[$langcode]['ratio'],
           )),
-          'admin/config/regional/translate/translate',
           array('query' => array('langcode' => $langcode))
         ),
       );
diff --git a/core/modules/menu/menu.admin.inc b/core/modules/menu/menu.admin.inc
index 3b67b97..3f8de03 100644
--- a/core/modules/menu/menu.admin.inc
+++ b/core/modules/menu/menu.admin.inc
@@ -121,7 +121,8 @@ function _menu_overview_tree_form($tree, $delta = 50) {
       $mlid = 'mlid:' . $item['mlid'];
       $form[$mlid]['#item'] = $item;
       $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => array('menu-disabled')) : array('class' => array('menu-enabled'));
-      $form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']);
+      // @todo: Make sure any $item['localized_options']['attributes'] becomes $item['attributes'].
+      $form[$mlid]['title']['#markup'] = l($item['href'], $item['title'], $item['localized_options']);
       if ($item['hidden']) {
         $form[$mlid]['title']['#markup'] .= ' (' . t('disabled') . ')';
       }
@@ -304,7 +305,7 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) {
 
     // Get the current breadcrumb and add a link to that menu's overview page.
     $breadcrumb = menu_get_active_breadcrumb();
-    $breadcrumb[] = l($current_title, 'admin/structure/menu/manage/' . $item['menu_name']);
+    $breadcrumb[] = l('admin/structure/menu/manage/' . $item['menu_name'], $current_title);
     drupal_set_breadcrumb($breadcrumb);
   }
   $form['actions'] = array('#type' => 'actions');
@@ -350,13 +351,14 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) {
     $form['_path'] = array(
       '#type' => 'item',
       '#title' => t('Path'),
-      '#description' => l($item['link_title'], $item['href'], $item['options']),
+      '#description' => l($item['href'], $item['link_title'], $item['options'], $item['attributes']),
     );
   }
+  // @todo: Make sure $item['attributes'] is set (changed from $item['options']['attributes'];
   $form['description'] = array(
     '#type' => 'textarea',
     '#title' => t('Description'),
-    '#default_value' => isset($item['options']['attributes']['title']) ? $item['options']['attributes']['title'] : '',
+    '#default_value' => isset($item['attributes']['title']) ? $item['attributes']['title'] : '',
     '#rows' => 1,
     '#description' => t('Shown when hovering over the menu link.'),
   );
diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc
index 999de7f..3516058 100644
--- a/core/modules/node/content_types.inc
+++ b/core/modules/node/content_types.inc
@@ -405,7 +405,7 @@ function node_type_form_submit($form, &$form_state) {
   elseif ($status == SAVED_NEW) {
     node_add_body_field($type);
     drupal_set_message(t('The content type %name has been added.', $t_args));
-    watchdog('node', 'Added content type %name.', $t_args, WATCHDOG_NOTICE, l(t('view'), 'admin/structure/types'));
+    watchdog('node', 'Added content type %name.', $t_args, WATCHDOG_NOTICE, l('admin/structure/types', t('view')));
   }
 
   $form_state['redirect'] = 'admin/structure/types';
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index 215ad81..92ded51 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -357,7 +357,7 @@ public function save(array $form, array &$form_state) {
     $node = $this->getEntity($form_state);
     $insert = empty($node->nid);
     $node->save();
-    $node_link = l(t('view'), 'node/' . $node->nid);
+    $node_link = l('node/' . $node->nid, t('view'));
     $watchdog_args = array('@type' => $node->type, '%title' => $node->label());
     $t_args = array('@type' => node_get_type_label($node), '%title' => $node->label());
 
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index bca4dc2..5568a84 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -354,7 +354,7 @@ function _node_mass_update_batch_process($nodes, $updates, &$context) {
     $node = _node_mass_update_helper($nid, $updates);
 
     // Store result for post-processing in the finished callback.
-    $context['results'][] = l($node->label(), 'node/' . $node->nid);
+    $context['results'][] = l('node/' . $node->nid, $node->label());
 
     // Update our progress information.
     $context['sandbox']['progress']++;
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index c139952..cdbfb8c 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -1300,9 +1300,9 @@ function hook_validate(Drupal\node\Node $node, $form, &$form_state) {
 function hook_view(Drupal\node\Node $node, $view_mode) {
   if ($view_mode == 'full' && node_is_page($node)) {
     $breadcrumb = array();
-    $breadcrumb[] = l(t('Home'), NULL);
-    $breadcrumb[] = l(t('Example'), 'example');
-    $breadcrumb[] = l($node->field1, 'example/' . $node->field1);
+    $breadcrumb[] = l(NULL, t('Home'));
+    $breadcrumb[] = l('example', t('Example'));
+    $breadcrumb[] = l('example/' . $node->field1, $node->field1);
     drupal_set_breadcrumb($breadcrumb);
   }
 
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 5415312..b752ad4 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -294,7 +294,7 @@ function node_title_list($result, $title = NULL) {
   $num_rows = FALSE;
   foreach ($result as $node) {
     // Do not use $node->label() here, because $node comes from the database.
-    $items[] = l($node->title, 'node/' . $node->nid, !empty($node->comment_count) ? array('attributes' => array('title' => format_plural($node->comment_count, '1 comment', '@count comments'))) : array());
+    $items[] = l('node/' . $node->nid, $node->title, array(), !empty($node->comment_count) ? array('title' => format_plural($node->comment_count, '1 comment', '@count comments')) : array());
     $num_rows = TRUE;
   }
 
@@ -2051,13 +2051,13 @@ function theme_node_recent_block($variables) {
     );
     if (node_access('update', $node)) {
       $row[] = array(
-        'data' => l(t('edit'), 'node/' . $node->nid . '/edit', $l_options),
+        'data' => l('node/' . $node->nid . '/edit', t('edit'), $l_options),
         'class' => 'edit',
       );
     }
     if (node_access('delete', $node)) {
       $row[] = array(
-        'data' => l(t('delete'), 'node/' . $node->nid . '/delete', $l_options),
+        'data' => l('node/' . $node->nid . '/delete', t('delete'), $l_options),
         'class' => 'delete',
       );
     }
@@ -2087,7 +2087,7 @@ function theme_node_recent_content($variables) {
   $node = $variables['node'];
 
   $output = '<div class="node-title">';
-  $output .= l($node->label(), 'node/' . $node->nid);
+  $output .= l('node/' . $node->nid, $node->label());
   $output .= theme('mark', array('type' => node_mark($node->nid, $node->changed)));
   $output .= '</div><div class="node-author">';
   $output .= theme('username', array('account' => user_load($node->uid)));
@@ -2412,7 +2412,7 @@ function node_page_default() {
 
     $default_links = array();
     if (_node_add_access()) {
-      $default_links[] = l(t('Add new content'), 'node/add');
+      $default_links[] = l('node/add', t('Add new content'));
     }
     if (!empty($default_links)) {
       $default_message .= theme('item_list', array('items' => $default_links));
@@ -3768,7 +3768,7 @@ function node_requirements($phase) {
     $requirements['node_access'] = array(
       'title' => t('Node Access Permissions'),
       'value' => $value,
-      'description' => $description . ' ' . l(t('Rebuild permissions'), 'admin/reports/status/rebuild'),
+      'description' => $description . ' ' . l('admin/reports/status/rebuild', t('Rebuild permissions')),
     );
   }
   return $requirements;
diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc
index a71f5eb..8cd9234 100644
--- a/core/modules/node/node.pages.inc
+++ b/core/modules/node/node.pages.inc
@@ -73,7 +73,7 @@ function theme_node_add_list($variables) {
   if ($content) {
     $output = '<dl class="node-type-list">';
     foreach ($content as $type) {
-      $output .= '<dt>' . l($type->name, 'node/add/' . $type->type) . '</dt>';
+      $output .= '<dt>' . l('node/add/' . $type->type, $type->name) . '</dt>';
       $output .= '<dd>' . filter_xss_admin($type->description) . '</dd>';
     }
     $output .= '</dl>';
@@ -268,13 +268,13 @@ function node_revision_overview($node) {
   foreach ($revisions as $revision) {
     $row = array();
     if ($revision->current_vid > 0) {
-      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = array('data' => t('!date by !username', array('!date' => l("node/$node->nid", format_date($revision->timestamp, 'short')), '!username' => theme('username', array('account' => $revision))))
                                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : ''),
                      'class' => array('revision-current'));
       $row[] = array('data' => drupal_placeholder(t('current revision')), 'class' => array('revision-current'));
     }
     else {
-      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = t('!date by !username', array('!date' => l("node/$node->nid/revisions/$revision->vid/view", format_date($revision->timestamp, 'short')), '!username' => theme('username', array('account' => $revision))))
                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : '');
       if ($revert_permission) {
         $links['revert'] = array(
diff --git a/core/modules/openid/openid.module b/core/modules/openid/openid.module
index ada4933..265f7fc 100644
--- a/core/modules/openid/openid.module
+++ b/core/modules/openid/openid.module
@@ -144,7 +144,7 @@ function openid_block_view_user_login_alter(&$block) {
 
   // Put an OpenID link as a first element.
   $block['content']['user_links']['#items'] = array(
-    l(t('Log in using OpenID'), 'user/login/openid', array(
+    l('user/login/openid', t('Log in using OpenID'), array(), array(
       'attributes' => array(
         'title' => t('Log in using OpenID.'),
         'class' => array('openid-link'),
@@ -170,7 +170,7 @@ function openid_login_form($form) {
     '#type' => 'textfield',
     '#title' => t('OpenID'),
     '#maxlength' => 255,
-    '#description' => l(t('What is OpenID?'), 'http://openid.net/', array('external' => TRUE)),
+    '#description' => l('http://openid.net/', t('What is OpenID?'), array('external' => TRUE)),
     '#required' => TRUE,
   );
 
diff --git a/core/modules/path/path.admin.inc b/core/modules/path/path.admin.inc
index 32c5e4d..cd30805 100644
--- a/core/modules/path/path.admin.inc
+++ b/core/modules/path/path.admin.inc
@@ -44,13 +44,8 @@ function path_admin_overview($keys = NULL) {
   $destination = drupal_get_destination();
   foreach ($result as $data) {
     $row = array();
-    $row['data']['alias'] = l(truncate_utf8($data->alias, 50, FALSE, TRUE), $data->source, array(
-      'attributes' => array('title' => $data->alias),
-    ));
-    $row['data']['source'] = l(truncate_utf8($data->source, 50, FALSE, TRUE), $data->source, array(
-      'alias' => TRUE,
-      'attributes' => array('title' => $data->source),
-    ));
+    $row['data']['alias'] = l($data->source, truncate_utf8($data->alias, 50, FALSE, TRUE), array(), array('title' => $data->alias));
+    $row['data']['source'] = l($data->source, truncate_utf8($data->source, 50, FALSE, TRUE), array('alias' => TRUE), array('title' => $data->source));
     if ($multilanguage) {
       $row['data']['language_name'] = language_name($data->langcode);
     }
diff --git a/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php b/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php
index 69b0231..746966e 100644
--- a/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php
+++ b/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php
@@ -141,7 +141,7 @@ public function _testPictureFieldFormatters($scheme) {
     $instance['display']['default']['module'] = 'picture';
     $instance['display']['default']['settings']['image_link'] = 'file';
     field_update_instance($instance);
-    $default_output = l(theme('image', $image_info), file_create_url($image_uri), array('html' => TRUE));
+    $default_output = l(file_create_url($image_uri), theme('image', $image_info), array('html' => TRUE));
     $this->drupalGet('node/' . $nid);
     $this->assertRaw($default_output, 'Image linked to file formatter displaying correctly on full node view.');
     // Verify that the image can be downloaded.
diff --git a/core/modules/picture/picture.module b/core/modules/picture/picture.module
index e5a66dd..159e8ea 100644
--- a/core/modules/picture/picture.module
+++ b/core/modules/picture/picture.module
@@ -223,7 +223,12 @@ function theme_picture_formatter($variables) {
     $path = $variables['path']['path'];
     $options = isset($variables['path']['options']) ? $variables['path']['options'] : array();
     $options['html'] = TRUE;
-    $output = l($output, $path, $options);
+    // @todo: Make sure attributes aren't in options['attributes'];
+    if (isset($options['attributes'])) {
+      $attributes = $options['attributes'];
+      unset($options['attributes']);
+    }
+    $output = l($path, $output, $options, $attributes);
   }
   return $output;
 }
diff --git a/core/modules/poll/poll.pages.inc b/core/modules/poll/poll.pages.inc
index b67d8f9..d4cdd89 100644
--- a/core/modules/poll/poll.pages.inc
+++ b/core/modules/poll/poll.pages.inc
@@ -44,7 +44,7 @@ function poll_page() {
   $output = '<ul>';
   // Do not use $node->label() here because $node comes from the database.
   foreach ($queried_nodes as $node) {
-    $output .= '<li>' . l($node->title, "node/$node->nid") . ' - ' . format_plural($node->votes, '1 vote', '@count votes') . ' - ' . ($node->active ? t('open') : t('closed')) . '</li>';
+    $output .= '<li>' . l("node/$node->nid", $node->title) . ' - ' . format_plural($node->votes, '1 vote', '@count votes') . ' - ' . ($node->active ? t('open') : t('closed')) . '</li>';
   }
   $output .= '</ul>';
   $output .= theme('pager');
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
index 066da60..8dd302f 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
@@ -44,7 +44,7 @@ function setUp() {
     // also needs the word "pizza" so we can use it as the search keyword.
     $langcode = LANGUAGE_NOT_SPECIFIED;
     $body_key = "body[$langcode][0][value]";
-    $edit[$body_key] = l($node->label(), 'node/' . $node->nid) . ' pizza sandwich';
+    $edit[$body_key] = l('node/' . $node->nid, $node->label()) . ' pizza sandwich';
     $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
 
     node_update_index();
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
index a57e483..2691e34 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
@@ -129,7 +129,7 @@ function testHTMLRankings() {
     foreach ($shuffled_tags as $tag) {
       switch ($tag) {
         case 'a':
-          $settings['body'] = array(LANGUAGE_NOT_SPECIFIED => array(array('value' => l('Drupal Rocks', 'node'), 'format' => 'full_html')));
+          $settings['body'] = array(LANGUAGE_NOT_SPECIFIED => array(array('value' => l('node', 'Drupal Rocks'), 'format' => 'full_html')));
           break;
         case 'notag':
           $settings['body'] = array(LANGUAGE_NOT_SPECIFIED => array(array('value' => 'Drupal Rocks')));
diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc
index b6a1930..543c1dd 100644
--- a/core/modules/search/search.pages.inc
+++ b/core/modules/search/search.pages.inc
@@ -59,7 +59,7 @@ function search_view($module = NULL, $keys = '') {
     // Only search if there are keywords or non-empty conditions.
     if ($keys || !empty($conditions)) {
       // Log the search keys.
-      watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys));
+      watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l('search/' . $info['path'] . '/' . $keys, t('results')));
 
       // Collect the search results.
       $results = search_data($keys, $info['module'], $conditions);
diff --git a/core/modules/shortcut/shortcut.admin.inc b/core/modules/shortcut/shortcut.admin.inc
index e805acf..1f007c0 100644
--- a/core/modules/shortcut/shortcut.admin.inc
+++ b/core/modules/shortcut/shortcut.admin.inc
@@ -274,7 +274,7 @@ function shortcut_set_customize($form, &$form_state, $shortcut_set) {
 
   foreach ($shortcut_set->links as $link) {
     $mlid = $link['mlid'];
-    $form['shortcuts']['links'][$mlid]['name']['#markup'] = l($link['link_title'], $link['link_path']);
+    $form['shortcuts']['links'][$mlid]['name']['#markup'] = l($link['link_path'], $link['link_title']);
     $form['shortcuts']['links'][$mlid]['weight'] = array(
       '#type' => 'weight',
       '#title' => t('Weight'),
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index 9bbb12a..1fb8795 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -743,7 +743,7 @@ function shortcut_toolbar_pre_render($toolbar) {
       '#type' => 'link',
       '#title' => t('Edit shortcuts'),
       '#href' => 'admin/config/user-interface/shortcut/' . $shortcut_set->set_name,
-      '#options' => array('attributes' => array('id' => 'edit-shortcuts')),
+      '#attributes' => array('id' => 'edit-shortcuts'),
     );
   }
 
diff --git a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
index 80e6c38..c69be7e 100644
--- a/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
+++ b/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
@@ -100,6 +100,6 @@ function testPopularContentBlock() {
     $this->assertText('All time', 'Found the all time popular content.');
     $this->assertText('Last viewed', 'Found the last viewed popular content.');
 
-    $this->assertRaw(l($node->label(), 'node/' . $node->nid), 'Found link to visited node.');
+    $this->assertRaw(l('node/' . $node->nid, $node->label()), 'Found link to visited node.');
   }
 }
diff --git a/core/modules/statistics/statistics.admin.inc b/core/modules/statistics/statistics.admin.inc
index bec1eb5..b2233b0 100644
--- a/core/modules/statistics/statistics.admin.inc
+++ b/core/modules/statistics/statistics.admin.inc
@@ -285,7 +285,8 @@ function statistics_access_log($aid) {
   if ($access) {
     $rows[] = array(
       array('data' => t('URL'), 'header' => TRUE),
-      l(url($access->path, array('absolute' => TRUE)), $access->path)
+      // @todo: Remove url(), pass 'absolute' in options()?
+      l($access->path, url($access->path, array('absolute' => TRUE)))
     );
     // It is safe to avoid filtering $access->title through check_plain because
     // it comes from drupal_get_title().
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index db45bee..5d87f4f 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -390,7 +390,7 @@ function statistics_block_view($delta = '') {
 function _statistics_link($path, $width = 35) {
   $title = drupal_get_path_alias($path);
   $title = truncate_utf8($title, $width, FALSE, TRUE);
-  return l($title, $path);
+  return l($path, $title);
 }
 
 /**
diff --git a/core/modules/syslog/syslog.module b/core/modules/syslog/syslog.module
index 8af77c1..316bbe2 100644
--- a/core/modules/syslog/syslog.module
+++ b/core/modules/syslog/syslog.module
@@ -46,7 +46,7 @@ function syslog_help($path, $arg) {
  */
 function syslog_form_system_logging_settings_alter(&$form, &$form_state) {
   $config = config('syslog.settings');
-  $help = module_exists('help') ? ' ' . l(t('More information'), 'admin/help/syslog') . '.' : NULL;
+  $help = module_exists('help') ? ' ' . l('admin/help/syslog', t('More information')) . '.' : NULL;
   $form['syslog_identity'] = array(
     '#type'          => 'textfield',
     '#title'         => t('Syslog identity'),
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php
index eeb49cc..d7fcdba 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php
@@ -33,7 +33,7 @@ public static function getInfo() {
   function testLXSS() {
     $text = $this->randomName();
     $path = "<SCRIPT>alert('XSS')</SCRIPT>";
-    $link = l($text, $path);
+    $link = l($path, $text);
     $sanitized_path = check_url(url($path));
     $this->assertTrue(strpos($link, $sanitized_path) !== FALSE, format_string('XSS attack @path was filtered', array('@path' => $path)));
   }
@@ -67,7 +67,7 @@ function testLActiveClass() {
    */
   function testLCustomClass() {
     $class = $this->randomName();
-    $link = l($this->randomName(), current_path(), array('attributes' => array('class' => array($class))));
+    $link = l(current_path(), $this->randomName(), array(), array('class' => array($class)));
     $this->assertTrue($this->hasClass($link, $class), format_string('Custom class @class is present on link when requested', array('@class' => $class)));
   }
 
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 6ba04f4..6fc55be 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -2296,6 +2296,9 @@ function theme_admin_block($variables) {
  *     contain the keys 'title', 'href', and 'localized_options', which are
  *     passed to l(). A 'description' key may also be provided.
  *
+ * @todo: Make sure $variables['attributes'] argument is supported
+ * (formerly $variables['localized_options']['attributes']).
+ *
  * @ingroup themeable
  */
 function theme_admin_block_content($variables) {
@@ -2309,7 +2312,7 @@ function theme_admin_block_content($variables) {
     }
     $output .= '<dl class="' . $class . '">';
     foreach ($content as $item) {
-      $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
+      $output .= '<dt>' . l($item['href'], $item['title'], $item['localized_options']) . '</dt>';
       if (!$compact && isset($item['description'])) {
         $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
       }
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index e4c4ce7..5f6846f 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -2536,7 +2536,7 @@ function hook_requirements($phase) {
   // Test PHP version
   $requirements['php'] = array(
     'title' => $t('PHP'),
-    'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(),
+    'value' => ($phase == 'runtime') ? l('admin/reports/status/php', phpversion()) : phpversion(),
   );
   if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) {
     $requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index e414238..ce5d747 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -60,7 +60,7 @@ function system_requirements($phase) {
   if (function_exists('phpinfo')) {
     $requirements['php'] = array(
       'title' => $t('PHP'),
-      'value' => ($phase == 'runtime') ? $phpversion .' ('. l($t('more information'), 'admin/reports/status/php') .')' : $phpversion,
+      'value' => ($phase == 'runtime') ? $phpversion .' ('. l('admin/reports/status/php', $t('more information')) .')' : $phpversion,
     );
   }
   else {
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 843ed78..f324cb1 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -3614,10 +3614,10 @@ function theme_system_powered_by() {
 function theme_system_compact_link() {
   $output = '<div class="compact-link">';
   if (system_admin_compact_mode()) {
-    $output .= l(t('Show descriptions'), 'admin/compact/off', array('attributes' => array('title' => t('Expand layout to include descriptions.')), 'query' => drupal_get_destination()));
+    $output .= l('admin/compact/off', t('Show descriptions'), array('query' => drupal_get_destination()), array('title' => t('Expand layout to include descriptions.')));
   }
   else {
-    $output .= l(t('Hide descriptions'), 'admin/compact/on', array('attributes' => array('title' => t('Compress layout by hiding descriptions.')), 'query' => drupal_get_destination()));
+    $output .= l('admin/compact/on', t('Hide descriptions'), array('query' => drupal_get_destination()), array('title' => t('Compress layout by hiding descriptions.')));
   }
   $output .= '</div>';
 
diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc
index a5e7ad2..e76f474 100644
--- a/core/modules/system/system.tokens.inc
+++ b/core/modules/system/system.tokens.inc
@@ -67,7 +67,7 @@ function system_token_info() {
   );
   $date['custom'] = array(
     'name' => t("Custom format"),
-    'description' => t("A date in a custom format. See !php-date for details.", array('!php-date' => l(t('the PHP documentation'), 'http://php.net/manual/function.date.php'))),
+    'description' => t("A date in a custom format. See !php-date for details.", array('!php-date' => l('http://php.net/manual/function.date.php', t('the PHP documentation')))),
   );
   $date['since'] = array(
     'name' => t("Time-since"),
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module
index f231b49..71acc0e 100644
--- a/core/modules/system/tests/modules/theme_test/theme_test.module
+++ b/core/modules/system/tests/modules/theme_test/theme_test.module
@@ -171,7 +171,7 @@ function _theme_test_list_operations() {
     '#rows' => array(),
   );
   // Add an item with a very long label, using common operations.
-  $build['#rows']['long']['label'] = l('An item with a very insanely long label, which offers quite a couple of common operations', 'item/long');
+  $build['#rows']['long']['label'] = l('item/long', 'An item with a very insanely long label, which offers quite a couple of common operations');
   $build['#rows']['long']['created'] = format_interval(3200);
   $build['#rows']['long']['operations'] = array(
     'data' => array(
@@ -199,12 +199,12 @@ function _theme_test_list_operations() {
   );
 
   // Add another item, using common operations.
-  $build['#rows']['another']['label'] = l('Another item, using common operations', 'item/another');
+  $build['#rows']['another']['label'] = l('item/another', 'Another item, using common operations');
   $build['#rows']['another']['created'] = format_interval(8600);
   $build['#rows']['another']['operations'] = $build['#rows']['long']['operations'];
 
   // Add an item with only one operation.
-  $build['#rows']['one']['label'] = l('An item with only one operation', 'item/one');
+  $build['#rows']['one']['label'] = l('item/one', 'An item with only one operation');
   $build['#rows']['one']['created'] = format_interval(12400);
   $build['#rows']['one']['operations'] = array(
     'data' => array(
@@ -220,7 +220,7 @@ function _theme_test_list_operations() {
   );
 
   // Add an item that can only be viewed.
-  $build['#rows']['view']['label'] = l('An item that can only be viewed', 'item/view');
+  $build['#rows']['view']['label'] = l('item/view', 'An item that can only be viewed');
   $build['#rows']['view']['created'] = format_interval(12400);
   $build['#rows']['view']['operations'] = array(
     'data' => array(
@@ -231,7 +231,7 @@ function _theme_test_list_operations() {
   );
 
   // Add an item for which the default operation is denied.
-  $build['#rows']['denied']['label'] = l('An item for which the default operation is denied', 'item/denied');
+  $build['#rows']['denied']['label'] = l('item/denied', 'An item for which the default operation is denied');
   $build['#rows']['denied']['created'] = format_interval(18600);
   $build['#rows']['denied']['operations'] = $build['#rows']['long']['operations'];
   unset($build['#rows']['denied']['operations']['data']['#links']['edit']);
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php
index fcdd258..03c8793 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php
@@ -71,7 +71,7 @@ function render($values) {
       ));
       if (taxonomy_term_access('edit', $term)) {
         $text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
-        return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination()));
+        return l('taxonomy/term/'. $tid . '/edit', $text, array('query' => drupal_get_destination()));
       }
     }
   }
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
index f81b9e5..0010661 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
@@ -162,11 +162,11 @@ public function save(array $form, array &$form_state) {
     switch ($status) {
       case SAVED_NEW:
         drupal_set_message(t('Created new term %term.', array('%term' => $term->label())));
-        watchdog('taxonomy', 'Created new term %term.', array('%term' => $term->label()), WATCHDOG_NOTICE, l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit'));
+        watchdog('taxonomy', 'Created new term %term.', array('%term' => $term->label()), WATCHDOG_NOTICE, l('taxonomy/term/' . $term->tid . '/edit', t('edit')));
         break;
       case SAVED_UPDATED:
         drupal_set_message(t('Updated term %term.', array('%term' => $term->label())));
-        watchdog('taxonomy', 'Updated term %term.', array('%term' => $term->label()), WATCHDOG_NOTICE, l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit'));
+        watchdog('taxonomy', 'Updated term %term.', array('%term' => $term->label()), WATCHDOG_NOTICE, l('taxonomy/term/' . $term->tid . '/edit', t('edit')));
         // Clear the page and block caches to avoid stale data.
         cache_invalidate(array('content' => TRUE));
         break;
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php
index 31d01c5..936d936 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php
@@ -213,6 +213,6 @@ function testTaxonomyTermHierarchyBreadcrumbs() {
 
     // Verify that the page breadcrumbs include a link to the parent term.
     $this->drupalGet('taxonomy/term/' . $term1->tid);
-    $this->assertRaw(l($term2->name, 'taxonomy/term/' . $term2->tid), 'Parent term link is displayed when viewing the node.');
+    $this->assertRaw(l('taxonomy/term/' . $term2->tid, $term2->name), 'Parent term link is displayed when viewing the node.');
   }
 }
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
index c26251e..451900d 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
@@ -176,13 +176,13 @@ public function save(array $form, array &$form_state) {
     switch (taxonomy_vocabulary_save($vocabulary)) {
       case SAVED_NEW:
         drupal_set_message(t('Created new vocabulary %name.', array('%name' => $vocabulary->name)));
-        watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
+        watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l('admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit', t('edit')));
         $form_state['redirect'] = 'admin/structure/taxonomy/' . $vocabulary->machine_name;
         break;
 
       case SAVED_UPDATED:
         drupal_set_message(t('Updated vocabulary %name.', array('%name' => $vocabulary->name)));
-        watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
+        watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l('admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit', t('edit')));
         $form_state['redirect'] = 'admin/structure/taxonomy';
         break;
     }
diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc
index 042263c..9975c02 100644
--- a/core/modules/taxonomy/taxonomy.pages.inc
+++ b/core/modules/taxonomy/taxonomy.pages.inc
@@ -28,9 +28,9 @@ function taxonomy_term_page(Term $term) {
   $breadcrumb = array();
   while ($parents = taxonomy_term_load_parents($current->tid)) {
     $current = array_shift($parents);
-    $breadcrumb[] = l($current->label(), 'taxonomy/term/' . $current->tid);
+    $breadcrumb[] = l('taxonomy/term/' . $current->tid, $current->label());
   }
-  $breadcrumb[] = l(t('Home'), NULL);
+  $breadcrumb[] = l(NULL, t('Home'));
   $breadcrumb = array_reverse($breadcrumb);
   drupal_set_breadcrumb($breadcrumb);
   drupal_add_feed('taxonomy/term/' . $term->tid . '/feed', 'RSS - ' . $term->label());
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index a54743a..0c8b3f7 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -97,7 +97,7 @@ function theme_toolbar_toggle($variables) {
     $toggle_text = t('Hide shortcuts');
     $variables['attributes']['class'][] = 'toggle-active';
   }
-  return l($toggle_text, 'toolbar/toggle', array('query' => drupal_get_destination(), 'attributes' => array('title' => $toggle_text) + $variables['attributes']));
+  return l('toolbar/toggle', $toggle_text, array('query' => drupal_get_destination()), array('title' => $toggle_text) + $variables['attributes']);
 }
 
 /**
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index 853f50d..8924d85 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -65,14 +65,14 @@ function tracker_page($account = NULL, $set_title = FALSE) {
 
         if ($new = comment_num_new($node->nid)) {
           $comments .= '<br />';
-          $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->nid, array('fragment' => 'new'));
+          $comments .= l('node/' . $node->nid, format_plural($new, '1 new', '@count new'), array('fragment' => 'new'));
         }
       }
 
       $row = array(
         'type' => check_plain(node_get_type_label($node)),
         // Do not use $node->label(), because $node comes from the database.
-        'title' => array('data' => l($node->title, 'node/' . $node->nid) . ' ' . theme('mark', array('type' => node_mark($node->nid, $node->changed)))),
+        'title' => array('data' => l('node/' . $node->nid, $node->title) . ' ' . theme('mark', array('type' => node_mark($node->nid, $node->changed)))),
         'author' => array('data' => theme('username', array('account' => $node))),
         'replies' => array('class' => array('replies'), 'data' => $comments),
         'last updated' => array('data' => t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_activity)))),
diff --git a/core/modules/translation/translation.pages.inc b/core/modules/translation/translation.pages.inc
index 7a9880c..b33ed7c 100644
--- a/core/modules/translation/translation.pages.inc
+++ b/core/modules/translation/translation.pages.inc
@@ -44,7 +44,7 @@ function translation_node_overview(Node $node) {
       $translation_node = node_load($translations[$langcode]->nid);
       $path = 'node/' . $translation_node->nid;
       $links = language_negotiation_get_switch_links($type, $path);
-      $title = empty($links->links[$langcode]['href']) ? l($translation_node->label(), $path) : l($translation_node->label(), $links->links[$langcode]['href'], $links->links[$langcode]);
+      $title = empty($links->links[$langcode]['href']) ? l($path, $translation_node->label()) : l($links->links[$langcode]['href'], $translation_node->label(), $links->links[$langcode]);
       if (node_access('update', $translation_node)) {
         $path = 'node/' . $translation_node->nid . '/edit';
         $links = language_negotiation_get_switch_links($type, $path);
diff --git a/core/modules/translation_entity/translation_entity.pages.inc b/core/modules/translation_entity/translation_entity.pages.inc
index be06e6a..60cd546 100644
--- a/core/modules/translation_entity/translation_entity.pages.inc
+++ b/core/modules/translation_entity/translation_entity.pages.inc
@@ -74,7 +74,7 @@ function translation_entity_overview(EntityInterface $entity) {
         $translation = $translations[$langcode];
         $label = $entity->label($langcode);
         $link = isset($links->links[$langcode]['href']) ? $links->links[$langcode] : array('href' => $path, 'language' => $language);
-        $row_title = l($label, $link['href'], $link);
+        $row_title = l($link['href'], $label, $link);
 
         if (empty($link['href'])) {
           $row_title = $is_original ? $label : t('n/a');
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php
index af7d035..248b8af 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateContribTest.php
@@ -53,12 +53,12 @@ function testNoReleasesAvailable() {
     // Cannot use $this->standardTests() because we need to check for the
     // 'No available releases found' string.
     $this->assertRaw('<h3>' . t('Drupal core') . '</h3>');
-    $this->assertRaw(l(t('Drupal'), 'http://example.com/project/drupal'));
+    $this->assertRaw(l('http://example.com/project/drupal', t('Drupal')));
     $this->assertText(t('Up to date'));
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertNoText(t('Update available'));
     $this->assertText(t('No available releases found'));
-    $this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'));
+    $this->assertNoRaw(l('http://example.com/project/aaa_update_test', t('AAA Update test')));
   }
 
   /**
@@ -86,7 +86,7 @@ function testUpdateContribBasic() {
     $this->assertText(t('Up to date'));
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertNoText(t('Update available'));
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
+    $this->assertRaw(l('http://example.com/project/aaa_update_test', t('AAA Update test')), 'Link to aaa_update_test project appears.');
   }
 
   /**
@@ -147,10 +147,10 @@ function testUpdateContribOrder() {
     $this->assertText(t('CCC Update test'));
     // We want aaa_update_test included in the ccc_update_test project, not as
     // its own project on the report.
-    $this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project does not appear.');
+    $this->assertNoRaw(l('http://example.com/project/aaa_update_test', t('AAA Update test')), 'Link to aaa_update_test project does not appear.');
     // The other two should be listed as projects.
-    $this->assertRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), 'Link to bbb_update_test project appears.');
-    $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), 'Link to bbb_update_test project appears.');
+    $this->assertRaw(l('http://example.com/project/bbb_update_test', t('BBB Update test')), 'Link to bbb_update_test project appears.');
+    $this->assertRaw(l('http://example.com/project/ccc_update_test', t('CCC Update test')), 'Link to bbb_update_test project appears.');
 
     // We want to make sure we see the BBB project before the CCC project.
     // Instead of just searching for 'BBB Update test' or something, we want
@@ -195,7 +195,7 @@ function testUpdateBaseThemeSecurityUpdate() {
     );
     $this->refreshUpdateStatus($xml_mapping);
     $this->assertText(t('Security update required!'));
-    $this->assertRaw(l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme'), 'Link to the Update test base theme project appears.');
+    $this->assertRaw(l('http://example.com/project/update_test_basetheme', t('Update test base theme')), 'Link to the Update test base theme project appears.');
   }
 
   /**
@@ -242,8 +242,8 @@ function testUpdateShowDisabledThemes() {
       'update_test_subtheme' => '1_0',
       'update_test_basetheme' => '1_1-sec',
     );
-    $base_theme_project_link = l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme');
-    $sub_theme_project_link = l(t('Update test subtheme'), 'http://example.com/project/update_test_subtheme');
+    $base_theme_project_link = l('http://example.com/project/update_test_basetheme', t('Update test base theme'));
+    $sub_theme_project_link = l('http://example.com/project/update_test_subtheme', t('Update test subtheme'));
     foreach (array(TRUE, FALSE) as $check_disabled) {
       $update_settings->set('check.disabled_extensions', $check_disabled)->save();
       $this->refreshUpdateStatus($xml_mapping);
@@ -313,9 +313,9 @@ function testUpdateBrokenFetchURL() {
     $this->assertUniqueText(t('Failed to get available update data for one project.'));
 
     // The other two should be listed as projects.
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
-    $this->assertNoRaw(l(t('BBB Update test'), 'http://example.com/project/bbb_update_test'), 'Link to bbb_update_test project does not appear.');
-    $this->assertRaw(l(t('CCC Update test'), 'http://example.com/project/ccc_update_test'), 'Link to bbb_update_test project appears.');
+    $this->assertRaw(l('http://example.com/project/aaa_update_test', t('AAA Update test')), 'Link to aaa_update_test project appears.');
+    $this->assertNoRaw(l('http://example.com/project/bbb_update_test', t('BBB Update test')), 'Link to bbb_update_test project does not appear.');
+    $this->assertRaw(l('http://example.com/project/ccc_update_test', t('CCC Update test')), 'Link to bbb_update_test project appears.');
   }
 
   /**
@@ -358,7 +358,7 @@ function testHookUpdateStatusAlter() {
     $this->drupalGet('admin/reports/updates');
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertText(t('Security update required!'));
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
+    $this->assertRaw(l('http://example.com/project/aaa_update_test', t('AAA Update test')), 'Link to aaa_update_test project appears.');
 
     // Visit the reports page again without the altering and make sure the
     // status is back to normal.
@@ -366,7 +366,7 @@ function testHookUpdateStatusAlter() {
     $this->drupalGet('admin/reports/updates');
     $this->assertRaw('<h3>' . t('Modules') . '</h3>');
     $this->assertNoText(t('Security update required!'));
-    $this->assertRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
+    $this->assertRaw(l('http://example.com/project/aaa_update_test', t('AAA Update test')), 'Link to aaa_update_test project appears.');
 
     // Turn the altering back on and visit the Update manager UI.
     $update_test_config->set('update_status', $update_status)->save();
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php
index 32dc111..dfb79c9 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateCoreTest.php
@@ -55,9 +55,9 @@ function testNormalUpdateAvailable() {
     $this->assertNoText(t('Up to date'));
     $this->assertText(t('Update available'));
     $this->assertNoText(t('Security update required!'));
-    $this->assertRaw(l('7.1', 'http://example.com/drupal-7-1-release'), 'Link to release appears.');
-    $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-1.tar.gz'), 'Link to download appears.');
-    $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-1-release'), 'Link to release notes appears.');
+    $this->assertRaw(l('http://example.com/drupal-7-1-release', '7.1'), 'Link to release appears.');
+    $this->assertRaw(l('http://example.com/drupal-7-1.tar.gz', t('Download')), 'Link to download appears.');
+    $this->assertRaw(l('http://example.com/drupal-7-1-release', t('Release notes')), 'Link to release notes appears.');
   }
 
   /**
@@ -70,9 +70,9 @@ function testSecurityUpdateAvailable() {
     $this->assertNoText(t('Up to date'));
     $this->assertNoText(t('Update available'));
     $this->assertText(t('Security update required!'));
-    $this->assertRaw(l('7.2', 'http://example.com/drupal-7-2-release'), 'Link to release appears.');
-    $this->assertRaw(l(t('Download'), 'http://example.com/drupal-7-2.tar.gz'), 'Link to download appears.');
-    $this->assertRaw(l(t('Release notes'), 'http://example.com/drupal-7-2-release'), 'Link to release notes appears.');
+    $this->assertRaw(l('http://example.com/drupal-7-2-release', '7.2'), 'Link to release appears.');
+    $this->assertRaw(l('http://example.com/drupal-7-2.tar.gz', t('Download')), 'Link to download appears.');
+    $this->assertRaw(l('http://example.com/drupal-7-2-release', t('Release notes')), 'Link to release notes appears.');
   }
 
   /**
diff --git a/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php b/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php
index 99d01d1..6d35d17 100644
--- a/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php
+++ b/core/modules/update/lib/Drupal/update/Tests/UpdateTestBase.php
@@ -55,7 +55,7 @@ protected function refreshUpdateStatus($xml_map, $url = 'update-test') {
    */
   protected function standardTests() {
     $this->assertRaw('<h3>' . t('Drupal core') . '</h3>');
-    $this->assertRaw(l(t('Drupal'), 'http://example.com/project/drupal'), 'Link to the Drupal project appears.');
+    $this->assertRaw(l('http://example.com/project/drupal', t('Drupal')), 'Link to the Drupal project appears.');
     $this->assertNoText(t('No available releases found'));
   }
 }
diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index d6c32d6..719aa2a 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -144,7 +144,7 @@ function _update_requirement_check($project, $type) {
   if ($status != UPDATE_CURRENT && $type == 'core' && isset($project['recommended'])) {
     $requirement_label .= ' ' . t('(version @version available)', array('@version' => $project['recommended']));
   }
-  $requirement['value'] = l($requirement_label, update_manager_access() ? 'admin/reports/updates/update' : 'admin/reports/updates');
+  $requirement['value'] = l(update_manager_access() ? 'admin/reports/updates/update' : 'admin/reports/updates', $requirement_label);
   return $requirement;
 }
 
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index 062ffca..1c4a0ba 100644
--- a/core/modules/update/update.manager.inc
+++ b/core/modules/update/update.manager.inc
@@ -100,7 +100,7 @@ function update_manager_update_form($form, $form_state = array(), $context) {
     // The project name to display can vary based on the info we have.
     if (!empty($project['title'])) {
       if (!empty($project['link'])) {
-        $project_name = l($project['title'], $project['link']);
+        $project_name = l($project['link'], $project['title']);
       }
       else {
         $project_name = check_plain($project['title']);
@@ -123,7 +123,7 @@ function update_manager_update_form($form, $form_state = array(), $context) {
     }
 
     $recommended_release = $project['releases'][$project['recommended']];
-    $recommended_version = $recommended_release['version'] . ' ' . l(t('(Release notes)'), $recommended_release['release_link'], array('attributes' => array('title' => t('Release notes for @project_title', array('@project_title' => $project['title'])))));
+    $recommended_version = $recommended_release['version'] . ' ' . l($recommended_release['release_link'], t('(Release notes)'), array(), array('title' => t('Release notes for @project_title', array('@project_title' => $project['title']))));
     if ($recommended_release['version_major'] != $project['existing_major']) {
       $recommended_version .= '<div title="Major upgrade warning" class="update-major-version-warning">' . t('This update is a major version update which means that it may not be backwards compatible with your currently running version.  It is recommended that you read the release notes and proceed at your own risk.') . '</div>';
     }
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 865caea..44f9c60 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -655,7 +655,7 @@ function theme_update_last_check($variables) {
   $last = $variables['last'];
   $output = '<div class="update checked">';
   $output .= $last ? t('Last checked: @time ago', array('@time' => format_interval(REQUEST_TIME - $last))) : t('Last checked: never');
-  $output .= ' <span class="check-manually">(' . l(t('Check manually'), 'admin/reports/updates/check', array('query' => drupal_get_destination())) . ')</span>';
+  $output .= ' <span class="check-manually">(' . l('admin/reports/updates/check', t('Check manually'), array('query' => drupal_get_destination())) . ')</span>';
   $output .= "</div>\n";
   return $output;
 }
diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc
index 607b523..78e8b06 100644
--- a/core/modules/update/update.report.inc
+++ b/core/modules/update/update.report.inc
@@ -90,7 +90,7 @@ function theme_update_report($variables) {
     $row .= '<div class="project">';
     if (isset($project['title'])) {
       if (isset($project['link'])) {
-        $row .= l($project['title'], $project['link']);
+        $row .= l($project['link'], $project['title']);
       }
       else {
         $row .= check_plain($project['title']);
@@ -306,7 +306,7 @@ function theme_update_version($variables) {
   $output .= '<tr>';
   $output .= '<td class="version-title">' . $tag . "</td>\n";
   $output .= '<td class="version-details">';
-  $output .= l($version['version'], $version['release_link']);
+  $output .= l($version['release_link'], $version['version']);
   $output .= ' <span class="version-date">(' . format_date($version['date'], 'custom', 'Y-M-d') . ')</span>';
   $output .= "</td>\n";
   $output .= '<td class="version-links">';
diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php
index b79e983..833a024 100644
--- a/core/modules/user/lib/Drupal/user/AccountFormController.php
+++ b/core/modules/user/lib/Drupal/user/AccountFormController.php
@@ -77,7 +77,7 @@ public function form(array $form, array &$form_state, EntityInterface $account)
       if (!$pass_reset) {
         $protected_values['mail'] = $form['account']['mail']['#title'];
         $protected_values['pass'] = t('Password');
-        $request_new = l(t('Request new password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
+        $request_new = l('user/password', t('Request new password'), array(), array('title' => t('Request new password via e-mail.')));
         $current_pass_description = t('Required if you want to change the %mail or %pass below. !request_new.', array('%mail' => $protected_values['mail'], '%pass' => $protected_values['pass'], '!request_new' => $request_new));
       }
 
diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Picture.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Picture.php
index 8446fac..1f2b8fd 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Picture.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Picture.php
@@ -104,7 +104,7 @@ function render($values) {
         $output = theme('image_style', array('style_name' => $this->options['image_style'], 'path' => $picture_filepath));
         if ($this->options['link_photo_to_profile'] && user_access('access user profiles')) {
           $uid = $this->get_value($values, 'uid');
-          $output = l($output, "user/$uid", array('html' => TRUE));
+          $output = l("user/$uid", $output, array('html' => TRUE));
         }
       }
       else {
diff --git a/core/modules/user/lib/Drupal/user/RegisterFormController.php b/core/modules/user/lib/Drupal/user/RegisterFormController.php
index 86bb70d..4289ee5 100644
--- a/core/modules/user/lib/Drupal/user/RegisterFormController.php
+++ b/core/modules/user/lib/Drupal/user/RegisterFormController.php
@@ -110,7 +110,7 @@ public function save(array $form, array &$form_state) {
     $form_state['user'] = $account;
     $form_state['values']['uid'] = $account->uid;
 
-    watchdog('user', 'New user: %name (%email).', array('%name' => $form_state['values']['name'], '%email' => $form_state['values']['mail']), WATCHDOG_NOTICE, l(t('edit'), 'user/' . $account->uid . '/edit'));
+    watchdog('user', 'New user: %name (%email).', array('%name' => $form_state['values']['name'], '%email' => $form_state['values']['mail']), WATCHDOG_NOTICE, l('user/' . $account->uid . '/edit', t('edit')));
 
     // Add plain text password into user account to generate mail tokens.
     $account->password = $pass;
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php
index ef3a1d5..55e215c 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAdminTest.php
@@ -45,7 +45,7 @@ function testUserAdmin() {
     $this->assertText($admin_user->name, 'Found Admin user on admin users page');
 
     // Test for existence of edit link in table.
-    $link = l(t('edit'), "user/$user_a->uid/edit", array('query' => array('destination' => 'admin/people')));
+    $link = l("user/$user_a->uid/edit", t('edit'), array('query' => array('destination' => 'admin/people')));
     $this->assertRaw($link, 'Found user A edit link on admin users page');
 
     // Filter the users by permission 'administer taxonomy'.
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index f1d3254..7dbc2c1 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -769,18 +769,14 @@ function user_block_view($delta = '') {
         // Build action links.
         $items = array();
         if (config('user.settings')->get('register') != USER_REGISTER_ADMINISTRATORS_ONLY) {
-          $items['create_account'] = l(t('Create new account'), 'user/register', array(
-            'attributes' => array(
-              'title' => t('Create a new user account.'),
-              'class' => array('create-account-link'),
-            ),
+          $items['create_account'] = l('user/register', t('Create new account'), array(), array(
+            'title' => t('Create a new user account.'),
+            'class' => array('create-account-link'),
           ));
         }
-        $items['request_password'] = l(t('Request new password'), 'user/password', array(
-          'attributes' => array(
-            'title' => t('Request new password via e-mail.'),
-            'class' => array('request-password-link'),
-          ),
+        $items['request_password'] = l('user/password', t('Request new password'), array(), array(
+          'title' => t('Request new password via e-mail.'),
+          'class' => array('request-password-link'),
         ));
         // Build a block as renderable array.
         $block['subject'] = t('User login');
@@ -927,8 +923,9 @@ function template_preprocess_user_picture(&$variables) {
         $variables['user_picture'] = theme('image', array('uri' => $filepath, 'alt' => $alt, 'title' => $alt));
       }
       if (!empty($account->uid) && user_access('access user profiles')) {
-        $attributes = array('attributes' => array('title' => t('View user profile.')), 'html' => TRUE);
-        $variables['user_picture'] = l($variables['user_picture'], "user/$account->uid", $attributes);
+        $options = array('html' => TRUE);
+        $attributes = array('title' => t('View user profile.'));
+        $variables['user_picture'] = l("user/$account->uid", $variables['user_picture'], $options, $attributes);
       }
     }
   }
@@ -1006,7 +1003,7 @@ function template_process_username(&$variables) {
     // to use the former unless they want to add attributes on the link only.
     // If a link is being rendered, these need to be merged. Some attributes are
     // themselves arrays, so the merging needs to be recursive.
-    $variables['link_options']['attributes'] = array_merge_recursive($variables['link_attributes'], $variables['attributes']);
+    $variables['link_attributes'] = array_merge_recursive($variables['link_attributes'], $variables['attributes']);
   }
 }
 
@@ -1032,8 +1029,8 @@ function theme_username($variables) {
   if (isset($variables['link_path'])) {
     // We have a link path, so we should generate a link using l().
     // Additional classes may be added as array elements like
-    // $variables['link_options']['attributes']['class'][] = 'myclass';
-    $output = l($variables['name'] . $variables['extra'], $variables['link_path'], $variables['link_options']);
+    // $variables['link_attributes']['class'][] = 'myclass';
+    $output = l($variables['link_path'], $variables['name'] . $variables['extra'], $variables['link_options'],$variables['link_attributes']);
   }
   else {
     // Modules may have added important attributes so they must be included
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
index 3f39af8..969a561 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
@@ -358,7 +358,7 @@ public function getPaths() {
         if (!empty($display['display_options']['path'])) {
           $path = $display['display_options']['path'];
           if ($this->isEnabled() && strpos($path, '%') === FALSE) {
-            $all_paths[] = l('/' . $path, $path);
+            $all_paths[] = l($path, '/' . $path);
           }
           else {
             $all_paths[] = check_plain('/' . $path);
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index c272180..5f113af 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -955,7 +955,7 @@ public function optionLink($text, $section, $class = '', $title = '') {
       $title = $text;
     }
 
-    return l($text, 'admin/structure/views/nojs/display/' . $this->view->storage->get('name') . '/' . $this->display['id'] . '/' . $section, array('attributes' => array('class' => 'views-ajax-link ' . $class, 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE));
+    return l('admin/structure/views/nojs/display/' . $this->view->storage->get('name') . '/' . $this->display['id'] . '/' . $section, $text, array('html' => TRUE), array('class' => 'views-ajax-link ' . $class, 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)));
   }
 
   /**
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
index 8d6fe06..1b2a003 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
@@ -1251,7 +1251,7 @@ function render_text($alter) {
           $more_link_path = drupal_substr($more_link_path, drupal_strlen($base_path));
         }
 
-        $more_link = l($more_link_text, $more_link_path, array('attributes' => array('class' => array('views-more-link'))));
+        $more_link = l($more_link_path, $more_link_text, array(), array('class' => array('views-more-link')));
 
         $suffix .= " " . $more_link;
       }
@@ -1379,32 +1379,34 @@ function render_as_link($alter, $text, $tokens) {
       $options['fragment'] = $url['fragment'];
     }
 
+    $attributes = array();
+
     $alt = strtr($alter['alt'], $tokens);
     // Set the title attribute of the link only if it improves accessibility
     if ($alt && $alt != $text) {
-      $options['attributes']['title'] = decode_entities($alt);
+      $attributes['title'] = decode_entities($alt);
     }
 
     $class = strtr($alter['link_class'], $tokens);
     if ($class) {
-      $options['attributes']['class'] = array($class);
+      $attributes['class'] = array($class);
     }
 
     if (!empty($alter['rel']) && $rel = strtr($alter['rel'], $tokens)) {
-      $options['attributes']['rel'] = $rel;
+      $attributes['rel'] = $rel;
     }
 
     $target = check_plain(trim(strtr($alter['target'], $tokens)));
     if (!empty($target)) {
-      $options['attributes']['target'] = $target;
+      $attributes['target'] = $target;
     }
 
     // Allow the addition of arbitrary attributes to links. Additional attributes
     // currently can only be altered in preprocessors and not within the UI.
     if (isset($alter['link_attributes']) && is_array($alter['link_attributes'])) {
       foreach ($alter['link_attributes'] as $key => $attribute) {
-        if (!isset($options['attributes'][$key])) {
-          $options['attributes'][$key] = strtr($attribute, $tokens);
+        if (!isset($attributes[$key])) {
+          $attributes[$key] = strtr($attribute, $tokens);
         }
       }
     }
@@ -1437,7 +1439,7 @@ function render_as_link($alter, $text, $tokens) {
       $options['entity_type'] = $alter['entity_type'];
     }
 
-    $value .= l($text, $path, $options);
+    $value .= l($path, $text, $options, $attributes);
 
     if (!empty($alter['suffix'])) {
       $value .= filter_xss_admin(strtr($alter['suffix'], $tokens));
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Url.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Url.php
index 8a0183d..592ed00 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Url.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Url.php
@@ -43,7 +43,7 @@ public function buildOptionsForm(&$form, &$form_state) {
   function render($values) {
     $value = $this->get_value($values);
     if (!empty($this->options['display_as_link'])) {
-      return l($this->sanitizeValue($value), $value, array('html' => TRUE));
+      return l($value, $this->sanitizeValue($value), array('html' => TRUE));
     }
     else {
       return $this->sanitizeValue($value, 'url');
diff --git a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
index 7e37452..15d608a 100644
--- a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
@@ -99,7 +99,7 @@ protected function setUp() {
       if ($i % 2) {
         $values['promote'] = TRUE;
       }
-      $values['body'][LANGUAGE_NOT_SPECIFIED][]['value'] = l('Node ' . 1, 'node/' . 1);
+      $values['body'][LANGUAGE_NOT_SPECIFIED][]['value'] = l('node/' . 1, 'Node ' . 1);
 
       $node = $this->drupalCreateNode($values);
 
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
index 8408aa4..b788810 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
@@ -278,8 +278,8 @@ protected function displayMethodTests() {
 
     // Paths with a "%" shouldn't not be linked
     $expected_paths = array();
-    $expected_paths[] = l('/test', 'test');
-    $expected_paths[] = l('/test.xml', 'test.xml');
+    $expected_paths[] = l('test', '/test');
+    $expected_paths[] = l('test.xml', '/test.xml');
     $expected_paths[] = '/test/%/extra';
 
     $this->assertEqual($view->getPaths(), $expected_paths, 'Make sure the paths in the ui are generated as expected.');
diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php
index 4ad1633..385aeb2 100644
--- a/core/modules/views/lib/Drupal/views/ViewExecutable.php
+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php
@@ -1713,7 +1713,7 @@ public function getBreadcrumb($set = FALSE) {
           $title = t('Home');
         }
         if ($title) {
-          $breadcrumb[] = l($title, $path, array('html' => TRUE));
+          $breadcrumb[] = l($path, $title, array('html' => TRUE));
         }
       }
 
diff --git a/core/modules/views/theme/theme.inc b/core/modules/views/theme/theme.inc
index 0a45642..563ddf6 100644
--- a/core/modules/views/theme/theme.inc
+++ b/core/modules/views/theme/theme.inc
@@ -517,10 +517,10 @@ function template_preprocess_views_view_table(&$vars) {
         $query['sort'] = $initial;
         $link_options = array(
           'html' => TRUE,
-          'attributes' => array('title' => $title),
           'query' => $query,
         );
-        $vars['header'][$field] = l($label, current_path(), $link_options);
+        $link_attributes = array('title' => $title);
+        $vars['header'][$field] = l(current_path(), $label, $link_options, $link_attributes);
       }
 
       $vars['header_classes'][$field] = '';
diff --git a/core/modules/views/views_ui/admin.inc b/core/modules/views/views_ui/admin.inc
index 5b0ae41..db224b3 100644
--- a/core/modules/views/views_ui/admin.inc
+++ b/core/modules/views/views_ui/admin.inc
@@ -2350,7 +2350,7 @@ function views_ui_field_list() {
 
     $rows[$field_name]['data'][0] = check_plain($field_name);
     foreach ($views as $view) {
-      $rows[$field_name]['data'][1][] = l($view, "admin/structure/views/view/$view");
+      $rows[$field_name]['data'][1][] = l("admin/structure/views/view/$view", $view);
     }
     $rows[$field_name]['data'][1] = implode(', ', $rows[$field_name]['data'][1]);
   }
@@ -2375,7 +2375,7 @@ function views_ui_plugin_list() {
   foreach ($rows as &$row) {
     // Link each view name to the view itself.
     foreach ($row['views'] as $row_name => $view) {
-      $row['views'][$row_name] = l($view, "admin/structure/views/view/$view");
+      $row['views'][$row_name] = l("admin/structure/views/view/$view", $view);
     }
     $row['views'] = implode(', ', $row['views']);
   }
diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
index 853d5c9..004fcc3 100644
--- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
@@ -923,7 +923,7 @@ public function getFormBucket(ViewUI $view, $type, $display) {
       if (empty($handler)) {
         $build['fields'][$id]['#class'][] = 'broken';
         $field_name = t('Broken/missing handler: @table > @field', array('@table' => $field['table'], '@field' => $field['field']));
-        $build['fields'][$id]['#link'] = l($field_name, "admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-ajax-link')), 'html' => TRUE));
+        $build['fields'][$id]['#link'] = l("admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id", $field_name, array('html' => TRUE), array('class' => array('views-ajax-link')));
         continue;
       }
 
@@ -938,15 +938,15 @@ public function getFormBucket(ViewUI $view, $type, $display) {
       if (!empty($field['exclude'])) {
         $link_attributes['class'][] = 'views-field-excluded';
       }
-      $build['fields'][$id]['#link'] = l($link_text, "admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => $link_attributes, 'html' => TRUE));
+      $build['fields'][$id]['#link'] = l("admin/structure/views/nojs/config-item/{$view->get('name')}/{$display['id']}/$type/$id", $link_text, array('html' => TRUE), $link_attributes);
       $build['fields'][$id]['#class'][] = drupal_clean_css_identifier($display['id']. '-' . $type . '-' . $id);
 
       if ($view->get('executable')->displayHandlers[$display['id']]->useGroupBy() && $handler->usesGroupBy()) {
-        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Aggregation settings') . '</span>', "admin/structure/views/nojs/config-item-group/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => 'views-button-configure views-ajax-link', 'title' => t('Aggregation settings')), 'html' => TRUE));
+        $build['fields'][$id]['#settings_links'][] = l("admin/structure/views/nojs/config-item-group/{$view->get('name')}/{$display['id']}/$type/$id", '<span class="label">' . t('Aggregation settings') . '</span>', array('html' => TRUE), array('class' => 'views-button-configure views-ajax-link', 'title' => t('Aggregation settings')));
       }
 
       if ($handler->hasExtraOptions()) {
-        $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Settings') . '</span>', "admin/structure/views/nojs/config-item-extra/{$view->get('name')}/{$display['id']}/$type/$id", array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => t('Settings')), 'html' => TRUE));
+        $build['fields'][$id]['#settings_links'][] = l("admin/structure/views/nojs/config-item-extra/{$view->get('name')}/{$display['id']}/$type/$id", '<span class="label">' . t('Settings') . '</span>', array('html' => TRUE), array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => t('Settings')));
       }
 
       if ($grouping) {
diff --git a/core/modules/views/views_ui/theme/theme.inc b/core/modules/views/views_ui/theme/theme.inc
index 530aec5..e11dff6 100644
--- a/core/modules/views/views_ui/theme/theme.inc
+++ b/core/modules/views/views_ui/theme/theme.inc
@@ -174,7 +174,7 @@ function theme_views_ui_build_group_filter_form($variables) {
       'title' => drupal_render($form['group_items'][$group_id]['title']),
       'operator' => drupal_render($form['group_items'][$group_id]['operator']),
       'value' => drupal_render($form['group_items'][$group_id]['value']),
-      'remove' => drupal_render($form['group_items'][$group_id]['remove']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $group_id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => true)),
+      'remove' => drupal_render($form['group_items'][$group_id]['remove']) . l('javascript:void()', '<span>' . t('Remove') . '</span>', array('html' => TRUE), array('id' => 'views-remove-link-' . $group_id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item'))),
     );
     $rows[] = array('data' => $data, 'id' => 'views-row-' . $group_id, 'class' => array('draggable'));
   }
@@ -200,15 +200,15 @@ function theme_views_ui_reorder_displays_form($vars) {
       $row[] = drupal_render($form[$key]['weight']);
       if (isset($display['removed'])) {
         $row[] = drupal_render($form[$key]['removed']) .
-          l('<span>' . t('Remove') . '</span>',
-            'javascript:void()',
+          l('javascript:void()',
+            '<span>' . t('Remove') . '</span>',
+            array('html' => TRUE),
             array(
-              'attributes' => array(
-                'id' => 'display-remove-link-' . $key,
-                'class' => array('views-button-remove display-remove-link'),
-                'alt' => t('Remove this display'),
-                'title' => t('Remove this display')),
-              'html' => TRUE));
+              'id' => 'display-remove-link-' . $key,
+              'class' => array('views-button-remove display-remove-link'),
+              'alt' => t('Remove this display'),
+              'title' => t('Remove this display'),
+            ));
       }
       else {
         $row[] = '';
@@ -255,7 +255,7 @@ function theme_views_ui_rearrange_form($variables) {
       $row[] = drupal_render($form['fields'][$id]['name']);
       $form['fields'][$id]['weight']['#attributes']['class'] = array('weight');
       $row[] = drupal_render($form['fields'][$id]['weight']);
-      $row[] = drupal_render($form['fields'][$id]['removed']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $id, 'class' => array('views-hidden', 'views-button-remove', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => TRUE));
+      $row[] = drupal_render($form['fields'][$id]['removed']) . l('javascript:void()', '<span>' . t('Remove') . '</span>', array('html' => TRUE), array('id' => 'views-remove-link-' . $id, 'class' => array('views-hidden', 'views-button-remove', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')));
       $rows[] = array('data' => $row, 'class' => array('draggable'), 'id' => 'views-row-' . $id);
     }
   }
@@ -321,7 +321,7 @@ function theme_views_ui_rearrange_filter_form(&$vars) {
         $form['filters'][$id]['group']['#attributes']['class'] = array('views-group-select views-group-select-' . $group_id);
         $row[] = drupal_render($form['filters'][$id]['group']);
         $form['filters'][$id]['removed']['#attributes']['class'][] = 'js-hide';
-        $row[] = drupal_render($form['filters'][$id]['removed']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => TRUE));
+        $row[] = drupal_render($form['filters'][$id]['removed']) . l('javascript:void()', '<span>' . t('Remove') . '</span>', array('html' => TRUE), array('id' => 'views-remove-link-' . $id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')));
 
         $row = array('data' => $row, 'class' => array('draggable'), 'id' => 'views-row-' . $id);
         if ($group_id !== 'ungroupable') {
diff --git a/core/themes/seven/template.php b/core/themes/seven/template.php
index b92d064..40f8a0e 100644
--- a/core/themes/seven/template.php
+++ b/core/themes/seven/template.php
@@ -46,12 +46,13 @@ function seven_node_add_list($variables) {
   $output = '';
   if ($content) {
     $output = '<ul class="admin-list">';
+    // @todo: Make sure we don't have any options['attributes'].  If so, move them to $attributes.
     foreach ($content as $type) {
       $output .= '<li class="clearfix">';
       $content = '<span class="label">' . check_plain($type->name) . '</span>';
       $content .= '<div class="description">' . filter_xss_admin($type->description) . '</div>';
       $options['html'] = TRUE;
-      $output .= l($content, 'node/add/' . $type->type, $options);
+      $output .= l('node/add/' . $type->type, $content, $options);
       $output .= '</li>';
     }
     $output .= '</ul>';
@@ -72,6 +73,7 @@ function seven_admin_block_content($variables) {
   $output = '';
   if (!empty($content)) {
     $output = system_admin_compact_mode() ? '<ul class="admin-list compact">' : '<ul class="admin-list">';
+    // @todo: Make sure we don't have any options['attributes'].  If so, move them to $attributes.
     foreach ($content as $item) {
       $output .= '<li>';
       $content = '<span class="label">' . filter_xss_admin($item['title']) . '</span>';
@@ -80,7 +82,7 @@ function seven_admin_block_content($variables) {
       if (isset($item['description']) && !system_admin_compact_mode()) {
         $content .= '<div class="description">' . filter_xss_admin($item['description']) . '</div>';
       }
-      $output .= l($content, $item['href'], $options);
+      $output .= l($item['href'], $content, $options);
       $output .= '</li>';
     }
     $output .= '</ul>';
