Pass $params to 'select' hook

3.0-unstable version of #2448