Index: rewrite.php
===================================================================
--- rewrite.php	(revision 11997)
+++ rewrite.php	(working copy)
@@ -46,6 +46,24 @@
 }
 
 /**
+ * Add permalink structure.
+ *
+ * Warning: you must call this on init or earlier, otherwise the query var
+ * addition stuff won't work.
+ *
+ * @since 2.9.0
+ *
+ * @param string $name Name for permalink structure.
+ * @param string $struct Permalink structure.
+ * @param bool $with_front Prepend front base to permalink structure.
+ */
+function add_permastruct($name, $struct, $with_front = true) {
+	global $wp_rewrite;
+
+	return $wp_rewrite->add_permastruct($name, $struct, $with_front);
+}
+
+/**
  * Add a new feed type like /atom1/.
  *
  * @since 2.1.0
@@ -67,6 +85,20 @@
 }
 
 /**
+ * Remove rewrite rules and then recreate rewrite rules.
+ *
+ * @see WP_Rewrite::flush_rules()
+ *
+ * @since 2.9.0
+ *
+ * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).
+ */
+function flush_rewrite_rules($hard = true) {
+	global $wp_rewrite;
+	$wp_rewrite->flush_rules($hard);
+}
+
+/**
  * Endpoint Mask for Permalink.
  *
  * @since 2.1.0
