Index: template.php
===================================================================
--- template.php	(revision 35810)
+++ template.php	(working copy)
@@ -1190,10 +1190,22 @@
  * @param string $title    Formatted title of the section. Shown as the heading for the section.
  * @param string $callback Function that echos out any content at the top of the section (between heading and fields).
  * @param string $page     The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
+ * @param array $args      An array of 3 arguments ('before_section', 'after_section', 'section_class') that allows for adding content and a custom class around the new settings section.
  */
-function add_settings_section($id, $title, $callback, $page) {
+function add_settings_section($id, $title, $callback, $page, $args = array()) {
 	global $wp_settings_sections;
 
+	$defaults = array(
+		'id' => $id,
+		'title' => $title,
+		'callback' => $callback,
+		'before_section' => "",
+		'after_section' => "",
+		'section_class' => "",
+	);
+
+	$section = wp_parse_args( $args, $defaults );
+
 	if ( 'misc' == $page ) {
 		_deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
 		$page = 'general';
@@ -1204,7 +1216,8 @@
 		$page = 'reading';
 	}
 
-	$wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
+	// $wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
+	$wp_settings_sections[$page][$id] = $section;
 }
 
 /**
@@ -1278,6 +1291,9 @@
 		return;
 
 	foreach ( (array) $wp_settings_sections[$page] as $section ) {
+		if ( $section['before_section'] != "" ) {
+			echo sprintf($section['before_section'], $section['section_class']);
+		}
 		if ( $section['title'] )
 			echo "<h2>{$section['title']}</h2>\n";
 
@@ -1289,6 +1305,10 @@
 		echo '<table class="form-table">';
 		do_settings_fields( $page, $section['id'] );
 		echo '</table>';
+
+		if ( $section['after_section'] != "" ) {
+			echo $section['after_section'];
+		}
 	}
 }
 
