WPIntell

Source evidence

How to fix Notice about constructor method for WP_Widget

Currency Converter · support · 2016-10-13T16:36:00+00:00

mixedsentiment
mediumseverity
0.85relevance
2replies
Evidence onlycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 1 rows with source links

100.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

0 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Marco Chiesi resolved
I wanted to reply to this topic but unfortunately it’s closed. WP_Widget is not deprecated. What is deprecated is the usage of the WP_Widget constructor having the same name of the class. This is a general PHP issue, see PHP documentation . By the way the WP_Widget constructor is explicitely called inside the currency_converter constructor of the currency_converter class. The fix as easy as change function currency_converter() { #Widget settings $widget_ops = array( 'description' => __('Currency Converter for any currency in the world', 'currency_conveter') ); #Widget control settings $control_ops = array( 'width' => 200, 'height' => 550, 'id_base' => 'currency_converter' ); #Create the widget $this->WP_Widget( 'currency_converter', __('Currency Converter', 'currency_converter'), $widget_ops, $control_ops ); } to function __construct() { #Widget settings $widget_ops = array( 'description' => __('Currency Converter for any currency in the world', 'currency_conveter') ); #Widget control settings $control_ops = array( 'width' => 200, 'height' => 550, 'id_base' => 'currency_converter' ); #Create the widget parent::__construct( 'currency_converter', __('Currency Converter', 'currency_converter'), $widget_ops, $control_ops ); } I hope that you could fix this in the next releases, because this kind of errors is very annoying when working with WP_DEBUG enabled. Thank you. Marco thank you, I will get on it Regards Salber Marco the fix has been uploaded version 2.3.1 Regards Salber

Comments

2 shown
enclick 2016-10-24T09:56:00+00:00

Marco thank you, I will get on it Regards Salber

enclick 2016-10-26T17:53:00+00:00

Marco the fix has been uploaded version 2.3.1 Regards Salber