PHPのバージョンを8に変更すると、下記の記述はエラーとなります。
add_action('widgets_init', create_function('', 'return register_widget("RecentePostsWidgetItem");'));
この場合、無名関数を使用するように変更します。
add_action('widgets_init', function(){return register_widget("RecentePostsWidgetItem");});
そしてクラスの中で、
function RecentePostsWidgetItem() {
parent::WP_Widget(false, $name = '最新の投稿:ドロップダウン版');
}
とあるとエラーになるので、こちらは
function __construct() {
parent::WP_Widget(false, $name = '最新の投稿:ドロップダウン版');
}
と変更します。