Index: src/wp-includes/class-wp-short-circuit-result.php
===================================================================
--- src/wp-includes/class-wp-short-circuit-result.php	(nonexistent)
+++ src/wp-includes/class-wp-short-circuit-result.php	(working copy)
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Plugin API: WP_Short_Circuit_Result class
+ *
+ * @package WordPress
+ * @since 4.8.0
+ */
+
+/**
+ * Core class to store a short-circuit result.
+ *
+ * @since 4.8.0
+ */
+class WP_Short_Circuit_Result {
+
+	/**
+	 * Whether the current process should be short-circuited.
+	 *
+	 * @since 4.8.0
+	 * @access private
+	 * @var bool
+	 */
+	private $short_circuit = false;
+
+	/**
+	 * Value of the short-circuit.
+	 *
+	 * @since 4.8.0
+	 * @access private
+	 * @var mixed
+	 */
+	private $value = null;
+
+	/**
+	 * Toggles or retrieves whether the current process should be short-circuited.
+	 *
+	 * @since 4.8.0
+	 * @access public
+	 *
+	 * @param bool $set Optional. Whether to short-circuit the current process. If this is
+	 *                  omitted, the current value is retrieved. Default null.
+	 * @return bool The previous value of the short-circuit flag if $set was passed, or the
+	 *              current value of the flag otherwise.
+	 */
+	public function short_circuit( $set = null ) {
+		$current = $this->short_circuit;
+
+		if ( func_num_args() > 0 ) {
+			$this->short_circuit = (bool) $set;
+		}
+
+		return $current;
+	}
+
+	/**
+	 * Sets or retrieves the result value of the short-circuit.
+	 *
+	 * @since 4.8.0
+	 * @access public
+	 *
+	 * @param bool $set Optional. Result value of the short-circuit. If this is
+	 *                  omitted, the current value is retrieved. Default null.
+	 * @return bool The previous short-circuit result value if $set was passed, or the
+	 *              current result value otherwise.
+	 */
+	public function value( $set = null ) {
+		$current = $this->value;
+
+		if ( func_num_args() > 0 ) {
+			$this->value = $set;
+		}
+
+		return $current;
+	}
+}
Index: src/wp-includes/plugin.php
===================================================================
--- src/wp-includes/plugin.php	(revision 40480)
+++ src/wp-includes/plugin.php	(working copy)
@@ -622,6 +622,71 @@
 	do_action_ref_array( $tag, $args );
 }
 
+/**
+ * Checks whether a specific filter hook should be used to short-circuit a process.
+ *
+ * @since 4.8.0
+ *
+ * @param string $tag    The name of the filter hook.
+ * @param mixed  &$value Value to be filled with the short-circuit result. Passed by reference.
+ * @param array  $args   Additional arguments for the filter hook.
+ * @return bool True if the process should be short-circuited, false otherwise.
+ */
+function wp_short_circuit_filter( $tag, &$value, $args = array() ) {
+	array_unshift( $args, new WP_Short_Circuit_Result() );
+
+	/**
+	 * Filters whether a specific filter hook should be used to short-circuit a process.
+	 *
+	 * The dynamic portion of the hook name, `$tag`, refers to the hook name.
+	 *
+	 * @since 4.8.0
+	 *
+	 * @param WP_Short_Circuit_Result $result   Short-circuit object to modify.
+	 * @param mixed                   $args,... Arguments for the filter.
+	 */
+	$result = apply_filters_ref_array( "wp_short_circuit_filter_{$tag}", $args );
+
+	if ( is_a( $result, 'WP_Short_Circuit_Result' ) && $result->short_circuit() ) {
+		$value = $result->value();
+
+		return true;
+	}
+
+	return false;
+}
+
+/**
+ * Checks whether a specific action hook should be used to short-circuit a process.
+ *
+ * @since 4.8.0
+ *
+ * @param string $tag  The name of the action hook.
+ * @param array  $args Additional arguments for the action hook.
+ * @return bool True if the process should be short-circuited, false otherwise.
+ */
+function wp_short_circuit_action( $tag, $args = array() ) {
+	array_unshift( $args, new WP_Short_Circuit_Result() );
+
+	/**
+	 * Filters whether a specific action hook should be used to short-circuit a process.
+	 *
+	 * The dynamic portion of the hook name, `$tag`, refers to the hook name.
+	 *
+	 * @since 4.8.0
+	 *
+	 * @param WP_Short_Circuit_Result $result   Short-circuit object to modify.
+	 * @param mixed                   $args,... Arguments for the action.
+	 */
+	$result = apply_filters_ref_array( "wp_short_circuit_action_{$tag}", $args );
+
+	if ( is_a( $result, 'WP_Short_Circuit_Result' ) && $result->short_circuit() ) {
+		return true;
+	}
+
+	return false;
+}
+
 //
 // Functions for handling plugins.
 //
Index: src/wp-settings.php
===================================================================
--- src/wp-settings.php	(revision 40480)
+++ src/wp-settings.php	(working copy)
@@ -18,6 +18,7 @@
 // Include files required for initialization.
 require( ABSPATH . WPINC . '/load.php' );
 require( ABSPATH . WPINC . '/default-constants.php' );
+require_once( ABSPATH . WPINC . '/class-wp-short-circuit-result.php' );
 require_once( ABSPATH . WPINC . '/plugin.php' );
 
 /*
