Index: template.php
===================================================================
--- template.php	(revision 52408)
+++ template.php	(working copy)
@@ -1557,9 +1557,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__,
@@ -1686,6 +1696,10 @@
 	}
 
 	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";
 		}
@@ -1700,6 +1714,9 @@
 		echo '<table class="form-table" role="presentation">';
 		do_settings_fields( $page, $section['id'] );
 		echo '</table>';
+		 if ( $section['after_section'] != "" ) {
+ 		 echo $section['after_section'];
+ 		     }           }
 	}
 }
 
