Notwithstanding any other provision of law, a legislative body that exercises authority granted by this division may enact local laws providing for the transfer, with or without consideration, of real property belonging to the local jurisdiction to a public or private entity, to use in developing or preserving affordable housing.