The information you want is in the $args
parameter.
var_dump($args); // inside your widget method
Look at the ‘name’ and ‘id’ array elements.
Your code should look something like:
function widget( $args, $instance ) {
extract($args);
$title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
$text = apply_filters( 'widget_text', $instance['text'], $instance );
$hide_title = isset( $instance['hide_title'] ) ? $instance['hide_title'] : false;
$filter = isset( $instance['filter'] ) ? $instance['filter'] : false;
if ('home-footer-widget' != $args['id'] && 'footer-two' != $args['id']) echo $before_widget;
if ( $title && !$hide_title )echo $before_title . $title . $after_title;
if ( $text ) echo $filter ? wpautop($text) : $text;
if ('home-footer-widget' != $args['id'] && 'footer-two' != $args['id']) echo $after_widget;
}