Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 23386)
+++ wp-admin/includes/template.php	(working copy)
@@ -1029,7 +1029,7 @@
  * @param string $section The slug-name of the section of the settings page in which to show the box (default, ...).
  * @param array $args Additional arguments
  */
-function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
+function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array(), $priority = 10) {
 	global $wp_settings_fields;
 
 	if ( 'misc' == $page ) {
@@ -1049,7 +1049,7 @@
 	if ( !isset($wp_settings_fields[$page][$section]) )
 		$wp_settings_fields[$page][$section] = array();
 
-	$wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args);
+	$wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args, 'priority' => $priority);
 }
 
 /**
@@ -1105,6 +1105,8 @@
 
 	if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) )
 		return;
+		
+	uasort($wp_settings_fields[$page][$section], 'compare_priority'); 
 
 	foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
 		echo '<tr valign="top">';
@@ -1119,6 +1121,23 @@
 	}
 }
 
+/** 
+ * Helper function to compare two objects by priority. 
+ * 
+ * @since 3.4.0 
+ * 
+ * @param object $a Object A. 
+ * @param object $b Object B. 
+ */ 
+function compare_priority( $a, $b ) { 
+	$ap = $a['priority']; 
+	$bp = $b['priority']; 
+	
+	if ( $ap == $bp ) 
+		return 0; 
+	return ( $ap > $bp ) ? 1 : -1; 
+}
+
 /**
  * Register a settings error to be displayed to the user
  *
