/** * Writes the location header to a variable for later comparison */ public static function wp_redirect($location, $status) { if (!self::$location_expected) { throw new Exception('wp_redirect() called at unexpected time' . ' ($location_expected was not set).'); } self::$location_actual = $location; }