Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 23307)
+++ wp-admin/includes/template.php	(working copy)
@@ -1012,6 +1012,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.6
+ *
+ * @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
@@ -1057,6 +1084,32 @@
 }
 
 /**
+ * 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.
+ *
+ * @since 3.6
+ *
+ * @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
@@ -1161,6 +1214,31 @@
 }
 
 /**
+ * Remove a settings error to be displayed to the user
+ *
+ * Part of the Settings API. Use this to remove messages to users about settings validation
+ * problems, missing settings, etc...
+ *
+ * @since 3.6
+ *
+ * @global array $wp_settings_errors Storage array of errors registered during this pageload
+ *
+ * @param string $setting Slug title of the setting to which this error applies
+ * @param string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
+ */
+
+function remove_settings_error( $setting, $code ) {
+	global $wp_settings_errors;
+	
+	if ( count( $wp_settings_errors ) ) {
+		foreach ( $wp_settings_errors as $index => $error ) {
+			if ( $error['setting'] == $setting && $error['setting'] == $code )
+				unset( $wp_settings_errors[$index] );
+		}		
+	}
+}
+
+/**
  * Fetch settings errors registered by add_settings_error()
  *
  * Checks the $wp_settings_errors array for any errors declared during the current
