I'm writing a Wordpress wordpress plugin that does string processing whenever 'the_author' filter event is fired. However, some icons also contain 'the_author' event and subsequently my wordpress plugin is fired that ought to not occur. And So I am attempting to identify if my wordpress plugin is known as from certain icons but to date with no success. One widget that I must ignore is known as 'Recent Comments'. I've attempted:

function wrap_author($the_author) {
    if(!is_active_widget('recent_comments')) {
        $the_author = '<span class="CA_author">' . $the_author . '</span>';
        return $the_author;
    }
}

Maybe I'm not while using right reputation for the widget, I've Researched a great deal to discover the proper internal reputation for the current Comments Widget but aren't able to find it to date. Or possibly I shouldn't be using is_active_widget function.

Your suggestions tend to be appreciated.

Should you simply want yours to fireplace around the "primary" content areas then make use of the in_the_loop() function to check on and find out if you are inside a content loop. This can most likely enable you to get 99% of how there but you'll probably find some edge situation that'll cause frustration )

if (in_the_loop()) {
// do stuff
}

This can keep the code from performing whatsoever inside a sidebar.