Add more filters
Closed this issue · 5 comments
There's now a filter for the WP_User_Query
args. What else should be filtered?
Note: I'm not quite happy with how the templates work, maybe changing them should only be allowed via filters.
@swissspidy what is your concern with the way templates are loaded? To easy to overwrite template? Display data that shouldn't be displayed?
Open for suggestions like a filter to switch out the template file.
@neverything For example I don't think people should be able to change the template via rplus_wp_team_list()
. Also, the widget template is practically equal with the default one. Why not unify them, remove the template argument altogether and only use a filter?
Of course we could still detect the existence of a template file in the theme's folder, but this means telling people how they should structure their templates. Nobody stores this plugin's template in the root folder of a theme.
I like how BuddyPress loads templates using bp_get_template_part
and bp_locate_template
. Maybe we can implement a simpler version of this.
I opened a new issue for the template loading stuff. Will close this one for now until we have some specific filters we'd like to add.