Introduction of a mediator for enhancing photocatalytic performance via post-synthetic metal exchange in metal-organic frameworks (MOFs).