We present a discrete-domain approach to three-phase displacements and hysteresis in porous media. In this method, constrained energy minimization leads to evolution equations for local saturations that describe a wide range of three-phase displacements, including pressure- and saturation-controlled displacement with or without preservation of one of the defending phases. Under action of global saturation constraints, irreversible displacements lead to significant fluid redistribution, as well as abrupt fluctuations of both the three-phase saturation paths and the corresponding capillary pressures. These features are a consequence of Haines jumps with cooperative behavior that occur at pore scale in three-phase systems. The method is a fast and convenient way to investigate hysteresis behavior of three-phase displacement in porous media. As free energy is an extensive property, the framework links pore and core scales and provide a means to achieve upscaled three-phase displacements for higher-order hysteresis loops, which rarely is obtained in time-consuming three-phase measurements or pore-scale simulations.