Add support for named queries and plugin hook in elgg_get_entities
|Reported by:||mrclay||Owned by:|
There are often situations where one needs to alter the entities query in a page of another plugin. E.g. changing members list to alpha order, choosing a larger limit, or applying an ElggCollection to implement sticky discussion topics.
Currently one has to completely fork the page code to do these things. I propose that elgg_get_entities accept an option "query_name". If passed in, $options would be passed through a plugin hook [Error: Query filter requires field and constraints separated by a "="]. This of course doesn't enable altering plugin queries until query names are added to the plugins, but this would be relatively easy.