WordPress at a glance
function is not described

register_sidebar_widget() WP 2.2.0

Deprecated from version 2.8.0. It is no longer supported and can be removed in future releases. Use wp_register_sidebar_widget() instead.

Register widget for sidebar with backward compatibility.

Allows $name to be an array that accepts either three elements to grab the first element and the third for the name or just uses the first element of the array for the name.

Passes to wp_register_sidebar_widget() after argument list and backward compatibility is complete.

No Hooks.

Return

````. Null. Nothing.

Usage

register_sidebar_widget( $name, $output_callback, $classname, ...$params );
$name(string|int) (required)
Widget ID.
$output_callback(callable) (required)
Run when widget is called.
$classname(string)
Classname widget option.
Default: ''
...$params(mixed) (required)
Widget parameters.

Notes

  • See: wp_register_sidebar_widget()

Changelog

Since 2.2.0 Introduced.
Deprecated Since 2.8.0 Use wp_register_sidebar_widget()

Code of register_sidebar_widget() WP 5.7

<?php
function register_sidebar_widget($name, $output_callback, $classname = '', ...$params) {
	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' );
	// Compat.
	if ( is_array( $name ) ) {
		if ( count( $name ) === 3 ) {
			$name = sprintf( $name[0], $name[2] );
		} else {
			$name = $name[0];
		}
	}

	$id      = sanitize_title( $name );
	$options = array();
	if ( ! empty( $classname ) && is_string( $classname ) ) {
		$options['classname'] = $classname;
	}

	wp_register_sidebar_widget( $id, $name, $output_callback, $options, ...$params );
}