A new macroscopic description of capillary transport of liquid and gas in porous materials is presented within the framework of multiphase continuum mechanics. It is assumed that unsaturated porous material form a macroscopic continuum composed of three constituents: gas, mobile liquid and capillary liquid, while the skeleton is rigid with an isotropic pore space structure. The capillary liquid forms a thin layer on the internal contact surface with the skeleton, is immoveable and contains the whole capillary energy. The remaining part of the liquid, surrounded by the layer of the capillary liquid and menisci, forms the constituent called mobile liquid. Both liquids exchange mass, momentum and energy in the vicinity of menisci surfaces during their motion, which is described by an additional macroscopic velocity field. A macroscopic scalar quantity is introduced, parametrizing changes of saturations, which for quasi static and stationary processes is equal to the capillary pressure. This quantity extends the dimensionality of the description of mechanical processes taking place in unsaturated porous materials. For the three fluid constituents of the medium, balance equations of mass and linear momentum and evolution equations for saturations are formulated. The constitutive relations for quantities describing mechanical processes in such a medium are proposed based on the dissipation inequality of mechanical energy for the whole system. A new approach is proposed, similar to that used in rational thermodynamics, based on entropy inequality analysis and the Lagrange multipliers method.