WP_Widget deprecated error in WordPress V4.3

The error isn’t actually caused by your PHP version (PHP 4 constructors won’t be removed until PHP 7) – it’s a warning produced by WordPress in preparation for this. Each repetition of the error represents a plugin using the outdated code.

Until your plugins’ authors update them, you can run the following shell command on a Linux system to find the old constructor calls:

grep -R "WP_Widget\(" /path/to/your/wp/install

This will give you a list of files that you can either modify on the command line, or use WP’s plugin editor. Matched strings – mostly parent::WP_Widget(args) should be changed to parent::__construct(args).

Leave a Comment