WordPress 4.3 WP_Widget PHP Notice

WordPress 4.3 “Billie” was just released.

Some plugins that use WordPress widgets may try to access the WP_Widget class method directly in it’s own class method like this:

$this -> WP_Widget()

As a result, WordPress gives the following PHP notice:

Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead

The solution is to change…

$this -> WP_Widget()

to…

parent::__construct()

Shares

2 Comments

Leave a Reply

Your email address will not be published.

*

© 2017 Contrid

Theme by Anders NorénUp ↑

Pin It on Pinterest

%d bloggers like this: