Salve.
Sto modificando un plugin per wordpress e vorrei fare in modo che una volta attivato il plugin venga creato anche un widget nel pannello apposito.
Il problema però è che secondo una documentazione in inglese che ho seguito dovrei usare queste funzioni

function widget_mio_plugin($args) {
extract($args);
?>
<?php echo $before_widget; ?>
<?php echo $before_title
. 'Mio Plugin'
. $after_title; ?>

----- Funzione che deve essere eseguita e posizionata sulla sidebar --------
<?php
if( function_exists('plugin') ) {
funzionedelplugin();
}
?>
-----------------------------------

<?php echo $after_widget; ?>
<?php
}
register_sidebar_widget('Mio Plugin',
'widget_mio_plugin');

Il pannello però genera un errore (nella penultima riga):

Fatal error: Call to undefined function: register_sidebar_widget() in c:\program files\easyphp1-8\www\prove\wp-content\plugins\mio_plugin\mio_plugin.php on line 267