diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index f807979..fd640c8 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -649,7 +649,7 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) {
  *     their base theme), direct sub-themes of sub-themes, etc. The keys are
  *     the themes' machine names, and the values are the themes' human-readable
  *     names. This element is not set if there are no themes on the system that
- *     declare this theme as their base theme. 
+ *     declare this theme as their base theme.
 */
 function list_themes($refresh = FALSE) {
   $list = &drupal_static(__FUNCTION__, array());
@@ -1767,6 +1767,9 @@ function theme_breadcrumb($variables) {
  *     - "field": The database field represented in the table column (required
  *       if user is to be able to sort on this column).
  *     - "sort": A default sort order for this column ("asc" or "desc").
+ *     - "primary": When set to true, the rows cells below it will
+ *       be marked as row identifier. When empty or FALSE, the first column
+ *       will be marked as the identifier.
  *     - Any HTML attributes, such as "colspan", to apply to the column header
  *       cell.
  *   - rows: An array of table rows. Every row is an array of cells, or an
@@ -1903,12 +1906,17 @@ function theme_table($variables) {
   }
 
   // Format the table header:
+  $primary_header_column = 0;
   if (count($header)) {
     $ts = tablesort_init($header);
     // HTML requires that the thead tag has tr tags in it followed by tbody
     // tags. Using ternary operator to check and see if we have any rows.
     $output .= (count($rows) ? ' <thead><tr>' : ' <tr>');
-    foreach ($header as $cell) {
+    foreach ($header as $key => $cell) {
+      if (is_array($cell) && !empty($cell['primary'])) {
+        $primary_header_column = $key;
+        unset($cell['primary']);
+      }
       $cell = tablesort_header($cell, $header, $ts);
       $output .= _theme_table_cell($cell, TRUE);
     }
@@ -1951,7 +1959,10 @@ function theme_table($variables) {
         // Build row
         $output .= ' <tr' . drupal_attributes($attributes) . '>';
         $i = 0;
-        foreach ($cells as $cell) {
+        foreach ($cells as $key => $cell) {
+          if ($key == $primary_header_column) {
+            $cell = array('data' => $cell, 'scope' => 'row');
+          }
           $cell = tablesort_cell($cell, $header, $ts, $i++);
           $output .= _theme_table_cell($cell);
         }
