#7352 closed enhancement (wontfix)
Extract & relocate markup functions: Template Component Filters
Reported by: | hnla | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Templates | Keywords: | needs-patch dev-feedback |
Cc: |
Description
Following on from work started in #6844 to move dir search to a common include part this ticket/task will cover adding screen component filters to this process.
We have already run filters as an include part along with template tag functions to support select id's & labels in Nouveau & I've just finished adding user screen filters to this so I'm proposing to transpose that work in a modified form to bp-legacy.
Patches to follow will create a new template part and directory under common/
so we will have common/filters/component-filters.php
Template part will contain the markup and template tag functions to manage main comp dirs, bp_is_user screens & group screens.
The requirement for simple template tag functions to display the correct select ID's and options, & labels I propose to locate in buddypress-functions.php although probably would prefer to create a new include dir for template tag functions as we have in Nouveau - feedback on that choice is welcomed.
This won't or shouldn't have any backpat issues as we are not changing behaviour just reducing markup to something more manageable.
I will follow up with a first pass patch in a few days.
Initall patch adds:
common/filters/select-order-filters.php
/bp-groups/bp-groups-template
to replace the notifications instance of filter markup replacing with template part call.All the working to adjust form elements, id's, select id's, labels and do_actions selection are maintained in the template part file, this could be better served by moving functions to elsewhere, although only from a neatness sense?