Home » blog seo friendly » WordPress : Muncul "Notice: WP_Widget is deprecated since version 4.3.0"

WordPress : Muncul "Notice: WP_Widget is deprecated since version 4.3.0"

Ketika update wordpress muncul “Notice: WP_Widget is deprecated since version 4.3.0” lalu bagimana menghilangkan peringatan tersebut?

Notice: The called constructor method for WP_Widget in ... is deprecated since version 4.3.0! Use __construct() instead. in ...\wp-includes\functions.php on line 3891

Setelah saya telusuri ditemukan code :

$this->WP_Widget('karisma-recent-posts', __('Karisma Recent Posts ', $this->localization_domain), $widget_ops);

Solusinya adalah dengan mengganti $this->WP_Widget dengan parent::__construct seperti di bawah ini :

parent::__construct('karisma-recent-posts', __('Karisma Recent Posts ', $this->localization_domain), $widget_ops);

Selesai sudah silahkan coba reload/refresh halaman web dan peringatan tersebut akan hilang.

No Comments

  1. cahyo

    June 7, 2017 at 6:21 am

    wordpress-muncul-notice-wp_widget-deprecated-since-P0K3RV1TA D.8.E.B.7.E.6.B-version-4-3-0

    Reply

Leave a Reply

Your email address will not be published.