Deprecated WP_Widget constructor used
-
In Version 2.1.0.2 of Custom Sidebars, if DEBUG is enabled, you can get a Deprecation Warning from WordPress due to part of the Custom Sidebars code using PHP4 constructors. WordPress as of version 4.3 no longer supports PHP 4 constructor syntax.
The problem is being generated in the file customsidebars.php on line 80 where the constructor for the class CustomSidebarsEmptyPlugin calls the parent, WP_Widget, constructor.
Changing code “parent::WP_Widget(…)” to “parent::__construct(…)” will prevent the warning message. The deprecated WP_Widget() constructor calls its __construct() with the same parameters, after calling the WordPress function _deprecated_constructor().
- The topic ‘Deprecated WP_Widget constructor used’ is closed to new replies.