WordPress widget args – classname?

Could someone explain to me what “classname” in the $widget_ops array means when you’re creating a custom widget? It doesn’t seem to have any relevance. I’ve searched both the source and the db and can’t find any instance of it.

$widget_ops = array( 'classname' => 'example', 'description' => 'widget description ' );

$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'example-widget' );

$this->WP_Widget( 'example-widget', 'Example Widget', $widget_ops, $control_ops );

Related posts

Leave a Reply

1 comment