updates hook filter to allow arrays
updates hook filter to allow arrays

Co-authored-by: Daniel Brierton <3f33b4fecb383060805dad38db903299bad9db7c@raspberrypi.org>

cloudflare/Cloudflare-WordPress,cloudflare/Cloudflare-WordPress,cloudflare/Cloudflare-WordPress