Add Dashboard Filter to a Custom Question

Answered here: Apply Dashboard filter to questions built with "Custom Question" GUI