[wp-trac] [WordPress Trac] #24605: Returning widget ID as third parameter of widget_text filter
WordPress Trac
noreply at wordpress.org
Wed Jun 19 13:33:22 UTC 2013
#24605: Returning widget ID as third parameter of widget_text filter
-----------------------------+-----------------------------
Reporter: namarpi | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 3.5.1
Severity: normal | Keywords: has-patch
-----------------------------+-----------------------------
I would like to identify the current widget when using widget_text filter.
If the widget ID will be returned by the filter, it would be very useful.
A solution can be adding a third parameter in the wp-includes/default-
widget.php near the line 401:
Original:
{{{
$text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' :
$instance['text'], $instance );
}}}
Offered:
{{{
$text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' :
$instance['text'], $instance, $this->id );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24605>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list