Is there one last filter that is ran over the widgets before they are sent out to the browser? I would like to add a filter that adds rel="nofollow" to all links in all widgets.

For instance, I can add a filter to the text widget:

add_filter('widget_text', 'xrvel_nfp_modify_nofollow');

But I don’t want to hunt down every single hook for every widget. (Also, the RSS widget doesn’t even HAVE a filter. Trac ticket submitted)

2 Answers
2

There is another thread on here that discusses a workaround.

Well… the familiar php workaround when a function does not provide a “get to variable” output actually… use ob_start: http://php.net/manual/en/function.ob-start.php
to just capture the output and manipulate it before sending it on its way.

Leads on stackoverflow: https://stackoverflow.com/search?q=%2Bwordpress+sidebar+%2Bob-start+

Leave a Reply

Your email address will not be published. Required fields are marked *