Index: template.php
===================================================================
--- template.php	(revision 18467)
+++ template.php	(working copy)
@@ -1102,6 +1102,33 @@
 }
 
 /**
+ * Remove a section from a settings page.
+ *
+ * Part of the Settings API. Use this to remove settings sections from an admin page.
+ *
+ * @since 3.3
+ *
+ * @global $wp_settings_sections Storage array of all settings sections added to admin pages
+ * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
+ *
+ * @param string $id Slug-name to identify the section.
+ * @param string $page The slug-name of the settings page on which to remove the section.
+ */
+function remove_settings_section( $id, $page ) {
+	global $wp_settings_sections, $wp_settings_fields;
+
+	unset( $wp_settings_sections[$page][$id] );
+	
+	if ( empty( $wp_settings_sections[$page] ) )
+		unset( $wp_settings_sections[$page] );
+		
+	unset( $wp_settings_fields[$page][$id] );
+	
+	if ( empty( $wp_settings_fields[$page] )  )
+		unset( $wp_settings_fields[$page] );
+}
+
+/**
  * Add a new field to a section of a settings page
  *
  * Part of the Settings API. Use this to define a settings field that will show
@@ -1120,7 +1147,7 @@
  * @param string $title Formatted title of the field. Shown as the label for the field during output.
  * @param string $callback Function that fills the field with the desired form inputs. The function should echo its output.
  * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...).
- * @param string $section The slug-name of the section of the settingss page in which to show the box (default, ...).
+ * @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()) {
@@ -1142,6 +1169,36 @@
 }
 
 /**
+ * Remove a field from a section of a settings page
+ *
+ * Part of the Settings API. Use this to remove a settings field from a
+ * settings section inside a settings page.
+ *
+ * The $callback argument should be the name of a function that echoes out the
+ * html input tags for this setting field. Use get_option() to retrive existing
+ * values to show.
+ *
+ * @since 3.3
+ *
+ * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
+ *
+ * @param string $id Slug-name to identify the field.
+ * @param string $page The slug-name of the settings page on which to remove the section.
+ * @param string $section The slug-name of the section of the settings page in which to remove the box.
+ */
+function remove_settings_field( $id, $page, $section = 'default' ) {
+	global $wp_settings_fields;
+	
+	unset( $wp_settings_fields[$page][$section][$id] );
+	
+	if ( empty( $wp_settings_fields[$page][$section] ) )
+		unset( $wp_settings_fields[$page][$section] );
+	
+	if ( empty( $wp_settings_fields[$page] ) )
+		unset( $wp_settings_fields[$page] );
+}
+
+/**
  * Prints out all settings sections added to a particular settings page
  *
  * Part of the Settings API. Use this in a settings page callback function
