"> get_field_id( 'pen_theme_animation_widget' ); $field_name = $widget->get_field_name( 'pen_theme_animation_widget' ); ?>

get_field_id( 'pen_theme_color_widget' ); $field_name = $widget->get_field_name( 'pen_theme_color_widget' ); ?>

get_settings(); $color_widget = 'transparent'; $animation_widget = 'fadeIn'; $class = 'class="'; if ( isset( $settings[ $instance_id ]['title'] ) && '' !== trim( $settings[ $instance_id ]['title'] ) ) { $class .= 'pen_widget_has_title '; } if ( ! empty( $settings[ $instance_id ]['pen_theme_color_widget'] ) ) { $color_widget = $settings[ $instance_id ]['pen_theme_color_widget']; } $class .= 'pen_widget_' . $color_widget . ' '; if ( 'transparent' !== $color_widget ) { $class .= 'pen_widget_not_transparent '; } if ( ! empty( $settings[ $instance_id ]['pen_theme_animation_widget'] ) ) { $animation_widget = $settings[ $instance_id ]['pen_theme_animation_widget']; } if ( $animation_widget && 'none' !== $animation_widget ) { $class .= 'pen_animate_on_scroll pen_custom_animation_' . $animation_widget . ' '; } $params[0]['before_widget'] = str_ireplace( 'class="', $class, $params[0]['before_widget'] ); return $params; } add_filter( 'dynamic_sidebar_params', 'pen_widgets_custom_classes' ); }