A custom plugin developed to add colors and styles matching the legacy styles of a website produced in the 90’s. Retro!! Love it.

<!--?php /* Plugin Name: Celtein Text Widget
Plugin URI: http://steelbridge.io/celtein-text-widget/
Description: Celtein Text Widget adds a custom text widget to the Celtein Theme that allows for a custom styled text area
Version: 1..0.0
Author: Chris Parsons Author
URI: http://steelbridge.io License: GPL v3
*/



// If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } define( 'CELTEIN_TEXT_WIDGET_VERSION', '1.0.0' ); class CelteinText_Widget extends WP_Widget { public function __construct() { parent::__construct( 'celteintext_widget', __( 'Celtein Text Widget', 'celteintextdomain' ), array( 'classname' =&gt; 'celteintext_widget',&lt;br ?--> 'description' =&gt; __( 'A basic text widget developed for the Celtein theme.', 'celteintextdomain' )
)
);

load_plugin_textdomain( 'celteintextdomain', false, basename( dirname( __FILE__ ) ) . '/languages' );

}

/**
* Front-end display of widget.
*
* @see WP_Widget::widget()
*
* @param array $args Widget arguments.
* @param array $instance Saved values from database.
*/

public function widget( $args, $instance ) {

extract( $args );

$title = apply_filters( 'widget_title', $instance['title'] );
$message = $instance['message'];

echo $before_widget . '
<div class="card-class">

'
;

if ( $title ) {
echo $before_title . $title . $after_title;
}

echo '
<div class="textwidget">'
. $message . '</div>
'
. '

</div>
'
;
echo $after_widget;

}

/**
* Sanitize widget form values as they are saved.
*
* @see WP_Widget::update()
*
* @param array $new_instance Values just sent to be saved.
* @param array $old_instance Previously saved values from database.
*
* @return array Updated safe values to be saved.
*/

public function update( $new_instance, $old_instance ) {

$instance = $old_instance;

$instance['title'] = strip_tags( $new_instance['title'] );
$instance['message'] = ( $new_instance['message'] );

return $instance;

}

/**
* Back-end widget form.
*
* @see WP_Widget::form()
*
* @param array $instance Previously saved values from database.
*/

public function form( $instance ) {

$title = esc_attr( $instance['title']);
$message = esc_attr($instance['message']); ?&gt;

<label for="&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;"><!--?php _e('Title:'); ?--></label>
<input id="&lt;?php echo $this-&gt;get_field_id('title'); ?&gt;" class="widefat" name="&lt;?php echo $this-&gt;get_field_name('title'); ?&gt;" type="text" value="&lt;?php echo $title; ?&gt;" />

<label for="&lt;?php echo $this-&gt;get_field_id('message'); ?&gt;"><!--?php _e('Text &amp;amp; HTML'); ?--></label>
<textarea id="&lt;?php echo $this-&gt;get_field_id('message'); ?&gt;" class="widefat" cols="20" name="&lt;?php echo $this-&gt;get_field_name('message'); ?&gt;" rows="16">&lt;?php echo $message; ?&gt;</textarea>

<!--?php &lt;br ?--> }

}

/* Register the widget */
add_action( 'widgets_init', function(){
register_widget( 'CelteinText_Widget' );
});