PHP 8.0.0 ~にてcreate_function()が使えないことが原因
functions.php
// エラーになる記述(PHP 7.2〜7.4 は Deprecated、PHP 8.0 からは Fatal error) add_action( 'widgets_init', create_function( '', 'return register_widget( "Sample_Widget_Item" );' ) );
記述を変更することで解決(無名関数)
functions.php
// エラーにならない書き方
add_action('widgets_init', function(){register_widget('Sample_Widget_Item');});
PHPのバージョンを変更する場合は、動かなくなったりする処理があるので要注意です。
PHP 7.2〜7.4 の場合のエラー
Deprecated: Function create_function() is deprecated in
こちらも同様の修正で対応ができます
create_function()は、PHP7.2から非推奨になっています


