';
if ( ! empty( $instance['content'] ) ) {
echo '
' . nl2br( wp_kses_data( balanceTags( $instance['content'], true ) ) ) . '
';
}
if ( ! empty( $instance['phone'] ) ) {
echo '
' . esc_html( $instance['phone'] ) . '
';
}
if ( ! empty( $instance['fax'] ) ) {
echo '
' . esc_html( $instance['fax'] ) . '
';
}
if ( ! empty( $instance['email'] ) ) {
$email = $instance['email'];
$email = sanitize_email($email);
echo '
'.esc_html( antispambot($email) ).'';
}
if ( ! empty( $instance['www'] ) ) {
echo '
' . esc_html( $instance['www'] ) . '';
}
if ( ! empty( $instance['open'] ) ) {
echo '
' . nl2br( wp_kses_data( balanceTags( $instance['open'], true ) ) ) . '
';
}
echo '
';
print $after_widget;
$cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget_related_entries', $cache, 'widget' );
}
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['phone'] = strip_tags( $new_instance['phone'] );
$instance['email'] = strip_tags( $new_instance['email'] );
$instance['fax'] = strip_tags( $new_instance['fax'] );
$instance['www'] = strip_tags( $new_instance['www'] );
$instance['content'] = $new_instance['content'];
$instance['open'] = strip_tags( $new_instance['open'] );
$this->flush_midget_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset( $alloptions['widget_contact_info'] ) ) {
delete_option( 'widget_contact_info' );
}
return $instance;
}
function flush_midget_cache() {
wp_cache_delete( 'widget_contact_info', 'widget' );
}
function form( $instance ) {
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
$phone = isset( $instance['phone'] ) ? esc_attr( $instance['phone'] ) : '';
$email = isset( $instance['email'] ) ? esc_attr( $instance['email'] ) : '';
$fax = isset( $instance['fax'] ) ? esc_attr( $instance['fax'] ) : '';
$www = isset( $instance['www'] ) ? esc_attr( $instance['www'] ) : '';
$content = isset( $instance['content'] ) ? esc_textarea( $instance['content'] ) : '';
$open = isset( $instance['open'] ) ? esc_textarea( $instance['open'] ) : '';
?>