Non-equilibrium thermodynamics for functionals of current and density