Index: wp-includes/class-wp-rewrite.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/class-wp-rewrite.php	(revision 57b386ef1ee779da03f44e8c1b2cf6c1eb49f91c)
+++ wp-includes/class-wp-rewrite.php	(revision )
@@ -1273,6 +1273,15 @@
 		if ( empty($this->permalink_structure) )
 			return $rewrite;
 
+		/**
+		 * Fires before the rewrite rules are generated.
+		 *
+		 * @since 4.8.0
+		 *
+		 * @param WP_Rewrite $this Current WP_Rewrite instance, passed by reference.
+		 */
+		do_action_ref_array( 'pre_generate_rewrite_rules', array( &$this ) );
+
 		// robots.txt -only if installed at the root
 		$home_path = parse_url( home_url() );
 		$robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
