Index: template.php
===================================================================
--- template.php	(revision 39474)
+++ template.php	(working copy)
@@ -1203,9 +1203,19 @@
  *                           'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using
  *                           add_options_page();
  */
-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.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
 		$page = 'general';
@@ -1216,7 +1226,7 @@
 		$page = 'reading';
 	}
 
-	$wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
+	$wp_settings_sections[$page][$id] = $section;
 }
 
 /**
@@ -1290,6 +1300,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";
 
@@ -1301,6 +1314,9 @@
 		echo '<table class="form-table">';
 		do_settings_fields( $page, $section['id'] );
 		echo '</table>';
+		if ( $section['after_section'] != "" ) { 
+ 			echo $section['after_section']; 
+ 		}
 	}
 }
 
