diff -up -r fasttoggle/fasttoggle.admin.inc fasttoggle/fasttoggle.admin.inc
--- fasttoggle/fasttoggle.admin.inc	2008-03-24 10:12:14.000000000 -0500
+++ fasttoggle/fasttoggle.admin.inc	2011-04-04 14:00:59.000000000 -0500
@@ -4,7 +4,7 @@
 /**
  * (Menu callback) Configures what fast toggling options are available.
  */
-function fasttoggle_settings_form() {
+function fasttoggle_settings_form($form, &$form_state) {
   $form = array();
 
   $form['fasttoggle_label_style'] = array(
diff -up -r fasttoggle/fasttoggle.info fasttoggle/fasttoggle.info
--- fasttoggle/fasttoggle.info	2008-04-19 14:40:10.000000000 -0500
+++ fasttoggle/fasttoggle.info	2011-04-04 14:00:59.000000000 -0500
@@ -1,10 +1,10 @@
 ; $Id: fasttoggle.info,v 1.3 2007/10/07 12:27:53 timcn Exp $
 name = Fasttoggle
 description = Enables fast toggling of binary settings.
-core = "6.x"
+core = 7.x
 ; Information added by drupal.org packaging script on 2008-04-19
 version = "6.x-1.3"
-core = "6.x"
+core = 7.x
 project = "fasttoggle"
 datestamp = "1208634010"
 
diff -up -r fasttoggle/fasttoggle.install fasttoggle/fasttoggle.install
--- fasttoggle/fasttoggle.install	2006-09-16 13:37:20.000000000 -0500
+++ fasttoggle/fasttoggle.install	2011-04-04 14:00:59.000000000 -0500
@@ -7,8 +7,16 @@
  */
 
 /**
- * Implementation of hook_install().
+ * Implements hook_install().
  */
 function fasttoggle_install() {
-  db_query("UPDATE {system} SET weight = 5 WHERE name = 'fasttoggle' AND type = 'module'");
-}
\ No newline at end of file
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("UPDATE {system} SET weight = 5 WHERE name = 'fasttoggle' AND type = 'module'") */
+  db_update('system')
+  ->fields(array(
+    'weight' => 5,
+  ))
+  ->condition('name', 'fasttoggle')
+  ->condition('type', 'module')
+  ->execute();
+}
diff -up -r fasttoggle/fasttoggle.module fasttoggle/fasttoggle.module
--- fasttoggle/fasttoggle.module	2008-04-19 14:35:36.000000000 -0500
+++ fasttoggle/fasttoggle.module	2011-04-04 14:00:59.000000000 -0500
@@ -22,12 +22,12 @@ define('FASTTOGGLE_LABEL_ACTION', 0x0001
 define('FASTTOGGLE_LABEL_CUSTOM', 0x0002);
 
 /**
- * Implementation of hook_menu().
+ * Implements hook_menu().
  */
 function fasttoggle_menu() {
   $items = array();
 
-  $items['admin/settings/fasttoggle'] = array(
+  $items['admin/config/fasttoggle'] = array(
     'title' => 'Fasttoggle',
     'description' => 'Configure what fast toggling options are available.',
     'page callback' => 'drupal_get_form',
@@ -68,34 +68,65 @@ function fasttoggle_menu() {
 }
 
 /**
- * Implementation of hook_perm().
+ * Implements hook_permission().
  */
-function fasttoggle_perm() {
-  return array('promote posts', 'make posts sticky', 'moderate posts', 'moderate users', 'moderate comments', 'administer fasttoggle');
+function fasttoggle_permission() {
+  return array(
+    'promote posts' => array(
+      'title' => t('promote posts'),
+      'description' => t('TODO Add a description for \'promote posts\''),
+    ),
+    'make posts sticky' => array(
+      'title' => t('make posts sticky'),
+      'description' => t('TODO Add a description for \'make posts sticky\''),
+    ),
+    'moderate posts' => array(
+      'title' => t('moderate posts'),
+      'description' => t('TODO Add a description for \'moderate posts\''),
+    ),
+    'moderate users' => array(
+      'title' => t('moderate users'),
+      'description' => t('TODO Add a description for \'moderate users\''),
+    ),
+    'moderate comments' => array(
+      'title' => t('moderate comments'),
+      'description' => t('TODO Add a description for \'moderate comments\''),
+    ),
+    'administer fasttoggle' => array(
+      'title' => t('administer fasttoggle'),
+      'description' => t('TODO Add a description for \'administer fasttoggle\''),
+    ),
+  );
 }
 
 /**
- * Implementation of hook_user().
- *
- * Add togglable links to user pages.
+ * Implements hook_user_view().
  */
-function fasttoggle_user($type, &$edit, &$user) {
-  $settings = variable_get('fasttoggle_user_settings', array('status' => TRUE));
-
-  if ($type == 'view' && $settings['status'] && (user_access('administer users') || user_access('moderate users'))) {
+function fasttoggle_user_view($account, $view_mode) {
+  if (TRUE && $settings['status'] && (user_access('administer users') || user_access('moderate users'))) {
     $link = array_shift(fasttoggle_link('user', $user, TRUE));
     $user->content['fasttoggle'] = array(
-      '#value' => t('Status') .': '. l($link['title'], $link['href'], $link),
+      '#value' => t('Status') . ': ' . l($link['title'], $link['href'], $link),
     );
   }
 }
 
 /**
- * Implementation of hook_help().
+ * Implements hook_user().
+ *
+ * Add togglable links to user pages.
+ */
+function fasttoggle_user_OLD($type, &$edit, &$user) {
+  // TODO Remaining code in this function needs to be moved to the appropriate new hook function.
+  $settings = variable_get('fasttoggle_user_settings', array('status' => TRUE));
+}
+
+/**
+ * Implements hook_help().
  */
 function fasttoggle_help($path, $arg) {
   switch ($path) {
-    case 'admin/settings/fasttoggle':
+    case 'admin/config/fasttoggle':
       return t('Configure what fast toggling options are available.');
       break;
   }
@@ -133,11 +164,11 @@ function fasttoggle($title, $callback, $
   // Only include the support files once.
   if (!$sent) {
     $sent = true;
-    drupal_add_js(drupal_get_path('module', 'fasttoggle') .'/fasttoggle.js');
-    drupal_add_css(drupal_get_path('module', 'fasttoggle') .'/fasttoggle.css', 'module', 'all', FALSE);
+    drupal_add_js(drupal_get_path('module', 'fasttoggle') . '/fasttoggle.js');
+    drupal_add_css(drupal_get_path('module', 'fasttoggle') . '/fasttoggle.css', array('preprocess' => FALSE));
   }
   $attributes = array('class' => 'fasttoggle', 'title' => t('Toggle this setting'));
-  $query = drupal_get_destination() .'&token='. drupal_get_token($token);
+  $query = drupal_get_destination() . '&token=' . drupal_get_token($token);
 
   if ($html) {
     return l($title, $callback, array('attributes' => $attributes, 'query' => $query));
@@ -181,7 +212,7 @@ function fasttoggle_get_options($type) {
 
 
 /**
- * Implementation of hook_fasttoggle_options().
+ * Implements hook_fasttoggle_options().
  */
 function fasttoggle_fasttoggle_options($type, $obj = NULL) {
   $return = array();
@@ -229,7 +260,7 @@ function fasttoggle_fasttoggle_options($
 
 
 /**
- * Implementation of hook_form_alter().
+ * Implements hook_form_alter().
  */
 function fasttoggle_form_alter(&$form, $form_state, $form_id) {
   switch ($form_id) {
@@ -237,7 +268,7 @@ function fasttoggle_form_alter(&$form, $
       // Add published/unpublished toggle links to the node overview page.
       if (isset($form['status'])) {
         foreach ($form['status'] as $key => $status) {
-          $form['status'][$key]['#value'] = fasttoggle($status['#value'], 'node/'. $key .'/toggle/status', true, 'status_'. $key);
+          $form['status'][$key]['#value'] = fasttoggle($status['#value'], 'node/' . $key . '/toggle/status', true, 'status_' . $key);
         }
       }
       break;
@@ -245,7 +276,7 @@ function fasttoggle_form_alter(&$form, $
       // Add blocked/unblocked toggle links to the user overview page.
       if (isset($form['status'])) {
         foreach ($form['status'] as $key => $status) {
-          $form['status'][$key]['#value'] = fasttoggle($status['#value'], 'admin/user/'. $key .'/toggle/status', true, 'status_'. $key);
+          $form['status'][$key]['#value'] = fasttoggle($status['#value'], 'admin/user/' . $key . '/toggle/status', true, 'status_' . $key);
         }
       }
       break;
@@ -254,7 +285,7 @@ function fasttoggle_form_alter(&$form, $
 
 
 /**
- * Implementation of hook_link().
+ * Implements hook_link().
  */
 function fasttoggle_link($type, $obj = null, $teaser = false) {
   $links = array();
@@ -264,20 +295,20 @@ function fasttoggle_link($type, $obj = n
     switch ($type) {
       case 'node':
         foreach (array_keys($options) as $key) {
-          $links['fasttoggle_'. $key] = fasttoggle($options[$key][intval($obj->$key)], 'node/'. $obj->nid .'/toggle/'. $key, false, $key .'_'. $obj->nid);
+          $links['fasttoggle_' . $key] = fasttoggle($options[$key][intval($obj->$key)], 'node/' . $obj->nid . '/toggle/' . $key, false, $key . '_' . $obj->nid);
         }
         break;
       case 'comment':
         fasttoggle_load_comment($obj);
         foreach (array_keys($options) as $key) {
-          $links['fasttoggle_'. $key] = fasttoggle($options[$key][intval($obj->$key)], 'comment/toggle/'. $obj->cid .'/'. $key, false, $key .'_'. $obj->cid);
+          $links['fasttoggle_' . $key] = fasttoggle($options[$key][intval($obj->$key)], 'comment/toggle/' . $obj->cid . '/' . $key, false, $key . '_' . $obj->cid);
         }
         break;
-      // User is not one of the standard types for hook_link(). This
-      // use enables adding of user links to a user profile.
+        // User is not one of the standard types for hook_link(). This
+        // use enables adding of user links to a user profile.
       case 'user':
         foreach (array_keys($options) as $key) {
-          $links['fasttoggle_'. $key] = fasttoggle($options[$key][intval($obj->$key)], 'user/'. $obj->uid .'/toggle/'. $key, false, $key .'_'. $obj->uid);
+          $links['fasttoggle_' . $key] = fasttoggle($options[$key][intval($obj->$key)], 'user/' . $obj->uid . '/toggle/' . $key, false, $key . '_' . $obj->uid);
         }
         break;
     }
@@ -288,7 +319,7 @@ function fasttoggle_link($type, $obj = n
 
 
 /**
- * Implementation of hook_views_tables().
+ * Implements hook_views_tables().
  */
 function fasttoggle_views_tables() {
   $tables['fasttoggle'] = array(
@@ -321,15 +352,15 @@ function fasttoggle_views_tables() {
  */
 function fasttoggle_node_query_handler($fielddata, $fieldinfo, &$query) {
   foreach (array('status', 'comment', 'promote', 'sticky') as $field) {
-    if (!in_array('node.'. $field, $query->fields)) {
-      $query->fields[] = 'node.'. $field;
+    if (!in_array('node.' . $field, $query->fields)) {
+      $query->fields[] = 'node.' . $field;
     }
   }
 }
 
 
 /**
- * Implementation of hook_fasttoggle_labels().
+ * Implements hook_fasttoggle_labels().
  */
 function fasttoggle_fasttoggle_labels($style) {
   switch ($style) {
@@ -387,6 +418,6 @@ function fasttoggle_handler_field($field
   $key = $fielddata['options'];
 
   if (isset($options[$key]) && isset($data->$key)) {
-    return fasttoggle($options[$key][intval($data->$key)], 'node/'. $data->nid .'/toggle/'. $key, true, $key .'_'. $data->nid);
+    return fasttoggle($options[$key][intval($data->$key)], 'node/' . $data->nid . '/toggle/' . $key, true, $key . '_' . $data->nid);
   }
 }
diff -up -r fasttoggle/fasttoggle.toggle.inc fasttoggle/fasttoggle.toggle.inc
--- fasttoggle/fasttoggle.toggle.inc	2007-10-07 07:44:04.000000000 -0500
+++ fasttoggle/fasttoggle.toggle.inc	2011-04-04 14:00:59.000000000 -0500
@@ -10,12 +10,16 @@ function fasttoggle_node_option($node, $
 
   // Check if the action is valid. This is essential to ensure the user has
   // access to the action.
-  if (isset($options[$option]) && isset($_GET['token']) && drupal_valid_token($_GET['token'], $option .'_'. $node->nid, true)) {
+  if (isset($options[$option]) && isset($_GET['token']) && drupal_valid_token($_GET['token'], $option . '_' . $node->nid, true)) {
     // The action is confirmed: either via form submit or via AJAX/POST
     if (isset($_POST['confirm']) && $_POST['confirm']) {
       // Get the next ID.
-      while (key($options[$option]) != $node->$option) next($options[$option]);
-      if (next($options[$option]) === FALSE) reset($options[$option]);
+      while (key($options[$option]) != $node->$option) {
+        next($options[$option]);
+      }
+      if (next($options[$option]) === FALSE) {
+        reset($options[$option]);
+      }
 
       // Save the node.
       $node->$option = key($options[$option]);
@@ -23,8 +27,8 @@ function fasttoggle_node_option($node, $
 
       // Output the new status for the updated link text on AJAX changes
       if (isset($_POST['javascript']) && $_POST['javascript']) {
-        drupal_set_header('Content-Type: text/javascript; charset=utf-8');
-        echo drupal_to_js(array(
+        drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8');
+        echo drupal_json_encode(array(
           'text' => $options[$option][intval($node->$option)],
           'callback' => 'node',
           'option' => $option,
@@ -52,10 +56,10 @@ function fasttoggle_node_option($node, $
 /**
  * Confirmation form for the option change of a node.
  */
-function fasttoggle_node_option_confirm($form_state, $node, $option) {
+function fasttoggle_node_option_confirm($form, $form_state, $node, $option) {
   return confirm_form(array(),
     t('Are you sure you want to set the post %title to %option?', array('%title' => $node->title, '%option' => $option)),
-    $_GET['destination'] ? $_GET['destination'] : 'node/'. $node->nid,
+    $_GET['destination'] ? $_GET['destination'] : 'node/' . $node->nid,
     '',
     t('Change'), t('Cancel')
   );
@@ -71,15 +75,15 @@ function fasttoggle_user_option($user, $
 
   // Check if the action is valid. This is essential to ensure the user has
   // access to the action.
-  if (isset($options[$option]) && isset($_GET['token']) && drupal_valid_token($_GET['token'], $option .'_'. $user->uid, true)) {
+  if (isset($options[$option]) && isset($_GET['token']) && drupal_valid_token($_GET['token'], $option . '_' . $user->uid, true)) {
     if (isset($_POST['confirm']) && $_POST['confirm']) {
       $array = array($option => !$user->$option);
       $user = user_save($user, $array);
 
       // Output the new option for the updated link text on AJAX changes
       if (isset($_POST['javascript']) && $_POST['javascript']) {
-        drupal_set_header('Content-Type: text/javascript; charset=utf-8');
-        echo drupal_to_js(array(
+        drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8');
+        echo drupal_json_encode(array(
           'text' => $options[$option][intval($user->$option)],
         ));
         exit;
@@ -104,10 +108,10 @@ function fasttoggle_user_option($user, $
 /**
  * Confirmation form for the status change of a user.
  */
-function fasttoggle_user_option_confirm($form_state, $user, $option) {
+function fasttoggle_user_option_confirm($form, $form_state, $user, $option) {
   return confirm_form(array(),
     t('Are you sure you want to set the user %user to %option?', array('%user' => $user->name, '%option' => $option)),
-    $_GET['destination'] ? $_GET['destination'] : 'user/'. $user->uid,
+    $_GET['destination'] ? $_GET['destination'] : 'user/' . $user->uid,
     '',
     t('Change'), t('Cancel')
   );
@@ -123,16 +127,16 @@ function fasttoggle_comment_option($comm
 
   // Check if the action is valid. This is essential to ensure the user has
   // access to the action.
-  if (isset($options[$option]) && isset($_GET['token']) && drupal_valid_token($_GET['token'], $option .'_'. $comment->cid, true)) {
+  if (isset($options[$option]) && isset($_GET['token']) && drupal_valid_token($_GET['token'], $option . '_' . $comment->cid, true)) {
     // The action is confirmed: either via form submit or via AJAX/POST
     if (isset($_POST['confirm']) && $_POST['confirm']) {
       $comment->$option = !$comment->$option;
-      comment_save((array)$comment);
+      comment_save((array) $comment);
 
       // Output the new status for the updated link text on AJAX changes
       if (isset($_POST['javascript']) && $_POST['javascript']) {
-        drupal_set_header('Content-Type: text/javascript; charset=utf-8');
-        echo drupal_to_js(array(
+        drupal_add_http_header('Content-Type', 'text/javascript; charset=utf-8');
+        echo drupal_json_encode(array(
           'text' => $options[$option][intval($comment->$option)],
           'callback' => 'comment',
           'option' => $option,
@@ -160,10 +164,10 @@ function fasttoggle_comment_option($comm
 /**
  * Confirmation form for the option change of a comment.
  */
-function fasttoggle_comment_option_confirm($form_state, $comment, $option) {
+function fasttoggle_comment_option_confirm($form, $form_state, $comment, $option) {
   return confirm_form(array(),
     t('Are you sure you want to set the comment %title to %option?', array('%title' => $comment->subject, '%option' => $option)),
-    $_GET['destination'] ? $_GET['destination'] : 'comment/'. $comment->cid,
+    $_GET['destination'] ? $_GET['destination'] : 'comment/' . $comment->cid,
     '',
     t('Change'), t('Cancel')
   );
