Large update to wfx_get_attachments() function

Big update to this function, allowing advanced handling of post attachments, play if possible and a bunch of other cool things that I need to write documentation on!