[wp-hackers] Improving the Pages widget

Stephen Rider wp-hackers at striderweb.com
Mon Jan 12 19:38:23 GMT 2009

I don't monkey a lot with widgets, so if this totally won't work feel  
free to say so.  ;-)

Would there be a way to abstract this out a level so that we could  
filter the parameters of any arbitrary widget?  Similar to how we can  
filter any given option as it's updated to the database?

In other words, something like  
add_filter('widget_parameter_<widgetname>' ...

Just a thought. :)


On Jan 12, 2009, at 11:16 AM, Edward Dale wrote:

> That's enough support for me.  I've created a ticket with a patch:
> http://trac.wordpress.org/ticket/8845
> Testing would be appreciated.  It works fine on one of my sites with  
> this
> code in my functions.php file.
> add_filter('widget_pages_args', 'my_widget_pages_args');
> function my_widget_pages_args($args) {
>    $args['depth'] = 2;
>    return $args;
> }

More information about the wp-hackers mailing list