register_widget() adds a widget to the Widgets API. It is used within class-wp-widget.php, around line 637 in version 2.8.2 of WordPress. The register_widget function takes three arguments: $widget_class , $name and $args.