#6222 closed defect (bug) (fixed)
Audit filters in core widgets to ensure they meet WordPress expectations
Reported by: | dcavins | Owned by: | dcavins |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | minor | Version: | 2.2 |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description
Bowe pointed out via Slack that he was having trouble applying the filter widget_title
to the BP members widget.
The problem is that that widget isn't providing the expected parameters to the filter.
From BP members widget:
$title = apply_filters( 'widget_title', $instance['title'] );
The parameters expected in widget_title
are
$title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
I'd be happy to complete the audit and write patches if someone will assign it to me.
Attachments (2)
Change History (9)
@
10 years ago
Add arguments to 'widget_title' filter. Add $instance settings and $id_base to the arguments passed along with the ‘widget_title’ filter for BP core widgets.
#4
@
10 years ago
- Owner set to dcavins
- Resolution set to fixed
- Status changed from new to closed
In 9709:
@
10 years ago
Verify that title is set before widget_title filter.
Use calculated value in filter. Be sure that the title value is set before passing to the filter. See #6222.
I've added the necessary arguments. I think this (simple) patch should be ready to go but would appreciate another set of eyes on my changes.