#4974 closed enhancement (fixed)
Add filters to bp_directory_groups_search_form() and bp_directory_members_search_form()
Reported by: | megainfo | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.9 | Priority: | low |
Severity: | minor | Version: | |
Component: | Templates | Keywords: | has-patch needs-refresh |
Cc: |
Description
I suggest adding some filters for the html code returned by
bp_directory_groups_search_form() and bp_directory_members_search_form()
Attachments (5)
Change History (21)
#1
@
11 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 1.9
- Priority changed from normal to low
- Severity changed from normal to minor
#2
@
11 years ago
Looked simple enough, but let me your know feedback. First time submitting a patch, but don't be gentle.
#3
@
11 years ago
- Keywords has-patch needs-refresh added; needs-patch removed
Technique looks fine in bp_directory_groups_search_form()
, but it looks like the implementation in bp_group_search_form()
is incomplete. The ?>
delimiter needs to be moved, the nonce field needs to be included in the string, and the string needs to be echoed and run through apply_filters()
.
#4
@
11 years ago
hhmm... not sure what happened. Ticket wasn't even concerning bp_group_search_form(), but nevertheless I applied the same technique to that function as well.
Please note that 4972.2.diff attachement contains the latest code adjustments.
#5
@
11 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 7328:
#7
@
11 years ago
- Keywords has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
A few points and a patch correction.
Patch 4974.3 corrects escaped value attr string; needs to be passed through not echoed: () rather than _e().
1/ Why have we only highlighted two of the dir search forms for this re-factoring, is there a reason the legacy forum search and blogs search weren't changed?.
2/ Where is bp_group_search_form() actually used? I can find no reference to it other than the groups template core file
#9
@
11 years ago
- Keywords needs-patch added; needs-refresh removed
Good catch on _e()
, hnla. Thanks for the patch.
Your questions:
1 - We've only changed it here because this is all the original patch did. It would be nice to extend the same treatment to all search form html generating functions. We just need a patch.
2 - I don't think it is used anywhere by BP, nor has it been for a number of years. We have to keep it in there for backward compatibility, as some themes/installations may be using it.
#10
@
11 years ago
1 - We've only changed it here because this is all the original patch did. It would be nice to extend the same treatment to all search form html generating functions. We just need a patch.
The other two will need patching as it could prove awkward for developers wanting to re-factor all of them.
2 - I don't think it is used anywhere by BP, nor has it been for a number of years. We have to keep it in there for backward compatibility, as some themes/installations may be using it.
Oh my favourite phrase 'backwards compatibility' - I can't find theme use of the function checking back to 1.2 locally, although perhaps not strictly 'deprecated' can this not be pulled out of the file and added to one of those /bp-core/deprecated/ files, less clutter in current core files?
#12
@
11 years ago
@dimensionmedia
Good stuff, glad I spotted the ticket update before doing so myself, however why did you re-patch the whole lot?
A final thing to consider before the patch/ticket closed: The labels are empty, they ought not to be, text ought to be added hidden if necessary with a assistive-text class - as found iirc in one of the WP default stylesheets of course this may upset themes that have overridden or copied all BP styles.
#13
@
11 years ago
- Keywords has-patch needs-refresh added; needs-patch removed
dimensionmedia - Thanks for the new patch. Would you mind regenerating it against the latest trunk? The one you have here won't apply cleanly, because some of the changes have already been committed.
hnla - The label stuff is separate from the main issue discussed in this ticket. Perhaps you could open a new one and we could hash it out there.
I think we can do this.