Index: src/wp-includes/formatting.php
===================================================================
--- src/wp-includes/formatting.php	(revision 31177)
+++ src/wp-includes/formatting.php	(working copy)
@@ -376,6 +376,22 @@
 	if ( trim($pee) === '' )
 		return '';
 
+	/**
+	 * Temporary filter. Enables replacement of the wpautop() function by plugins.
+	 *
+	 * If the filtered output isn't empty, it will be returned instead of running
+	 * the rest of the function.
+	 *
+	 * @since 4.2.0
+	 *
+	 * @param string $output  The filter output. Default empty.
+	 * @param string $pee     The text which has to be formatted.
+	 * @param bool   $br      Whether to convert the remaining line breaks into <br> tags.
+	 */
+	if ( $output = apply_filters( '_temp_wpautop', '', $pee, $br ) ) {
+		return $output;
+	}
+
 	$pee = $pee . "\n"; // just to make things a little easier, pad the end
 
 	if ( strpos($pee, '<pre') !== false ) {
